dm: treewide: Rename 'platdata' variables to just 'plat'
We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).
Rename some of the latter variables to end with 'plat' for consistency.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/drivers/power/acpi_pmc/pmc_emul.c b/drivers/power/acpi_pmc/pmc_emul.c
index 6872430..9ce8c16 100644
--- a/drivers/power/acpi_pmc/pmc_emul.c
+++ b/drivers/power/acpi_pmc/pmc_emul.c
@@ -236,7 +236,7 @@
.ops = &sandbox_pmc_emul_emul_ops,
.probe = sandbox_pmc_probe,
.priv_auto = sizeof(struct pmc_emul_priv),
- .platdata_auto = sizeof(struct pmc_emul_platdata),
+ .plat_auto = sizeof(struct pmc_emul_platdata),
};
static struct pci_device_id sandbox_pmc_emul_supported[] = {
diff --git a/drivers/power/domain/imx8-power-domain-legacy.c b/drivers/power/domain/imx8-power-domain-legacy.c
index 33dd4cc..ed88fd7 100644
--- a/drivers/power/domain/imx8-power-domain-legacy.c
+++ b/drivers/power/domain/imx8-power-domain-legacy.c
@@ -377,7 +377,7 @@
.bind = imx8_power_domain_bind,
.probe = imx8_power_domain_probe,
.ofdata_to_platdata = imx8_power_domain_ofdata_to_platdata,
- .platdata_auto = sizeof(struct imx8_power_domain_platdata),
+ .plat_auto = sizeof(struct imx8_power_domain_platdata),
.priv_auto = sizeof(struct imx8_power_domain_priv),
.ops = &imx8_power_domain_ops,
.flags = DM_FLAG_DEFAULT_PD_CTRL_OFF,
diff --git a/drivers/power/domain/imx8m-power-domain.c b/drivers/power/domain/imx8m-power-domain.c
index 3736019..7e2d232 100644
--- a/drivers/power/domain/imx8m-power-domain.c
+++ b/drivers/power/domain/imx8m-power-domain.c
@@ -137,6 +137,6 @@
.bind = imx8m_power_domain_bind,
.probe = imx8m_power_domain_probe,
.ofdata_to_platdata = imx8m_power_domain_ofdata_to_platdata,
- .platdata_auto = sizeof(struct imx8m_power_domain_platdata),
+ .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 633ad15..168b8a5 100644
--- a/drivers/power/pmic/i2c_pmic_emul.c
+++ b/drivers/power/pmic/i2c_pmic_emul.c
@@ -161,6 +161,6 @@
.of_match = sandbox_i2c_pmic_ids,
.ofdata_to_platdata = sandbox_i2c_pmic_ofdata_to_platdata,
.probe = sandbox_i2c_pmic_probe,
- .platdata_auto = sizeof(struct sandbox_i2c_pmic_plat_data),
+ .plat_auto = sizeof(struct sandbox_i2c_pmic_plat_data),
.ops = &sandbox_i2c_pmic_emul_ops,
};
diff --git a/drivers/power/regulator/act8846.c b/drivers/power/regulator/act8846.c
index 1783813..bdce973 100644
--- a/drivers/power/regulator/act8846.c
+++ b/drivers/power/regulator/act8846.c
@@ -128,10 +128,10 @@
static int act8846_reg_probe(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
int reg = dev->driver_data;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
uc_pdata->type = reg <= 4 ? REGULATOR_TYPE_BUCK : REGULATOR_TYPE_LDO;
uc_pdata->mode_count = 0;
diff --git a/drivers/power/regulator/as3722_regulator.c b/drivers/power/regulator/as3722_regulator.c
index 0fee9bf..ec0776b 100644
--- a/drivers/power/regulator/as3722_regulator.c
+++ b/drivers/power/regulator/as3722_regulator.c
@@ -114,9 +114,9 @@
static int as3722_stepdown_probe(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
uc_pdata->type = REGULATOR_TYPE_BUCK;
@@ -125,9 +125,9 @@
static int as3722_ldo_probe(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
uc_pdata->type = REGULATOR_TYPE_LDO;
diff --git a/drivers/power/regulator/bd71837.c b/drivers/power/regulator/bd71837.c
index ba32f59..c9d966fd 100644
--- a/drivers/power/regulator/bd71837.c
+++ b/drivers/power/regulator/bd71837.c
@@ -401,7 +401,7 @@
{
struct bd71837_platdata *plat = dev_get_platdata(dev);
int i, ret;
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
int type;
struct bd71837_platdata *init_data;
int data_amnt;
@@ -433,7 +433,7 @@
* the initial state matches dt flags and then
* write the SEL bit
*/
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
ret = bd71837_set_enable(dev,
!!(uc_pdata->boot_on ||
uc_pdata->always_on));
@@ -466,5 +466,5 @@
.id = UCLASS_REGULATOR,
.ops = &bd71837_regulator_ops,
.probe = bd71837_regulator_probe,
- .platdata_auto = sizeof(struct bd71837_platdata),
+ .plat_auto = sizeof(struct bd71837_platdata),
};
diff --git a/drivers/power/regulator/da9063.c b/drivers/power/regulator/da9063.c
index 4ff7f39..32be59e 100644
--- a/drivers/power/regulator/da9063.c
+++ b/drivers/power/regulator/da9063.c
@@ -309,7 +309,7 @@
static int da9063_ldo_probe(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
struct da9063_priv *priv = dev->priv;
/* LDOs are named numerically in DT so can directly index */
@@ -318,7 +318,7 @@
return -EINVAL;
priv->reg_info = &da9063_ldo_info[dev->driver_data - 1];
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
uc_pdata->type = REGULATOR_TYPE_LDO;
uc_pdata->mode = da9063_ldo_modes;
uc_pdata->mode_count = ARRAY_SIZE(da9063_ldo_modes);
@@ -328,7 +328,7 @@
static int da9063_buck_probe(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
struct da9063_priv *priv = dev->priv;
int i;
@@ -344,7 +344,7 @@
if (!priv->reg_info)
return -ENODEV;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
uc_pdata->type = REGULATOR_TYPE_BUCK;
uc_pdata->mode = da9063_buck_modes;
uc_pdata->mode_count = ARRAY_SIZE(da9063_buck_modes);
diff --git a/drivers/power/regulator/fan53555.c b/drivers/power/regulator/fan53555.c
index 70aeef7..709cc63 100644
--- a/drivers/power/regulator/fan53555.c
+++ b/drivers/power/regulator/fan53555.c
@@ -103,8 +103,8 @@
static int fan53555_regulator_ofdata_to_platdata(struct udevice *dev)
{
struct fan53555_platdata *dev_pdata = dev_get_platdata(dev);
- struct dm_regulator_uclass_platdata *uc_pdata =
- dev_get_uclass_platdata(dev);
+ struct dm_regulator_uclass_plat *uc_pdata =
+ dev_get_uclass_plat(dev);
u32 sleep_vsel;
/* This is a buck regulator */
@@ -239,7 +239,7 @@
.id = UCLASS_REGULATOR,
.ops = &fan53555_regulator_ops,
.ofdata_to_platdata = fan53555_regulator_ofdata_to_platdata,
- .platdata_auto = sizeof(struct fan53555_platdata),
+ .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 d887c87..ed27ffc 100644
--- a/drivers/power/regulator/fixed.c
+++ b/drivers/power/regulator/fixed.c
@@ -16,11 +16,11 @@
static int fixed_regulator_ofdata_to_platdata(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
struct regulator_common_platdata *dev_pdata;
dev_pdata = dev_get_platdata(dev);
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
if (!uc_pdata)
return -ENXIO;
@@ -31,9 +31,9 @@
static int fixed_regulator_get_value(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
if (!uc_pdata)
return -ENXIO;
@@ -47,9 +47,9 @@
static int fixed_regulator_get_current(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
if (!uc_pdata)
return -ENXIO;
@@ -89,5 +89,5 @@
.ops = &fixed_regulator_ops,
.of_match = fixed_regulator_ids,
.ofdata_to_platdata = fixed_regulator_ofdata_to_platdata,
- .platdata_auto = sizeof(struct regulator_common_platdata),
+ .plat_auto = sizeof(struct regulator_common_platdata),
};
diff --git a/drivers/power/regulator/gpio-regulator.c b/drivers/power/regulator/gpio-regulator.c
index d5998f1..39b0f08 100644
--- a/drivers/power/regulator/gpio-regulator.c
+++ b/drivers/power/regulator/gpio-regulator.c
@@ -27,14 +27,14 @@
static int gpio_regulator_ofdata_to_platdata(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
struct gpio_regulator_platdata *dev_pdata;
struct gpio_desc *gpio;
int ret, count, i, j;
u32 states_array[GPIO_REGULATOR_MAX_STATES * 2];
dev_pdata = dev_get_platdata(dev);
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
if (!uc_pdata)
return -ENXIO;
@@ -79,14 +79,14 @@
static int gpio_regulator_get_value(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
struct gpio_regulator_platdata *dev_pdata = dev_get_platdata(dev);
int enable;
if (!dev_pdata->gpio.dev)
return -ENOSYS;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
if (uc_pdata->min_uV > uc_pdata->max_uV) {
debug("Invalid constraints for: %s\n", uc_pdata->name);
return -EINVAL;
@@ -155,5 +155,5 @@
.ops = &gpio_regulator_ops,
.of_match = gpio_regulator_ids,
.ofdata_to_platdata = gpio_regulator_ofdata_to_platdata,
- .platdata_auto = sizeof(struct gpio_regulator_platdata),
+ .plat_auto = sizeof(struct gpio_regulator_platdata),
};
diff --git a/drivers/power/regulator/lp873x_regulator.c b/drivers/power/regulator/lp873x_regulator.c
index 5b73f54..ec1037d 100644
--- a/drivers/power/regulator/lp873x_regulator.c
+++ b/drivers/power/regulator/lp873x_regulator.c
@@ -24,9 +24,9 @@
{
int ret;
unsigned int adr;
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
adr = uc_pdata->ctrl_reg;
ret = pmic_reg_read(dev->parent, adr);
@@ -87,9 +87,9 @@
{
unsigned int hex, adr;
int ret;
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
if (op == PMIC_OP_GET)
*uV = 0;
@@ -126,9 +126,9 @@
{
int ret;
unsigned int adr;
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
adr = uc_pdata->ctrl_reg;
ret = pmic_reg_read(dev->parent, adr);
@@ -182,12 +182,12 @@
unsigned int hex, adr;
int ret;
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
if (op == PMIC_OP_GET)
*uV = 0;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
adr = uc_pdata->volt_reg;
@@ -219,9 +219,9 @@
static int lp873x_ldo_probe(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
uc_pdata->type = REGULATOR_TYPE_LDO;
int idx = dev->driver_data;
@@ -272,10 +272,10 @@
static int lp873x_buck_probe(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
int idx;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
uc_pdata->type = REGULATOR_TYPE_BUCK;
idx = dev->driver_data;
diff --git a/drivers/power/regulator/lp87565_regulator.c b/drivers/power/regulator/lp87565_regulator.c
index 4ea6c34..7214dc1 100644
--- a/drivers/power/regulator/lp87565_regulator.c
+++ b/drivers/power/regulator/lp87565_regulator.c
@@ -23,9 +23,9 @@
{
int ret;
unsigned int adr;
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
adr = uc_pdata->ctrl_reg;
ret = pmic_reg_read(dev->parent, adr);
@@ -86,9 +86,9 @@
{
unsigned int hex, adr;
int ret;
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
if (op == PMIC_OP_GET)
*uV = 0;
@@ -123,10 +123,10 @@
static int lp87565_buck_probe(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
int idx;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
uc_pdata->type = REGULATOR_TYPE_BUCK;
idx = dev->driver_data;
diff --git a/drivers/power/regulator/max77686.c b/drivers/power/regulator/max77686.c
index 752dc88..f05d791 100644
--- a/drivers/power/regulator/max77686.c
+++ b/drivers/power/regulator/max77686.c
@@ -657,9 +657,9 @@
static int max77686_ldo_probe(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
uc_pdata->type = REGULATOR_TYPE_LDO;
uc_pdata->mode_count = max77686_ldo_modes(dev->driver_data,
@@ -721,9 +721,9 @@
static int max77686_buck_probe(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
uc_pdata->type = REGULATOR_TYPE_BUCK;
uc_pdata->mode_count = max77686_buck_modes(dev->driver_data,
diff --git a/drivers/power/regulator/palmas_regulator.c b/drivers/power/regulator/palmas_regulator.c
index 78909f7..aaa5f3c 100644
--- a/drivers/power/regulator/palmas_regulator.c
+++ b/drivers/power/regulator/palmas_regulator.c
@@ -51,9 +51,9 @@
{
int ret;
unsigned int adr;
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
adr = uc_pdata->ctrl_reg;
ret = pmic_reg_read(dev->parent, adr);
@@ -120,9 +120,9 @@
unsigned int hex, adr;
int ret;
bool range;
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
if (op == PMIC_OP_GET)
*uV = 0;
@@ -163,7 +163,7 @@
static int palmas_ldo_bypass_enable(struct udevice *dev, bool enabled)
{
int type = dev_get_driver_data(dev_get_parent(dev));
- struct dm_regulator_uclass_platdata *p;
+ struct dm_regulator_uclass_plat *p;
unsigned int adr;
int reg;
@@ -177,7 +177,7 @@
return -ENOTSUPP;
}
- p = dev_get_uclass_platdata(dev);
+ p = dev_get_uclass_plat(dev);
adr = p->ctrl_reg;
reg = pmic_reg_read(dev->parent, adr);
@@ -196,9 +196,9 @@
{
int ret;
unsigned int adr;
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
adr = uc_pdata->ctrl_reg;
ret = pmic_reg_read(dev->parent, adr);
@@ -256,12 +256,12 @@
unsigned int hex, adr;
int ret;
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
if (op == PMIC_OP_GET)
*uV = 0;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
adr = uc_pdata->volt_reg;
@@ -292,10 +292,10 @@
static int palmas_ldo_probe(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
struct udevice *parent;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
parent = dev_get_parent(dev);
int type = dev_get_driver_data(parent);
@@ -356,11 +356,11 @@
static int palmas_smps_probe(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
struct udevice *parent;
int idx;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
parent = dev_get_parent(dev);
int type = dev_get_driver_data(parent);
diff --git a/drivers/power/regulator/pbias_regulator.c b/drivers/power/regulator/pbias_regulator.c
index dc944c9..c01c19e 100644
--- a/drivers/power/regulator/pbias_regulator.c
+++ b/drivers/power/regulator/pbias_regulator.c
@@ -179,9 +179,9 @@
static int pbias_regulator_probe(struct udevice *dev)
{
const struct pbias_reg_info **p = pbias_reg_infos;
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
while (*p) {
int rc;
diff --git a/drivers/power/regulator/pfuze100.c b/drivers/power/regulator/pfuze100.c
index 8dc517f..ebf355c 100644
--- a/drivers/power/regulator/pfuze100.c
+++ b/drivers/power/regulator/pfuze100.c
@@ -260,7 +260,7 @@
static int pfuze100_regulator_probe(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
struct pfuze100_regulator_platdata *plat = dev_get_platdata(dev);
struct pfuze100_regulator_desc *desc;
@@ -290,7 +290,7 @@
}
plat->desc = desc;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
uc_pdata->type = desc->type;
if (uc_pdata->type == REGULATOR_TYPE_BUCK) {
@@ -386,8 +386,8 @@
{
int val;
int ret, on_off;
- struct dm_regulator_uclass_platdata *uc_pdata =
- dev_get_uclass_platdata(dev);
+ struct dm_regulator_uclass_plat *uc_pdata =
+ dev_get_uclass_plat(dev);
if (op == PMIC_OP_GET) {
if (!strcmp(dev->name, "vrefddr")) {
@@ -451,8 +451,8 @@
int val;
struct pfuze100_regulator_platdata *plat = dev_get_platdata(dev);
struct pfuze100_regulator_desc *desc = plat->desc;
- struct dm_regulator_uclass_platdata *uc_pdata =
- dev_get_uclass_platdata(dev);
+ struct dm_regulator_uclass_plat *uc_pdata =
+ dev_get_uclass_plat(dev);
if (op == PMIC_OP_GET) {
*uV = 0;
@@ -572,5 +572,5 @@
.id = UCLASS_REGULATOR,
.ops = &pfuze100_regulator_ops,
.probe = pfuze100_regulator_probe,
- .platdata_auto = sizeof(struct pfuze100_regulator_platdata),
+ .plat_auto = sizeof(struct pfuze100_regulator_platdata),
};
diff --git a/drivers/power/regulator/pwm_regulator.c b/drivers/power/regulator/pwm_regulator.c
index ebd09e7..9435cc3 100644
--- a/drivers/power/regulator/pwm_regulator.c
+++ b/drivers/power/regulator/pwm_regulator.c
@@ -122,9 +122,9 @@
static int pwm_regulator_probe(struct udevice *dev)
{
struct pwm_regulator_info *priv = dev_get_priv(dev);
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
uc_pdata->type = REGULATOR_TYPE_BUCK;
uc_pdata->mode_count = 0;
diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/regulator/regulator-uclass.c
index 6192406..7267a89 100644
--- a/drivers/power/regulator/regulator-uclass.c
+++ b/drivers/power/regulator/regulator-uclass.c
@@ -15,11 +15,11 @@
int regulator_mode(struct udevice *dev, struct dm_regulator_mode **modep)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
*modep = NULL;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
if (!uc_pdata)
return -ENXIO;
@@ -51,10 +51,10 @@
int regulator_set_value(struct udevice *dev, int uV)
{
const struct dm_regulator_ops *ops = dev_get_driver_ops(dev);
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
int ret, old_uV = uV, is_enabled = 0;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
if (uc_pdata->min_uV != -ENODATA && uV < uc_pdata->min_uV)
return -EINVAL;
if (uc_pdata->max_uV != -ENODATA && uV > uc_pdata->max_uV)
@@ -82,9 +82,9 @@
int regulator_set_suspend_value(struct udevice *dev, int uV)
{
const struct dm_regulator_ops *ops = dev_get_driver_ops(dev);
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
if (uc_pdata->min_uV != -ENODATA && uV < uc_pdata->min_uV)
return -EINVAL;
if (uc_pdata->max_uV != -ENODATA && uV > uc_pdata->max_uV)
@@ -133,9 +133,9 @@
int regulator_set_current(struct udevice *dev, int uA)
{
const struct dm_regulator_ops *ops = dev_get_driver_ops(dev);
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
if (uc_pdata->min_uA != -ENODATA && uA < uc_pdata->min_uA)
return -EINVAL;
if (uc_pdata->max_uA != -ENODATA && uA > uc_pdata->max_uA)
@@ -160,13 +160,13 @@
int regulator_set_enable(struct udevice *dev, bool enable)
{
const struct dm_regulator_ops *ops = dev_get_driver_ops(dev);
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
int ret, old_enable = 0;
if (!ops || !ops->set_enable)
return -ENOSYS;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
if (!enable && uc_pdata->always_on)
return -EACCES;
@@ -241,7 +241,7 @@
int regulator_get_by_platname(const char *plat_name, struct udevice **devp)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
struct udevice *dev;
int ret;
@@ -254,7 +254,7 @@
continue;
}
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
if (!uc_pdata || strcmp(plat_name, uc_pdata->name))
continue;
@@ -280,10 +280,10 @@
int regulator_autoset(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
int ret = 0;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
ret = regulator_set_suspend_enable(dev, uc_pdata->suspend_on);
if (!ret && uc_pdata->suspend_on) {
@@ -313,9 +313,9 @@
static void regulator_show(struct udevice *dev, int ret)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
printf("%s@%s: ", dev->name, uc_pdata->name);
if (uc_pdata->flags & REGULATOR_FLAG_AUTOSET_UV)
@@ -370,7 +370,7 @@
static bool regulator_name_is_unique(struct udevice *check_dev,
const char *check_name)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
struct udevice *dev;
int check_len = strlen(check_name);
int ret;
@@ -381,7 +381,7 @@
if (ret || dev == check_dev)
continue;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
len = strlen(uc_pdata->name);
if (len != check_len)
continue;
@@ -395,10 +395,10 @@
static int regulator_post_bind(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
const char *property = "regulator-name";
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
/* Regulator's mandatory constraint */
uc_pdata->name = dev_read_string(dev, property);
@@ -421,10 +421,10 @@
static int regulator_pre_probe(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
ofnode node;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
if (!uc_pdata)
return -ENXIO;
@@ -500,6 +500,6 @@
.name = "regulator",
.post_bind = regulator_post_bind,
.pre_probe = regulator_pre_probe,
- .per_device_platdata_auto =
- sizeof(struct dm_regulator_uclass_platdata),
+ .per_device_plat_auto =
+ sizeof(struct dm_regulator_uclass_plat),
};
diff --git a/drivers/power/regulator/rk8xx.c b/drivers/power/regulator/rk8xx.c
index a08e215..0ee07ad 100644
--- a/drivers/power/regulator/rk8xx.c
+++ b/drivers/power/regulator/rk8xx.c
@@ -1034,9 +1034,9 @@
static int rk8xx_buck_probe(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
uc_pdata->type = REGULATOR_TYPE_BUCK;
uc_pdata->mode_count = 0;
@@ -1046,9 +1046,9 @@
static int rk8xx_ldo_probe(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
uc_pdata->type = REGULATOR_TYPE_LDO;
uc_pdata->mode_count = 0;
@@ -1058,9 +1058,9 @@
static int rk8xx_switch_probe(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
uc_pdata->type = REGULATOR_TYPE_FIXED;
uc_pdata->mode_count = 0;
diff --git a/drivers/power/regulator/s2mps11_regulator.c b/drivers/power/regulator/s2mps11_regulator.c
index a6b4f15..1c6d835 100644
--- a/drivers/power/regulator/s2mps11_regulator.c
+++ b/drivers/power/regulator/s2mps11_regulator.c
@@ -305,9 +305,9 @@
static int s2mps11_buck_probe(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
uc_pdata->type = REGULATOR_TYPE_BUCK;
uc_pdata->mode = s2mps11_buck_modes;
@@ -581,9 +581,9 @@
static int s2mps11_ldo_probe(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
uc_pdata->type = REGULATOR_TYPE_LDO;
uc_pdata->mode = s2mps11_ldo_modes;
uc_pdata->mode_count = ARRAY_SIZE(s2mps11_ldo_modes);
diff --git a/drivers/power/regulator/s5m8767.c b/drivers/power/regulator/s5m8767.c
index b46a2a4..ad0b986 100644
--- a/drivers/power/regulator/s5m8767.c
+++ b/drivers/power/regulator/s5m8767.c
@@ -130,9 +130,9 @@
static int s5m8767_ldo_probe(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
uc_pdata->type = REGULATOR_TYPE_LDO;
uc_pdata->mode_count = 0;
@@ -199,9 +199,9 @@
static int s5m8767_buck_probe(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
uc_pdata->type = REGULATOR_TYPE_BUCK;
uc_pdata->mode_count = 0;
diff --git a/drivers/power/regulator/sandbox.c b/drivers/power/regulator/sandbox.c
index 9893a6b..c52fe3d 100644
--- a/drivers/power/regulator/sandbox.c
+++ b/drivers/power/regulator/sandbox.c
@@ -140,13 +140,13 @@
static int out_get_mode(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
uint8_t reg_val;
uint reg;
int ret;
int i;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
reg = (dev->driver_data - 1) * OUT_REG_COUNT + OUT_REG_OM;
ret = pmic_read(dev->parent, reg, ®_val, 1);
@@ -166,13 +166,13 @@
static int out_set_mode(struct udevice *dev, int mode)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
int reg_val = -1;
uint reg;
int ret;
int i;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
if (mode >= uc_pdata->mode_count)
return -EINVAL;
@@ -246,9 +246,9 @@
static int sandbox_buck_probe(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
uc_pdata->type = REGULATOR_TYPE_BUCK;
uc_pdata->mode = sandbox_buck_modes;
@@ -322,9 +322,9 @@
static int sandbox_ldo_probe(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
uc_pdata->type = REGULATOR_TYPE_LDO;
uc_pdata->mode = sandbox_ldo_modes;
diff --git a/drivers/power/regulator/stpmic1.c b/drivers/power/regulator/stpmic1.c
index 3e342f4..4839d83 100644
--- a/drivers/power/regulator/stpmic1.c
+++ b/drivers/power/regulator/stpmic1.c
@@ -184,7 +184,7 @@
static int stpmic1_buck_set_enable(struct udevice *dev, bool enable)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
int delay = enable ? STPMIC1_DEFAULT_START_UP_DELAY_MS :
STPMIC1_DEFAULT_STOP_DELAY_MS;
int ret, uv;
@@ -194,7 +194,7 @@
return 0;
if (enable) {
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
uv = stpmic1_buck_get_value(dev);
if (uv < uc_pdata->min_uV || uv > uc_pdata->max_uV)
stpmic1_buck_set_value(dev, uc_pdata->min_uV);
@@ -231,12 +231,12 @@
static int stpmic1_buck_probe(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
if (!dev->driver_data || dev->driver_data > STPMIC1_MAX_BUCK)
return -EINVAL;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
uc_pdata->type = REGULATOR_TYPE_BUCK;
uc_pdata->mode = (struct dm_regulator_mode *)buck_modes;
@@ -363,7 +363,7 @@
static int stpmic1_ldo_set_enable(struct udevice *dev, bool enable)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
int delay = enable ? STPMIC1_DEFAULT_START_UP_DELAY_MS :
STPMIC1_DEFAULT_STOP_DELAY_MS;
int ret, uv;
@@ -373,7 +373,7 @@
return 0;
if (enable) {
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
uv = stpmic1_ldo_get_value(dev);
if (uv < uc_pdata->min_uV || uv > uc_pdata->max_uV)
stpmic1_ldo_set_value(dev, uc_pdata->min_uV);
@@ -437,12 +437,12 @@
static int stpmic1_ldo_probe(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
if (!dev->driver_data || dev->driver_data > STPMIC1_MAX_LDO)
return -EINVAL;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
uc_pdata->type = REGULATOR_TYPE_LDO;
if (dev->driver_data - 1 == STPMIC1_LDO3) {
@@ -511,9 +511,9 @@
static int stpmic1_vref_ddr_probe(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
uc_pdata->type = REGULATOR_TYPE_FIXED;
uc_pdata->mode_count = 0;
@@ -575,9 +575,9 @@
static int stpmic1_boost_probe(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
uc_pdata->type = REGULATOR_TYPE_FIXED;
uc_pdata->mode_count = 0;
@@ -648,12 +648,12 @@
static int stpmic1_pwr_sw_probe(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
if (!dev->driver_data || dev->driver_data > STPMIC1_MAX_PWR_SW)
return -EINVAL;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
uc_pdata->type = REGULATOR_TYPE_FIXED;
uc_pdata->mode_count = 0;
diff --git a/drivers/power/regulator/tps62360_regulator.c b/drivers/power/regulator/tps62360_regulator.c
index 5755666..e44c6bb 100644
--- a/drivers/power/regulator/tps62360_regulator.c
+++ b/drivers/power/regulator/tps62360_regulator.c
@@ -119,6 +119,6 @@
.id = UCLASS_REGULATOR,
.ops = &tps62360_regulator_ops,
.of_match = tps62360_regulator_ids,
- .platdata_auto = sizeof(struct tps62360_regulator_pdata),
+ .plat_auto = sizeof(struct tps62360_regulator_pdata),
.probe = tps62360_regulator_probe,
};
diff --git a/drivers/power/regulator/tps65090_regulator.c b/drivers/power/regulator/tps65090_regulator.c
index 9e45627..174ee58 100644
--- a/drivers/power/regulator/tps65090_regulator.c
+++ b/drivers/power/regulator/tps65090_regulator.c
@@ -14,9 +14,9 @@
static int tps65090_fet_probe(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
uc_pdata->type = REGULATOR_TYPE_OTHER;
uc_pdata->mode_count = 0;
diff --git a/drivers/power/regulator/tps65910_regulator.c b/drivers/power/regulator/tps65910_regulator.c
index 467ff3f..3c211a1 100644
--- a/drivers/power/regulator/tps65910_regulator.c
+++ b/drivers/power/regulator/tps65910_regulator.c
@@ -323,7 +323,7 @@
{
int ret, reg_vdd, gain;
int val;
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
struct tps65910_regulator_pdata *pdata = dev_get_platdata(dev);
switch (pdata->unit) {
@@ -336,7 +336,7 @@
default:
return -EINVAL;
}
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
/* check setpoint is within limits */
if (uV < uc_pdata->min_uV) {
@@ -424,7 +424,7 @@
.name = TPS65910_BOOST_DRIVER,
.id = UCLASS_REGULATOR,
.ops = &tps65910_boost_ops,
- .platdata_auto = sizeof(struct tps65910_regulator_pdata),
+ .plat_auto = sizeof(struct tps65910_regulator_pdata),
.ofdata_to_platdata = tps65910_regulator_ofdata_to_platdata,
};
@@ -439,7 +439,7 @@
.name = TPS65910_BUCK_DRIVER,
.id = UCLASS_REGULATOR,
.ops = &tps65910_buck_ops,
- .platdata_auto = sizeof(struct tps65910_regulator_pdata),
+ .plat_auto = sizeof(struct tps65910_regulator_pdata),
.ofdata_to_platdata = tps65910_regulator_ofdata_to_platdata,
};
@@ -454,6 +454,6 @@
.name = TPS65910_LDO_DRIVER,
.id = UCLASS_REGULATOR,
.ops = &tps65910_ldo_ops,
- .platdata_auto = sizeof(struct tps65910_regulator_pdata),
+ .plat_auto = sizeof(struct tps65910_regulator_pdata),
.ofdata_to_platdata = tps65910_regulator_ofdata_to_platdata,
};
diff --git a/drivers/power/regulator/tps65941_regulator.c b/drivers/power/regulator/tps65941_regulator.c
index 150c72d..d73f832 100644
--- a/drivers/power/regulator/tps65941_regulator.c
+++ b/drivers/power/regulator/tps65941_regulator.c
@@ -30,9 +30,9 @@
{
int ret;
unsigned int adr;
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
adr = uc_pdata->ctrl_reg;
ret = pmic_reg_read(dev->parent, adr);
@@ -121,9 +121,9 @@
{
unsigned int hex, adr;
int ret, delta, uwait, slew;
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
if (op == PMIC_OP_GET)
*uV = 0;
@@ -182,9 +182,9 @@
{
int ret;
unsigned int adr;
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
adr = uc_pdata->ctrl_reg;
ret = pmic_reg_read(dev->parent, adr);
@@ -227,9 +227,9 @@
{
unsigned int hex, adr;
int ret;
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
if (op == PMIC_OP_GET)
*uV = 0;
@@ -264,10 +264,10 @@
static int tps65941_ldo_probe(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
int idx;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
uc_pdata->type = REGULATOR_TYPE_LDO;
idx = dev->driver_data;
@@ -286,10 +286,10 @@
static int tps65941_buck_probe(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
int idx;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
uc_pdata->type = REGULATOR_TYPE_BUCK;
idx = dev->driver_data;