diff options
| author | Peng Fan <[email protected]> | 2026-06-04 20:20:33 +0800 |
|---|---|---|
| committer | Peng Fan <[email protected]> | 2026-06-09 23:55:56 +0800 |
| commit | fa3544f39f3882a60338e6c78b06cbf8b0c7bc06 (patch) | |
| tree | d83967bbc0706ee1862f8b9d7606c0de7522c703 | |
| parent | 0c9b8e07fd9a10354d6516852150c60acfec3295 (diff) | |
power: regulator: qcom-rpmh: convert ofnode API to dev_read API
Replace ofnode_read_u32(dev_ofnode(dev), ...) with
dev_read_u32(dev, ...), ofnode_read_string(dev_ofnode(dev), ...) with
dev_read_string(dev, ...), and ofnode_for_each_subnode(node,
dev_ofnode(dev)) with dev_for_each_subnode(node, dev).
No functional change.
Reviewed-by: Casey Connolly <[email protected]>
Signed-off-by: Peng Fan <[email protected]>
| -rw-r--r-- | drivers/power/regulator/qcom-rpmh-regulator.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/power/regulator/qcom-rpmh-regulator.c b/drivers/power/regulator/qcom-rpmh-regulator.c index 4d65aae1690..f1de660c3a0 100644 --- a/drivers/power/regulator/qcom-rpmh-regulator.c +++ b/drivers/power/regulator/qcom-rpmh-regulator.c @@ -5,6 +5,7 @@ #define pr_fmt(fmt) "%s: " fmt, __func__ #include <linux/err.h> +#include <dm.h> #include <dm/device_compat.h> #include <dm/device.h> #include <dm/devres.h> @@ -882,7 +883,7 @@ static int rpmh_regulator_probe(struct udevice *dev) priv->hw_data = init_data->hw_data; priv->enabled = -EINVAL; priv->uv = -ENOTRECOVERABLE; - if (ofnode_read_u32(dev_ofnode(dev), "regulator-initial-mode", &priv->mode)) + if (dev_read_u32(dev, "regulator-initial-mode", &priv->mode)) priv->mode = -EINVAL; plat_data->mode = priv->hw_data->pmic_mode_map; @@ -933,7 +934,7 @@ static int rpmh_regulators_bind(struct udevice *dev) return -ENODEV; } - pmic_id = ofnode_read_string(dev_ofnode(dev), "qcom,pmic-id"); + pmic_id = dev_read_string(dev, "qcom,pmic-id"); if (!pmic_id) { dev_err(dev, "No PMIC ID\n"); return -ENODEV; @@ -941,7 +942,7 @@ static int rpmh_regulators_bind(struct udevice *dev) drv = lists_driver_lookup_name("rpmh_regulator_drm"); - ofnode_for_each_subnode(node, dev_ofnode(dev)) { + dev_for_each_subnode(node, dev) { data = vreg_get_init_data(init_data, node); if (!data) continue; |
