On Tue, Jun 09, 2020 at 02:10:29PM +0200, Marco Felsch wrote: > On 20-06-09 11:27, Andrzej Hajda wrote: > > On 09.06.2020 08:45, Marco Felsch wrote: > > > On 20-06-08 13:11, Andrzej Hajda wrote: > > >> On 08.06.2020 11:17, Marco Felsch wrote: > > >>> On 20-03-26 18:31, Andy Shevchenko wrote: > > >>>> On Thu, Mar 26, 2020 at 03:01:22PM +0000, Grant Likely wrote: > > >>>>> On 25/03/2020 12:51, Andy Shevchenko wrote: > > >>>>>> On Tue, Mar 24, 2020 at 08:29:01PM -0700, Saravana Kannan wrote: > > >>>>>>> On Tue, Mar 24, 2020 at 5:38 AM Andy Shevchenko wrote: Please delete unneeded context from mails when replying. Doing this makes it much easier to find your reply in the message, helping ensure it won't be missed by people scrolling through the irrelevant quoted material. > > I think rule of > > thumb should be "do not expose yourself, until you are ready", which in > > this case means "do not call component_add, until resources are > > acquired" - ie resource acquisition should be performed in probe. > Hm.. there are is no documentation which forbid this use-case. I thought > that the component framework bind() equals the driver probe() function.. It does, the issue is perhaps more clearly expressed as saying that a driver should acquire whatever resources it needs before starting to make resources available to others, this includes but isn't limited to registering new device nodes. This ensures that the users don't then start trying to use resources and have them torn down underneath them. > > I use > > this approach mainly to avoid multiple deferred re-probes, but it should > > solve also this issue, so even if there will be solution to "deferred > > probe issues" in core it would be good to fix imx drivers. > Pls, see my above comments. It is not only the imx driver. Also we > shouldn't expect that driver-developers will follow a rule which is > not written somewhere. If you've got an idea where this should be documented patches welcome! I can't think of anywhere sensibly discoverable to put something off the top of my head.