From: Michael Trimarchi <michael@amarulasolutions.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2] dm: pinctrl: Skip not associated gpio phandle and rise a warning message
Date: Tue, 17 Sep 2019 22:06:03 +0200 [thread overview]
Message-ID: <20190917200602.GA17528@panicking> (raw)
In-Reply-To: <CAPnjgZ06Uq=7qF_aaKRq7DNhh7KcyP+nqRa1boRhf9t-Cr3Drg@mail.gmail.com>
Skip not associated gpio phandle let register the other gpios on a group.
We need anyway to send out a warning to the user to fix their uboot-board.dtsi.
Thhe handle id can be found inside the decompiled dtb
dtc -I dtb -O dts -o devicetree.dts spl/u-boot-spl.dtb
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
---
V1 -> V2:
- move dev_err to dev_warn
- adjust the commit message
---
drivers/pinctrl/pinctrl-uclass.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-uclass.c b/drivers/pinctrl/pinctrl-uclass.c
index 5b1cd29d86..7d98fbc4ec 100644
--- a/drivers/pinctrl/pinctrl-uclass.c
+++ b/drivers/pinctrl/pinctrl-uclass.c
@@ -91,12 +91,18 @@ static int pinctrl_select_state_full(struct udevice *dev, const char *statename)
phandle = fdt32_to_cpu(*list++);
ret = uclass_get_device_by_phandle_id(UCLASS_PINCONFIG, phandle,
&config);
- if (ret)
- return ret;
+ if (ret) {
+ dev_warn(dev, "%s: uclass_get_device_by_phandle_id: err=%d\n",
+ __func__, ret);
+ continue;
+ }
ret = pinctrl_config_one(config);
- if (ret)
- return ret;
+ if (ret) {
+ dev_warn(dev, "%s: pinctrl_config_one: err=%d\n",
+ __func__, ret);
+ continue;
+ }
}
return 0;
--
2.17.1
next prev parent reply other threads:[~2019-09-17 20:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-15 11:45 [U-Boot] [PATCH] dm: pinctrl: Skip not associated gpio phandle and rise an error message Michael Trimarchi
2019-09-17 5:48 ` Simon Glass
2019-09-17 17:11 ` Michael Nazzareno Trimarchi
2019-09-17 20:06 ` Michael Trimarchi [this message]
2019-09-18 2:27 ` [U-Boot] [PATCH V2] dm: pinctrl: Skip not associated gpio phandle and rise a warning message Simon Glass
2019-09-27 23:28 ` sjg at google.com
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=20190917200602.GA17528@panicking \
--to=michael@amarulasolutions.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox