mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Aisheng Dong <aisheng.dong@nxp.com>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Shawn Guo <shawnguo@kernel.org>, Stephen Boyd <sboyd@kernel.org>
Subject: Re: [PATCH RESEND] driver core: export device_is_bound() to fix build failure
Date: Mon, 9 Nov 2020 12:42:11 +0100	[thread overview]
Message-ID: <20201109114211.GD1769924@kroah.com> (raw)
In-Reply-To: <CADVatmNmoBFipoELoyuJ4EUB=KjjO+_9ahm830+04Xi3T77jqQ@mail.gmail.com>

On Mon, Nov 09, 2020 at 11:18:56AM +0000, Sudip Mukherjee wrote:
> Hi Aisheng,
> 
> On Mon, Nov 9, 2020 at 10:57 AM Aisheng Dong <aisheng.dong@nxp.com> wrote:
> >
> > Hi Greg,
> >
> > > From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > Sent: Monday, November 9, 2020 6:37 PM
> > > Subject: Re: [PATCH RESEND] driver core: export device_is_bound() to fix build
> > > failure
> > >
> > > On Mon, Nov 09, 2020 at 10:14:46AM +0000, Sudip Mukherjee wrote:
> > > > Hi Greg,
> > > >
> > > > On Sun, Nov 8, 2020 at 8:23 AM Greg Kroah-Hartman
> > > > <gregkh@linuxfoundation.org> wrote:
> > > > >
> > > > > On Sat, Nov 07, 2020 at 10:47:27PM +0000, Sudip Mukherjee wrote:
> > > > > > When CONFIG_MXC_CLK_SCU is configured as 'm' the build fails as it
> > > > > > is unable to find device_is_bound(). The error being:
> > > > > > ERROR: modpost: "device_is_bound" [drivers/clk/imx/clk-imx-scu.ko]
> > > > > >       undefined!
> > > > > >
> > > > > > Export the symbol so that the module finds it.
> > > > > >
> 
> <snip>
> 
> > >
> > > probe() should never call this function as it makes no sense at all at that point in
> > > time.  The driver should be fixed.
> >
> > Would you suggest if any other API we can use to allow the driver to know whether
> > another device has been probed?
> >
> > For imx scu driver in question, it has a special requirement that it depends on scu power domain
> > driver. However, there're a huge number (200+) of power domains for each device clock, we can't define
> > them all in DT for a single clock controller node.
> >
> > That's why we wanted to use device_is_bound() before to check if scu power domain is ready or not to
> > support defer probe.
> 
> iiuc, you are waiting for "fsl,scu-pd" to be registered.
> I think you might be able to use bus_for_each_dev() to check if the
> device has registered with the bus or not. It will be on the bus only
> after bind was successful. The bus will be "platform_bus_type".

No, do not do that, again, no individual driver should ever have to do
that.  Think about what would be involved if _every_ driver started
doing this.

> But I am sure Greg can give you better suggestion than this. :)

device link :)

thanks,

greg k-h

  parent reply	other threads:[~2020-11-09 11:41 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-07 22:47 Sudip Mukherjee
2020-11-08  8:23 ` Greg Kroah-Hartman
2020-11-09 10:14   ` Sudip Mukherjee
2020-11-09 10:37     ` Greg Kroah-Hartman
2020-11-09 10:57       ` Aisheng Dong
2020-11-09 11:18         ` Sudip Mukherjee
2020-11-09 11:32           ` Aisheng Dong
2020-11-09 11:42           ` Greg Kroah-Hartman [this message]
2020-11-09 11:41         ` Greg Kroah-Hartman
2020-11-09 11:55           ` Aisheng Dong
2020-11-09 12:04             ` Greg Kroah-Hartman
2020-11-09 12:05             ` Greg Kroah-Hartman
2020-11-09 12:26               ` Aisheng Dong
2020-11-09 12:48                 ` Greg Kroah-Hartman
2020-11-18 10:23                   ` Aisheng Dong
2020-11-18 10:45                     ` Greg Kroah-Hartman
2020-11-18 15:40                       ` Aisheng Dong
2020-11-18 22:22                         ` Saravana Kannan
2020-11-19  4:13                           ` Aisheng Dong
2020-11-19 13:10                             ` Greg Kroah-Hartman
2020-11-19 14:09                               ` Aisheng Dong
2020-11-19 14:25                                 ` Greg Kroah-Hartman
2020-11-19 15:20                                   ` Aisheng Dong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201109114211.GD1769924@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=aisheng.dong@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=shawnguo@kernel.org \
    --cc=sudipm.mukherjee@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome