gpio: imx_rgpio2p: Use dev_read_addr_index

Use dev_read_addr_index which supports livetree API, otherwise driver
will fail to get addr when OF_LIVE is enabled.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
Peng Fan
2026-06-26 17:06:54 -03:00
committed by Fabio Estevam
parent b4610c7177
commit 8db4311b4b
+2 -2
View File
@@ -194,11 +194,11 @@ static int imx_rgpio2p_bind(struct udevice *dev)
dual_base = true;
if (dual_base) {
addr = devfdt_get_addr_index(dev, 1);
addr = dev_read_addr_index(dev, 1);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
} else {
addr = devfdt_get_addr_index(dev, 0);
addr = dev_read_addr_index(dev, 0);
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;