All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Delaunay <patrick.delaunay@st.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 2/5] Revert "dm: led: auto probe() LEDs with "default-state""
Date: Tue, 24 Jul 2018 10:58:29 +0200	[thread overview]
Message-ID: <1532422712-15107-3-git-send-email-patrick.delaunay@st.com> (raw)
In-Reply-To: <1532422712-15107-1-git-send-email-patrick.delaunay@st.com>

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>
---

Changes in v3:
- add motivation in revert commit

Changes in v2: None

 drivers/led/led_gpio.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/led/led_gpio.c b/drivers/led/led_gpio.c
index a36942b..533587d 100644
--- a/drivers/led/led_gpio.c
+++ b/drivers/led/led_gpio.c
@@ -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;
-- 
2.7.4

  parent reply	other threads:[~2018-07-24  8:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-24  8:58 [U-Boot] [PATCH v3 0/5] dm: led: remove auto probe in binding function Patrick Delaunay
2018-07-24  8:58 ` [U-Boot] [PATCH v3 1/5] stm32mp1: add gpio led support Patrick Delaunay
2018-07-24  8:58 ` Patrick Delaunay [this message]
2018-07-25  2:45   ` [U-Boot] [PATCH v3 2/5] Revert "dm: led: auto probe() LEDs with "default-state"" Simon Glass
2018-07-24  8:58 ` [U-Boot] [PATCH v3 3/5] dm: led: move default state support in led uclass Patrick Delaunay
2018-07-26 10:39   ` Patrick Brünn
2018-07-27 14:13     ` Patrick DELAUNAY
2018-07-24  8:58 ` [U-Boot] [PATCH v3 4/5] stm32mp1: use new function led default state Patrick Delaunay
2018-07-24  8:58 ` [U-Boot] [PATCH v3 5/5] sandbox: led: use new function to configure " Patrick Delaunay
2018-07-26 10:45   ` Patrick Brünn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1532422712-15107-3-git-send-email-patrick.delaunay@st.com \
    --to=patrick.delaunay@st.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.