summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@st.com>2020-09-09 18:26:16 +0200
committerTom Rini <trini@konsulko.com>2020-12-01 10:33:37 -0500
commit8558217153df685992573e067bd9f95dd4d2ef3a (patch)
treeed28fa4195583a077862d40a5644aa935dfd54bc /drivers
parentc8e251f82af97562741e51110ed8828a5c5744c6 (diff)
downloadu-boot-8558217153df685992573e067bd9f95dd4d2ef3a.tar.gz
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 <patrick.delaunay@st.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpio/gpio-uclass.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c
index 0c01413b58..4785b6b34a 100644
--- a/drivers/gpio/gpio-uclass.c
+++ b/drivers/gpio/gpio-uclass.c
@@ -1100,9 +1100,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);