summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-04 02:55:21 +0300
committerSimon Glass <sjg@chromium.org>2020-12-14 02:51:09 +0300
commitd1998a9fde0a917d6496299f6a97b6bccfdc6724 (patch)
tree1931d0c875e829620180bf383722c1a69bd1a951 /drivers/power
parentc69cda25c9b59e53a6bc8969ada58942549f5b5d (diff)
downloadu-boot-d1998a9fde0a917d6496299f6a97b6bccfdc6724.tar.xz
dm: treewide: Rename ofdata_to_platdata() to of_to_plat()
This name is far too long. Rename it to remove the 'data' bits. This makes it consistent with the platdata->plat rename. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/domain/imx8-power-domain-legacy.c4
-rw-r--r--drivers/power/domain/imx8m-power-domain.c4
-rw-r--r--drivers/power/pmic/i2c_pmic_emul.c4
-rw-r--r--drivers/power/regulator/fan53555.c4
-rw-r--r--drivers/power/regulator/fixed.c6
-rw-r--r--drivers/power/regulator/gpio-regulator.c6
-rw-r--r--drivers/power/regulator/pbias_regulator.c4
-rw-r--r--drivers/power/regulator/pwm_regulator.c4
-rw-r--r--drivers/power/regulator/regulator_common.c5
-rw-r--r--drivers/power/regulator/regulator_common.h5
-rw-r--r--drivers/power/regulator/tps65910_regulator.c8
11 files changed, 28 insertions, 26 deletions
diff --git a/drivers/power/domain/imx8-power-domain-legacy.c b/drivers/power/domain/imx8-power-domain-legacy.c
index c97dfbb1c2..cf6e068f32 100644
--- a/drivers/power/domain/imx8-power-domain-legacy.c
+++ b/drivers/power/domain/imx8-power-domain-legacy.c
@@ -340,7 +340,7 @@ static int imx8_power_domain_probe(struct udevice *dev)
return 0;
}
-static int imx8_power_domain_ofdata_to_platdata(struct udevice *dev)
+static int imx8_power_domain_of_to_plat(struct udevice *dev)
{
int reg;
struct imx8_power_domain_platdata *pdata = dev_get_plat(dev);
@@ -376,7 +376,7 @@ U_BOOT_DRIVER(imx8_power_domain) = {
.of_match = imx8_power_domain_ids,
.bind = imx8_power_domain_bind,
.probe = imx8_power_domain_probe,
- .ofdata_to_platdata = imx8_power_domain_ofdata_to_platdata,
+ .of_to_plat = imx8_power_domain_of_to_plat,
.plat_auto = sizeof(struct imx8_power_domain_platdata),
.priv_auto = sizeof(struct imx8_power_domain_priv),
.ops = &imx8_power_domain_ops,
diff --git a/drivers/power/domain/imx8m-power-domain.c b/drivers/power/domain/imx8m-power-domain.c
index 1248f937eb..499788967c 100644
--- a/drivers/power/domain/imx8m-power-domain.c
+++ b/drivers/power/domain/imx8m-power-domain.c
@@ -104,7 +104,7 @@ static int imx8m_power_domain_probe(struct udevice *dev)
return 0;
}
-static int imx8m_power_domain_ofdata_to_platdata(struct udevice *dev)
+static int imx8m_power_domain_of_to_plat(struct udevice *dev)
{
struct imx8m_power_domain_platdata *pdata = dev_get_plat(dev);
@@ -136,7 +136,7 @@ U_BOOT_DRIVER(imx8m_power_domain) = {
.of_match = imx8m_power_domain_ids,
.bind = imx8m_power_domain_bind,
.probe = imx8m_power_domain_probe,
- .ofdata_to_platdata = imx8m_power_domain_ofdata_to_platdata,
+ .of_to_plat = imx8m_power_domain_of_to_plat,
.plat_auto = sizeof(struct imx8m_power_domain_platdata),
.ops = &imx8m_power_domain_ops,
};
diff --git a/drivers/power/pmic/i2c_pmic_emul.c b/drivers/power/pmic/i2c_pmic_emul.c
index a85de822b3..abe3a1051f 100644
--- a/drivers/power/pmic/i2c_pmic_emul.c
+++ b/drivers/power/pmic/i2c_pmic_emul.c
@@ -103,7 +103,7 @@ static int sandbox_i2c_pmic_xfer(struct udevice *emul, struct i2c_msg *msg,
return ret;
}
-static int sandbox_i2c_pmic_ofdata_to_platdata(struct udevice *emul)
+static int sandbox_i2c_pmic_of_to_plat(struct udevice *emul)
{
struct sandbox_i2c_pmic_plat_data *plat = dev_get_plat(emul);
struct udevice *pmic_dev = i2c_emul_get_device(emul);
@@ -159,7 +159,7 @@ U_BOOT_DRIVER(sandbox_i2c_pmic_emul) = {
.name = "sandbox_i2c_pmic_emul",
.id = UCLASS_I2C_EMUL,
.of_match = sandbox_i2c_pmic_ids,
- .ofdata_to_platdata = sandbox_i2c_pmic_ofdata_to_platdata,
+ .of_to_plat = sandbox_i2c_pmic_of_to_plat,
.probe = sandbox_i2c_pmic_probe,
.plat_auto = sizeof(struct sandbox_i2c_pmic_plat_data),
.ops = &sandbox_i2c_pmic_emul_ops,
diff --git a/drivers/power/regulator/fan53555.c b/drivers/power/regulator/fan53555.c
index 02a08b58b0..fcd1d5292c 100644
--- a/drivers/power/regulator/fan53555.c
+++ b/drivers/power/regulator/fan53555.c
@@ -100,7 +100,7 @@ struct fan53555_priv {
unsigned int sleep_vol_cache;
};
-static int fan53555_regulator_ofdata_to_platdata(struct udevice *dev)
+static int fan53555_regulator_of_to_plat(struct udevice *dev)
{
struct fan53555_platdata *dev_pdata = dev_get_plat(dev);
struct dm_regulator_uclass_plat *uc_pdata =
@@ -238,7 +238,7 @@ U_BOOT_DRIVER(fan53555_regulator) = {
.name = "fan53555_regulator",
.id = UCLASS_REGULATOR,
.ops = &fan53555_regulator_ops,
- .ofdata_to_platdata = fan53555_regulator_ofdata_to_platdata,
+ .of_to_plat = fan53555_regulator_of_to_plat,
.plat_auto = sizeof(struct fan53555_platdata),
.priv_auto = sizeof(struct fan53555_priv),
.probe = fan53555_probe,
diff --git a/drivers/power/regulator/fixed.c b/drivers/power/regulator/fixed.c
index 4967b7051b..efe2ec9a16 100644
--- a/drivers/power/regulator/fixed.c
+++ b/drivers/power/regulator/fixed.c
@@ -14,7 +14,7 @@
#include "regulator_common.h"
-static int fixed_regulator_ofdata_to_platdata(struct udevice *dev)
+static int fixed_regulator_of_to_plat(struct udevice *dev)
{
struct dm_regulator_uclass_plat *uc_pdata;
struct regulator_common_platdata *dev_pdata;
@@ -26,7 +26,7 @@ static int fixed_regulator_ofdata_to_platdata(struct udevice *dev)
uc_pdata->type = REGULATOR_TYPE_FIXED;
- return regulator_common_ofdata_to_platdata(dev, dev_pdata, "gpio");
+ return regulator_common_of_to_plat(dev, dev_pdata, "gpio");
}
static int fixed_regulator_get_value(struct udevice *dev)
@@ -88,6 +88,6 @@ U_BOOT_DRIVER(regulator_fixed) = {
.id = UCLASS_REGULATOR,
.ops = &fixed_regulator_ops,
.of_match = fixed_regulator_ids,
- .ofdata_to_platdata = fixed_regulator_ofdata_to_platdata,
+ .of_to_plat = fixed_regulator_of_to_plat,
.plat_auto = sizeof(struct regulator_common_platdata),
};
diff --git a/drivers/power/regulator/gpio-regulator.c b/drivers/power/regulator/gpio-regulator.c
index 80a6949e6b..2565c4416a 100644
--- a/drivers/power/regulator/gpio-regulator.c
+++ b/drivers/power/regulator/gpio-regulator.c
@@ -25,7 +25,7 @@ struct gpio_regulator_platdata {
int voltages[GPIO_REGULATOR_MAX_STATES];
};
-static int gpio_regulator_ofdata_to_platdata(struct udevice *dev)
+static int gpio_regulator_of_to_plat(struct udevice *dev)
{
struct dm_regulator_uclass_plat *uc_pdata;
struct gpio_regulator_platdata *dev_pdata;
@@ -74,7 +74,7 @@ static int gpio_regulator_ofdata_to_platdata(struct udevice *dev)
j++;
}
- return regulator_common_ofdata_to_platdata(dev, &dev_pdata->common, "enable-gpios");
+ return regulator_common_of_to_plat(dev, &dev_pdata->common, "enable-gpios");
}
static int gpio_regulator_get_value(struct udevice *dev)
@@ -154,6 +154,6 @@ U_BOOT_DRIVER(gpio_regulator) = {
.id = UCLASS_REGULATOR,
.ops = &gpio_regulator_ops,
.of_match = gpio_regulator_ids,
- .ofdata_to_platdata = gpio_regulator_ofdata_to_platdata,
+ .of_to_plat = gpio_regulator_of_to_plat,
.plat_auto = sizeof(struct gpio_regulator_platdata),
};
diff --git a/drivers/power/regulator/pbias_regulator.c b/drivers/power/regulator/pbias_regulator.c
index c01c19efbe..c3df156749 100644
--- a/drivers/power/regulator/pbias_regulator.c
+++ b/drivers/power/regulator/pbias_regulator.c
@@ -64,7 +64,7 @@ static int pbias_read(struct udevice *dev, uint reg, uint8_t *buff, int len)
return regmap_read(priv->regmap, priv->offset, (u32 *)buff);
}
-static int pbias_ofdata_to_platdata(struct udevice *dev)
+static int pbias_of_to_plat(struct udevice *dev)
{
struct pbias_priv *priv = dev_get_priv(dev);
struct udevice *syscon;
@@ -129,7 +129,7 @@ U_BOOT_DRIVER(pbias_pmic) = {
.of_match = pbias_ids,
.bind = pbias_bind,
.ops = &pbias_ops,
- .ofdata_to_platdata = pbias_ofdata_to_platdata,
+ .of_to_plat = pbias_of_to_plat,
.priv_auto = sizeof(struct pbias_priv),
};
diff --git a/drivers/power/regulator/pwm_regulator.c b/drivers/power/regulator/pwm_regulator.c
index 9435cc3162..18e57db076 100644
--- a/drivers/power/regulator/pwm_regulator.c
+++ b/drivers/power/regulator/pwm_regulator.c
@@ -89,7 +89,7 @@ static int pwm_regulator_set_voltage(struct udevice *dev, int uvolt)
return ret;
}
-static int pwm_regulator_ofdata_to_platdata(struct udevice *dev)
+static int pwm_regulator_of_to_plat(struct udevice *dev)
{
struct pwm_regulator_info *priv = dev_get_priv(dev);
struct ofnode_phandle_args args;
@@ -154,6 +154,6 @@ U_BOOT_DRIVER(pwm_regulator) = {
.ops = &pwm_regulator_ops,
.probe = pwm_regulator_probe,
.of_match = pwm_regulator_ids,
- .ofdata_to_platdata = pwm_regulator_ofdata_to_platdata,
+ .of_to_plat = pwm_regulator_of_to_plat,
.priv_auto = sizeof(struct pwm_regulator_info),
};
diff --git a/drivers/power/regulator/regulator_common.c b/drivers/power/regulator/regulator_common.c
index 13906b9c6e..d307a1948a 100644
--- a/drivers/power/regulator/regulator_common.c
+++ b/drivers/power/regulator/regulator_common.c
@@ -12,8 +12,9 @@
#include "regulator_common.h"
-int regulator_common_ofdata_to_platdata(struct udevice *dev,
- struct regulator_common_platdata *dev_pdata, const char *enable_gpio_name)
+int regulator_common_of_to_plat(struct udevice *dev,
+ struct regulator_common_platdata *dev_pdata,
+ const char *enable_gpio_name)
{
struct gpio_desc *gpio;
int flags = GPIOD_IS_OUT;
diff --git a/drivers/power/regulator/regulator_common.h b/drivers/power/regulator/regulator_common.h
index bf80439c78..5ae0b9aa40 100644
--- a/drivers/power/regulator/regulator_common.h
+++ b/drivers/power/regulator/regulator_common.h
@@ -15,8 +15,9 @@ struct regulator_common_platdata {
unsigned int off_on_delay_us;
};
-int regulator_common_ofdata_to_platdata(struct udevice *dev,
- struct regulator_common_platdata *dev_pdata, const char *enable_gpio_name);
+int regulator_common_of_to_plat(struct udevice *dev,
+ struct regulator_common_platdata *dev_pdata,
+ const char *enable_gpio_name);
int regulator_common_get_enable(const struct udevice *dev,
struct regulator_common_platdata *dev_pdata);
int regulator_common_set_enable(const struct udevice *dev,
diff --git a/drivers/power/regulator/tps65910_regulator.c b/drivers/power/regulator/tps65910_regulator.c
index 9fb13d6a55..0ed4952a1e 100644
--- a/drivers/power/regulator/tps65910_regulator.c
+++ b/drivers/power/regulator/tps65910_regulator.c
@@ -386,7 +386,7 @@ static int tps65910_boost_get_value(struct udevice *dev)
return vout;
}
-static int tps65910_regulator_ofdata_to_platdata(struct udevice *dev)
+static int tps65910_regulator_of_to_plat(struct udevice *dev)
{
struct udevice *supply;
int ret;
@@ -425,7 +425,7 @@ U_BOOT_DRIVER(tps65910_boost) = {
.id = UCLASS_REGULATOR,
.ops = &tps65910_boost_ops,
.plat_auto = sizeof(struct tps65910_regulator_pdata),
- .ofdata_to_platdata = tps65910_regulator_ofdata_to_platdata,
+ .of_to_plat = tps65910_regulator_of_to_plat,
};
static const struct dm_regulator_ops tps65910_buck_ops = {
@@ -440,7 +440,7 @@ U_BOOT_DRIVER(tps65910_buck) = {
.id = UCLASS_REGULATOR,
.ops = &tps65910_buck_ops,
.plat_auto = sizeof(struct tps65910_regulator_pdata),
- .ofdata_to_platdata = tps65910_regulator_ofdata_to_platdata,
+ .of_to_plat = tps65910_regulator_of_to_plat,
};
static const struct dm_regulator_ops tps65910_ldo_ops = {
@@ -455,5 +455,5 @@ U_BOOT_DRIVER(tps65910_ldo) = {
.id = UCLASS_REGULATOR,
.ops = &tps65910_ldo_ops,
.plat_auto = sizeof(struct tps65910_regulator_pdata),
- .ofdata_to_platdata = tps65910_regulator_ofdata_to_platdata,
+ .of_to_plat = tps65910_regulator_of_to_plat,
};