Revert "dm: led: auto probe() LEDs with "default-state""
authorPatrick Delaunay <patrick.delaunay@st.com>
Fri, 27 Jul 2018 14:37:06 +0000 (16:37 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 10 Aug 2018 14:27:32 +0000 (10:27 -0400)
This reverts commit bc882f5d5c7b4d6ed5e927bf838863af43c786e7.
because this patch adds the probe of LED driver during the
binding phasis. It is not allowed in driver model because
the drivers (clock, pincontrol) needed by the LED driver can
be also probed before the binding of all the device and
it is a source of problems.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
drivers/led/led_gpio.c

index a36942b9348bdad938f8478cd91be17931dab499..533587dc47434b12e1ef4477b51d73a53f8f8b98 100644 (file)
@@ -10,7 +10,6 @@
 #include <led.h>
 #include <asm/gpio.h>
 #include <dm/lists.h>
-#include <dm/uclass-internal.h>
 
 struct led_gpio_priv {
        struct gpio_desc gpio;
@@ -118,14 +117,6 @@ static int led_gpio_bind(struct udevice *parent)
                        return ret;
                uc_plat = dev_get_uclass_platdata(dev);
                uc_plat->label = label;
-
-               if (ofnode_read_bool(node, "default-state")) {
-                       struct udevice *devp;
-
-                       ret = uclass_get_device_tail(dev, 0, &devp);
-                       if (ret)
-                               return ret;
-               }
        }
 
        return 0;