Commit dbfd9e0e authored by Lokesh Vutla's avatar Lokesh Vutla Committed by Tom Rini
Browse files

dm: pinctrl: Use right device pointer for configuring pinctrl

commit 719cab6d ("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: 719cab6d

 ("dm: pinctrl: convert pinctrl-single to livetree")
Reported-by: Tom Rini's avatarTom Rini <trini@konsulko.com>
Reviewed-by: Patrick Delaunay's avatarPatrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Lokesh Vutla's avatarLokesh Vutla <lokeshvutla@ti.com>
parent a5f9b8a8
Pipeline #2890 passed with stages
in 60 minutes and 24 seconds
......@@ -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)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment