Re: [PATCH v2 1/2] of: platform: Make sure bus only devices get probed

From: Ulf Hansson
Date: Tue Sep 07 2021 - 06:36:31 EST


On Fri, 3 Sept 2021 at 16:29, Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote:
>
> Hi Ulf,
>
> On Fri, Sep 3, 2021 at 11:19 AM Ulf Hansson <ulf.hansson@xxxxxxxxxx> wrote:
> > On Fri, 3 Sept 2021 at 01:04, Saravana Kannan <saravanak@xxxxxxxxxx> wrote:
> > > fw_devlink could end up creating device links for bus only devices.
> > > However, bus only devices don't get probed and can block probe() or
> > > sync_state() [1] call backs of other devices. To avoid this, set up
> > > these devices to get probed by the simple-pm-bus.
> > >
> > > [1] - https://lore.kernel.org/lkml/CAPDyKFo9Bxremkb1dDrr4OcXSpE0keVze94Cm=zrkOVxHHxBmQ@xxxxxxxxxxxxxx/
> > > Signed-off-by: Saravana Kannan <saravanak@xxxxxxxxxx>
> > > Tested-by: Saravana Kannan <saravanak@xxxxxxxxxx>
> >
> > Again, this looks like a nice solution to the problem.
> >
> > One question though. The Kconfig SIMPLE_PM_BUS, should probably be
> > "default y" - or something along those lines to make sure fw_devlink
> > works as expected.
>
> I would love for SIMPLE_PM_BUS to go away, and all of its functionality
> to be usurped by the standard simple-bus handling.
>
> In the modern world, everything uses power management and Runtime
> PM, and the distinction between "simple-bus" and "simple-pm-bus"
> is purely artificial.

I think it's not that easy, but maybe I am wrong.

Today we have an opt-in way of supporting runtime PM (and power
management). In most cases it's up to drivers or subsystem level code
to decide if runtime PM should be enabled for the device.

Would it really be okay to enable runtime PM for all of them?

Kind regards
Uffe