]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
pinctrl: stmfx: update pincontrol and gpio device name
authorPatrick Delaunay <patrick.delaunay@st.com>
Wed, 28 Oct 2020 09:51:56 +0000 (10:51 +0100)
committerPatrick Delaunay <patrick.delaunay@st.com>
Wed, 25 Nov 2020 11:01:53 +0000 (12:01 +0100)
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>
drivers/pinctrl/pinctrl-stmfx.c

index c2ea82770e6300688fe2d3e33914e46bdc527ae1..b789f3686ccba992008c5d6405af10f7e9477b37 100644 (file)
@@ -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);
 };