All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dm: pinctrl: Use right device pointer for configuring pinctrl
@ 2020-04-22 17:25 Lokesh Vutla
  2020-04-22 17:29 ` Tom Rini
  2020-04-23  7:49 ` Patrick DELAUNAY
  0 siblings, 2 replies; 4+ messages in thread
From: Lokesh Vutla @ 2020-04-22 17:25 UTC (permalink / raw)
  To: u-boot

commit 719cab6d2e2bf ("dm: pinctrl: convert pinctrl-single to livetree")
converted pinctrl driver to livetree. In this conversion, the call to
read pinctrl-single,pins/bits property is provided with pinctrl device
pointer instead of pinctrl config pointer. Because of this none of the
pins gets configured. Fix it by passing the right udevice pointer.

Fixes: 719cab6d2e2bf ("dm: pinctrl: convert pinctrl-single to livetree")
Reported-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
 drivers/pinctrl/pinctrl-single.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index a5d1ff0e97..738f5bd636 100644
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -120,7 +120,7 @@ static int single_set_state(struct udevice *dev,
 	const struct single_fdt_bits_cfg *prop_bits;
 	int len;
 
-	prop = dev_read_prop(dev, "pinctrl-single,pins", &len);
+	prop = dev_read_prop(config, "pinctrl-single,pins", &len);
 
 	if (prop) {
 		dev_dbg(dev, "configuring pins for %s\n", config->name);
@@ -133,7 +133,7 @@ static int single_set_state(struct udevice *dev,
 	}
 
 	/* pinctrl-single,pins not found so check for pinctrl-single,bits */
-	prop_bits = dev_read_prop(dev, "pinctrl-single,bits", &len);
+	prop_bits = dev_read_prop(config, "pinctrl-single,bits", &len);
 	if (prop_bits) {
 		dev_dbg(dev, "configuring pins for %s\n", config->name);
 		if (len % sizeof(struct single_fdt_bits_cfg)) {
-- 
2.23.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] dm: pinctrl: Use right device pointer for configuring pinctrl
  2020-04-22 17:25 [PATCH] dm: pinctrl: Use right device pointer for configuring pinctrl Lokesh Vutla
@ 2020-04-22 17:29 ` Tom Rini
  2020-04-23  7:49 ` Patrick DELAUNAY
  1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2020-04-22 17:29 UTC (permalink / raw)
  To: u-boot

On Wed, Apr 22, 2020 at 10:55:31PM +0530, Lokesh Vutla wrote:

> commit 719cab6d2e2bf ("dm: pinctrl: convert pinctrl-single to livetree")
> converted pinctrl driver to livetree. In this conversion, the call to
> read pinctrl-single,pins/bits property is provided with pinctrl device
> pointer instead of pinctrl config pointer. Because of this none of the
> pins gets configured. Fix it by passing the right udevice pointer.
> 
> Fixes: 719cab6d2e2bf ("dm: pinctrl: convert pinctrl-single to livetree")
> Reported-by: Tom Rini <trini@konsulko.com>
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>

Thanks for the quick turn-around!

Tested-by: Tom Rini <trini@konsulko.com> [am65x_evm_a53 / am65x_evm_r5]

I'll pick this up soon to give others a chance to comment.

-- 
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/20200422/12fb57a3/attachment.sig>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] dm: pinctrl: Use right device pointer for configuring pinctrl
  2020-04-22 17:25 [PATCH] dm: pinctrl: Use right device pointer for configuring pinctrl Lokesh Vutla
  2020-04-22 17:29 ` Tom Rini
@ 2020-04-23  7:49 ` Patrick DELAUNAY
  2020-04-23 20:50   ` Tom Rini
  1 sibling, 1 reply; 4+ messages in thread
From: Patrick DELAUNAY @ 2020-04-23  7:49 UTC (permalink / raw)
  To: u-boot

Hi,

> From: Lokesh Vutla <lokeshvutla@ti.com>
> Sent: mercredi 22 avril 2020 19:26
> 
> commit 719cab6d2e2bf ("dm: pinctrl: convert pinctrl-single to livetree") converted
> pinctrl driver to livetree. In this conversion, the call to read pinctrl-single,pins/bits
> property is provided with pinctrl device pointer instead of pinctrl config pointer.
> Because of this none of the pins gets configured. Fix it by passing the right
> udevice pointer.
> 
> Fixes: 719cab6d2e2bf ("dm: pinctrl: convert pinctrl-single to livetree")
> Reported-by: Tom Rini <trini@konsulko.com>
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> ---
>  drivers/pinctrl/pinctrl-single.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

Sorry for regression...

Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>

And thanks for the fixe

Patrick

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] dm: pinctrl: Use right device pointer for configuring pinctrl
  2020-04-23  7:49 ` Patrick DELAUNAY
@ 2020-04-23 20:50   ` Tom Rini
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2020-04-23 20:50 UTC (permalink / raw)
  To: u-boot

On Thu, Apr 23, 2020 at 07:49:36AM +0000, Patrick DELAUNAY wrote:
> Hi,
> 
> > From: Lokesh Vutla <lokeshvutla@ti.com>
> > Sent: mercredi 22 avril 2020 19:26
> > 
> > commit 719cab6d2e2bf ("dm: pinctrl: convert pinctrl-single to livetree") converted
> > pinctrl driver to livetree. In this conversion, the call to read pinctrl-single,pins/bits
> > property is provided with pinctrl device pointer instead of pinctrl config pointer.
> > Because of this none of the pins gets configured. Fix it by passing the right
> > udevice pointer.
> > 
> > Fixes: 719cab6d2e2bf ("dm: pinctrl: convert pinctrl-single to livetree")
> > Reported-by: Tom Rini <trini@konsulko.com>
> > Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> > ---
> >  drivers/pinctrl/pinctrl-single.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> 
> Sorry for regression...
> 
> Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>

Applied to u-boot/master, thanks!

-- 
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/20200423/29da57c0/attachment-0001.sig>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-04-23 20:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-22 17:25 [PATCH] dm: pinctrl: Use right device pointer for configuring pinctrl Lokesh Vutla
2020-04-22 17:29 ` Tom Rini
2020-04-23  7:49 ` Patrick DELAUNAY
2020-04-23 20:50   ` Tom Rini

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.