Re: [PATCH v4 01/29] Revert "treewide: Fix probing of devices in DT overlays"

Geert Uytterhoeven
2025-12-03T10:13:44Z

Hi Hervé,

On Tue, 2 Dec 2025 at 18:29, Herve Codina <herve.codina@bootlin.com> wrote:
> On Tue, 2 Dec 2025 17:35:35 +0100
> Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > On Tue, 2 Dec 2025 at 10:26, Herve Codina <herve.codina@bootlin.com> wrote:
> > > On Fri, 28 Nov 2025 10:34:57 +0200
> > > Kalle Niemi <kaleposti@gmail.com> wrote:
> > > > >>>>>> Test system testing drivers for ROHM ICs bisected this commit to cause
> > > > >>>>>> BD71847 drivers probe to not be called.
> > > > >>>>> This driver (and overlay support) is in linux-next or something out of
> > > > >>>>> tree on top of linux-next?
> > > > >>>>>
> > > > >>>>> Rob
> > > > >>>> Yes the driver is in mainline linux: /drivers/mfd/rohm-bd718x7.c
> > > > >>> I don't see any support to apply overlays in that driver.
> > > > >> Ah. Sorry for the confusion peeps. I asked Kalle to report this without
> > > > >> proper consideration. 100% my bad.
> > > > >>
> > > > >> While the bd718x7 drive indeed is mainline (and tested), the actual
> > > > >> 'glue-code' doing the overlay is part of the downstream test
> > > > >> infrastructure. So yes, this is not a bug in upstream kernel - this
> > > > >> falls in the category of an upstream change causing downstream things to
> > > > >> break. So, feel free to say: "Go fix your code" :)
> > > > >>
> > > > >> Now that this is sorted, if someone is still interested in helping us to
> > > > >> get our upstream drivers tested - the downstream piece is just taking
> > > > >> the compiled device-tree overlay at runtime (via bin-attribute file),
> > > > >> and applying it using the of_overlay_fdt_apply(). The approach is
> > > > >> working for our testing purposes when the device is added to I2C/SPI
> > > > >> node which is already enabled. However, in case where we have the I2C
> > > > >> disabled, and enable it in the same overlay where we add the new device
> > > > >> - then the new device does not get probed.
> > > > >>
> > > > >> I would be really grateful if someone had a pointer for us.
> > > > > Seems to be fw_devlink related. I suppose if you turn it off it works?
> > > > > There's info about the dependencies in sysfs or maybe debugfs. I don't
> > > > > remember the details, but that should help to tell you why things
> > > > > aren't probing.
> > >
> > > Rob reverted patches but I plan to continue my work on it.
> > > On my side, I need the reverted patches but I fully understand that, on
> > > your side, you need a working system.
> > >
> > > In order to move forward and find a solution for my next iteration, can you
> > > send your overlay (dtso) used in your working and non working cases?
> >
> > Hmm, I must have missed when Rob applied (part of) this series, as I
> > do an overlay test (using the out-of-tree configfs) on top of every
> > (bi-weekly) renesas-drivers release, and saw no issues during the last
> > few months.
> >
> > So I applied this series and tested loading my SPI EEPROM overlay.
> > And it indeed breaks, with the culprit being this particular patch.
> >
> > Interestingly, quoting from this patch:
> >
> > "While the commit fixed fw_devlink overlay handling for one case, it
> > broke it for another case. So revert it and redo the fix in a separate
> > patch."
> >
> > Where is the separate patch that redid the fix? I assume it is "[PATCH
> > v4 03/29] of: dynamic: Fix overlayed devices not probing because
> > of fw_devlink"? Unfortunately that doesn't fix the issue for me.
> >
> > Quoting more from this patch:
> >
> > "Closes: https://lore.kernel.org/lkml/CAMuHMdXEnSD4rRJ-o90x4OprUacN_rJgyo8x6=9F9rZ+-KzjOg@mail.gmail.com/"
> >
> > Strange that it claims to fix the issue reported there, as the failure
> > mode I am seeing is exactly the same as documented in that report?
> >
> > Do you know what is wrong? The overlay I am using is referenced in
> > the bug report linked above.
>
> The first patch "Fix probing of devices in DT overlays" didn't fix all cases
> and so Saravana reverted this patch and proposed "of: dynamic: Fix overlayed
> devices not probing because of fw_devlink".
>
> This second patch was needed to fix my use case even if more modification were
> needed to have my use case fully fixed (other patches in my series).
>
> Rob applied those first patches from my series and some systems were broken.
> The breakage has been reported my Kalle and Matti and led to a revert of culprit
> patches.
>
> I tried to understand what was wrong. I am pretty convinced that modification
> done in "of: dynamic: Fix overlayed devices not probing because of fw_devlink"
> are really better than modification available in "treewide: Fix probing of
> devices in DT overlays".
>
> I proposed an update [0] and I will be glad if you can also test this update
> on your side and give me your feedback.
>
> [0] https://lore.kernel.org/lkml/20251202175836.747593c0@bootlin.com/

Thank you!

Unfortunately this does not fix the problem: I still need to do an extra
overlay rm/add cycle to make the SPI EEPROM work.

In addition, it triggers a bunch of new scary error messages:

rcar_sound ec500000.sound: Failed to create device link (0x180) with
supplier soc for /soc/sound@ec500000/rcar_sound,src/src-0
rcar_sound ec500000.sound: Failed to create device link (0x180) with
supplier soc for /soc/sound@ec500000/rcar_sound,src/src-1
[...]
rcar_sound ec500000.sound: Failed to create device link (0x180) with
supplier soc for /soc/sound@ec500000/rcar_sound,src/src-9
rcar_sound ec500000.sound: Failed to create device link (0x180) with
supplier soc for /soc/sound@ec500000/rcar_sound,ssi/ssi-0
rcar_sound ec500000.sound: Failed to create device link (0x180) with
supplier soc for /soc/sound@ec500000/rcar_sound,ssi/ssi-1
[...]
rcar_sound ec500000.sound: Failed to create device link (0x180) with
supplier soc for /soc/sound@ec500000/rcar_sound,ssi/ssi-9
rcar_sound ec500000.sound: Failed to create device link (0x180) with
supplier soc for /soc/sound@ec500000/rcar_sound,src/src-0
rcar_sound ec500000.sound: Failed to create device link (0x180) with
supplier soc for /soc/sound@ec500000/rcar_sound,src/src-1
[...]
rcar_sound ec500000.sound: Failed to create device link (0x180) with
supplier soc for /soc/sound@ec500000/rcar_sound,src/src-9
rcar_sound ec500000.sound: Failed to create device link (0x180) with
supplier soc for /soc/sound@ec500000/rcar_sound,ssi/ssi-0
rcar_sound ec500000.sound: Failed to create device link (0x180) with
supplier soc for /soc/sound@ec500000/rcar_sound,ssi/ssi-1
[...]
rcar_sound ec500000.sound: Failed to create device link (0x180) with
supplier soc for /soc/sound@ec500000/rcar_sound,ssi/ssi-9

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds