Skip to contentSkip to conversation

dm: pinctrl: Use right device pointer for configuring pinctrl

PATCH New Lokesh Vutla 3 participants 4 messages Apr 22, 2020 – Apr 23, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dm: pinctrl: Use right device pointer for configuring pinctrl

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")
---
 drivers/pinctrl/pinctrl-single.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pinctrl/pinctrl-single.c +2 -2
index a5d1ff0e97..738f5bd636 100644
@@ -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)) {
Signature · 1 line
2.23.0
#1 lore raw

PATCH 1/1 dm: pinctrl: Use right device pointer for configuring pinctrl

Quoted 9 lines · Lokesh Vutla

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

Thanks for the quick turn-around!

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

Signature · 8 lines
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>
#2 lore raw

PATCH 1/1 dm: pinctrl: Use right device pointer for configuring pinctrl

In reply to Lokesh Vutla

Hi,

Quoted 9 lines

From: Lokesh Vutla <[email protected]>
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.

Quoted 7 lines
Fixes 719cab6d2e2bf ("dm: pinctrl: convert pinctrl-single to livetree")
---
 drivers/pinctrl/pinctrl-single.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Sorry for regression...

And thanks for the fixe

Patrick

#3 lore raw

PATCH 1/1 dm: pinctrl: Use right device pointer for configuring pinctrl

Quoted 19 lines · Patrick DELAUNAY

Hi,

Quoted 9 lines

From: Lokesh Vutla <[email protected]>
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.

Quoted 7 lines
Fixes 719cab6d2e2bf ("dm: pinctrl: convert pinctrl-single to livetree")
---
 drivers/pinctrl/pinctrl-single.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 3 lines

Sorry for regression...

Applied to u-boot/master, thanks!

Signature · 8 lines
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>