gpio: Convert to use APIs which support live DT
PATCH 1/1 gpio: Convert to use APIs which support live DT
Use ofnode_ or dev_ APIs instead of fdt_ and fdtdec_ APIs so that the driver can support live DT.
Signed-off-by Patrick Delaunay <[email protected]>
---
drivers/gpio/gpio-uclass.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/gpio/gpio-uclass.c +2 -3
@@ -1098,9 +1098,8 @@ int gpio_get_list_count(struct udevice *dev, const char *list_name) {int ret; - ret =fdtdec_parse_phandle_with_args (gd->fdt_blob,dev_of_offset (dev), - list_name,"#gpio-cells" ,0 ,-1 , -NULL ); + ret =dev_read_phandle_with_args (dev, list_name,"#gpio-cells" ,0 ,-1 , +NULL );if (ret) {debug ("%s: Node '%s', property '%s', GPIO count failed: %d\n" , __func__, dev->name, list_name, ret);
Signature · 1 line
2.17.1
PATCH 1/1 gpio: Convert to use APIs which support live DT
Quoted 9 lines · Patrick Delaunay
Use
ofnode_ordev_APIs instead offdt_andfdtdec_APIs so that the driver can support live DT.Signed-off-by Patrick Delaunay <[email protected]>---
drivers/gpio/gpio-uclass.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
Reviewed-by Simon Glass <[email protected]>
PATCH 1/1 gpio: Convert to use APIs which support live DT
In reply to Patrick DelaunayHello Patrick,
Am 09.09.2020 um 18:26 schrieb Patrick Delaunay:
Quoted 8 lines
Use
ofnode_ordev_APIs instead offdt_andfdtdec_APIs so that the driver can support live DT.Signed-off-by Patrick Delaunay <[email protected]>---
drivers/gpio/gpio-uclass.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
Reviewed-by Heiko Schocher <[email protected]>
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de
PATCH 1/1 gpio: Convert to use APIs which support live DT
In reply to Patrick DelaunayQuoted 6 lines · Patrick Delaunay
Use
ofnode_ordev_APIs instead offdt_andfdtdec_APIs so that the driver can support live DT.Signed-off-by Patrick Delaunay <[email protected]>Reviewed-by Simon Glass <[email protected]>Reviewed-by Heiko Schocher <[email protected]>
Applied to u-boot/next, 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/20201202/dc08f6f6/attachment.sig>