summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@st.com>2020-10-28 10:51:56 +0100
committerPatrick Delaunay <patrick.delaunay@st.com>2020-11-25 12:01:53 +0100
commitc2a8181d453ea85829dceb0a523cda71e29ea27a (patch)
treef03581ecfbdaa9a45407935b3e77a43ea2e3ffb5
parent2c6df94c83425a2230b4bf676ba515525a13b3c8 (diff)
downloadu-boot-c2a8181d453ea85829dceb0a523cda71e29ea27a.tar.gz
pinctrl: stmfx: update pincontrol and gpio device name
The device name is used in pinmux command and in log trace so it is better to use the parent parent name ("stmfx@42" for example) than a generic name ("pinctrl" or "stmfx-gpio") to identify the device instance. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
-rw-r--r--drivers/pinctrl/pinctrl-stmfx.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-stmfx.c b/drivers/pinctrl/pinctrl-stmfx.c
index c2ea82770e..b789f3686c 100644
--- a/drivers/pinctrl/pinctrl-stmfx.c
+++ b/drivers/pinctrl/pinctrl-stmfx.c
@@ -408,8 +408,11 @@ static int stmfx_pinctrl_bind(struct udevice *dev)
{
struct stmfx_pinctrl *plat = dev_get_platdata(dev);
+ /* subnode name is not explicit: use father name */
+ device_set_name(dev, dev->parent->name);
+
return device_bind_driver_to_node(dev->parent,
- "stmfx-gpio", "stmfx-gpio",
+ "stmfx-gpio", dev->parent->name,
dev_ofnode(dev), &plat->gpio);
};