mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-04-10 16:31:32 +00:00
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>
This commit is contained in:
parent
c8e251f82a
commit
8558217153
1 changed files with 2 additions and 3 deletions
|
@ -1100,9 +1100,8 @@ int gpio_get_list_count(struct udevice *dev, const char *list_name)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = fdtdec_parse_phandle_with_args(gd->fdt_blob, dev_of_offset(dev),
|
ret = dev_read_phandle_with_args(dev, list_name, "#gpio-cells", 0, -1,
|
||||||
list_name, "#gpio-cells", 0, -1,
|
NULL);
|
||||||
NULL);
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
debug("%s: Node '%s', property '%s', GPIO count failed: %d\n",
|
debug("%s: Node '%s', property '%s', GPIO count failed: %d\n",
|
||||||
__func__, dev->name, list_name, ret);
|
__func__, dev->name, list_name, ret);
|
||||||
|
|
Loading…
Add table
Reference in a new issue