[PATCH 2/3] led: Mark device instance with DM_FLAG_PROBE_AFTER_BIND

Tom Rini trini at konsulko.com
Mon Apr 25 16:31:55 CEST 2022


On Fri, Apr 22, 2022 at 03:15:54PM +0200, Marek Vasut wrote:

> Calling device_probe() from uclass .post_bind() callback has all kinds
> of odd side-effects, e.g. device instances not being available just yet.
> Make use of the DM_FLAG_PROBE_AFTER_BIND instead, mark device instances
> which need to be probe()d in order to configure the LED default state
> with this flag and let the DM core do the device_probe() at the right
> time instead.
> 
> Fixes: 72675b063b6 ("led: Configure LED default-state on boot")
> Signed-off-by: Marek Vasut <marex at denx.de>
> Cc: Patrice Chotard <patrice.chotard at foss.st.com>
> Cc: Patrick Delaunay <patrick.delaunay at foss.st.com>
> Cc: Sean Anderson <seanga2 at gmail.com>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Steven Lawrance <steven.lawrance at softathome.com>
> Reviewed-by: Patrice Chotard <patrice.chotard at foss.st.com>
> Tested-by: Patrice Chotard <patrice.chotard at foss.st.com>
> ---
>  drivers/led/led-uclass.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

This breaks all of the sandbox tests, which perhaps need another update
for what you've changed here?  I already had to tweak them once in 
72675b063b6e ("led: Configure LED default-state on boot").  But my
perhaps incorrect read then was that the dts / test weren't quite right
to start with.  Perhaps that's still the case however?

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20220425/d01be8c3/attachment.sig>


More information about the U-Boot mailing list