On 4/25/22 16:31, Tom Rini wrote:
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 <[email protected]> Cc: Patrice Chotard <[email protected]> Cc: Patrick Delaunay <[email protected]> Cc: Sean Anderson <[email protected]> Cc: Simon Glass <[email protected]> Cc: Steven Lawrance <[email protected]> Reviewed-by: Patrice Chotard <[email protected]> Tested-by: Patrice Chotard <[email protected]> --- 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?
Pick these two test fixes: [PATCH 1/2] test: dm: led: Fix LED enumeration [PATCH 2/2] test: dm: pinmux: Get LED2 udevice in the pinmux test

