]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
power: regulator: tps6287x: Use dev_read_addr_index()
authorPeng Fan <peng.fan@nxp.com>
Mon, 25 May 2026 07:29:47 +0000 (15:29 +0800)
committerPeng Fan <peng.fan@nxp.com>
Tue, 9 Jun 2026 15:55:56 +0000 (23:55 +0800)
Use dev_read_addr_index() which supports both live device tree and flat DT
backends, avoiding direct dependency on devfdt_* helpers.

No functional changes.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/power/regulator/tps6287x_regulator.c

index 6d185719199daa32eb4eee60add55c816bdb6111..2e6d85f677a77e1feda235772755dd5a7f7cd045 100644 (file)
@@ -141,7 +141,7 @@ static int tps6287x_regulator_probe(struct udevice *dev)
 
        pdata->config = (void *)dev_get_driver_data(dev);
 
-       slave_id = devfdt_get_addr_index(dev, 0);
+       slave_id = dev_read_addr_index(dev, 0);
 
        ret = i2c_get_chip(dev->parent, slave_id, 1, &pdata->i2c);
        if (ret) {