dm: treewide: Rename ..._platdata variables to just ..._plat
Try to maintain some consistency between these variables by using _plat as
a suffix for them.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/drivers/power/regulator/bd71837.c b/drivers/power/regulator/bd71837.c
index 1637a2d..74011d6 100644
--- a/drivers/power/regulator/bd71837.c
+++ b/drivers/power/regulator/bd71837.c
@@ -35,7 +35,7 @@
};
/**
- * struct bd71837_platdata - describe regulator control registers
+ * struct bd71837_plat - describe regulator control registers
*
* @name: name of the regulator. Used for matching the dt-entry
* @enable_reg: register address used to enable/disable regulator
@@ -49,7 +49,7 @@
* @sel_mask: bit to toggle in order to transfer the register control to SW
* @dvs: whether the voltage can be changed when regulator is enabled
*/
-struct bd71837_platdata {
+struct bd71837_plat {
const char *name;
u8 enable_reg;
u8 enablemask;
@@ -160,7 +160,7 @@
* is powering NXP i.MX8. In this use-case we (for now) only allow control
* for BUCK3 and BUCK4 which are not boot critical.
*/
-static struct bd71837_platdata bd71837_reg_data[] = {
+static struct bd71837_plat bd71837_reg_data[] = {
/* Bucks 1-4 which support dynamic voltage scaling */
BD_DATA("BUCK1", BD718XX_BUCK1_CTRL, HW_STATE_CONTROL,
BD718XX_BUCK1_VOLT_RUN, DVS_BUCK_RUN_MASK, dvs_buck_vranges, 0,
@@ -205,7 +205,7 @@
BD71837_LDO7_MASK, ldo7_vranges, 0, false, BD718XX_LDO_SEL),
};
-static struct bd71837_platdata bd71847_reg_data[] = {
+static struct bd71837_plat bd71847_reg_data[] = {
/* Bucks 1 and 2 which support dynamic voltage scaling */
BD_DATA("BUCK1", BD718XX_BUCK1_CTRL, HW_STATE_CONTROL,
BD718XX_BUCK1_VOLT_RUN, DVS_BUCK_RUN_MASK, dvs_buck_vranges, 0,
@@ -274,7 +274,7 @@
static int bd71837_get_enable(struct udevice *dev)
{
int val;
- struct bd71837_platdata *plat = dev_get_plat(dev);
+ struct bd71837_plat *plat = dev_get_plat(dev);
/*
* boot critical regulators on bd71837 must not be controlled by sw
@@ -298,7 +298,7 @@
static int bd71837_set_enable(struct udevice *dev, bool enable)
{
int val = 0;
- struct bd71837_platdata *plat = dev_get_plat(dev);
+ struct bd71837_plat *plat = dev_get_plat(dev);
/*
* boot critical regulators on bd71837 must not be controlled by sw
@@ -321,7 +321,7 @@
unsigned int range;
int i;
int found = 0;
- struct bd71837_platdata *plat = dev_get_plat(dev);
+ struct bd71837_plat *plat = dev_get_plat(dev);
/*
* An under/overshooting may occur if voltage is changed for other
@@ -369,7 +369,7 @@
{
unsigned int reg, range;
unsigned int tmp;
- struct bd71837_platdata *plat = dev_get_plat(dev);
+ struct bd71837_plat *plat = dev_get_plat(dev);
int i;
reg = pmic_reg_read(dev->parent, plat->volt_reg);
@@ -399,11 +399,11 @@
static int bd71837_regulator_probe(struct udevice *dev)
{
- struct bd71837_platdata *plat = dev_get_plat(dev);
+ struct bd71837_plat *plat = dev_get_plat(dev);
int i, ret;
struct dm_regulator_uclass_plat *uc_pdata;
int type;
- struct bd71837_platdata *init_data;
+ struct bd71837_plat *init_data;
int data_amnt;
type = dev_get_driver_data(dev_get_parent(dev));
@@ -466,5 +466,5 @@
.id = UCLASS_REGULATOR,
.ops = &bd71837_regulator_ops,
.probe = bd71837_regulator_probe,
- .plat_auto = sizeof(struct bd71837_platdata),
+ .plat_auto = sizeof(struct bd71837_plat),
};
diff --git a/drivers/power/regulator/fan53555.c b/drivers/power/regulator/fan53555.c
index fcd1d52..9d8a235 100644
--- a/drivers/power/regulator/fan53555.c
+++ b/drivers/power/regulator/fan53555.c
@@ -78,7 +78,7 @@
FAN53555_MONITOR,
};
-struct fan53555_platdata {
+struct fan53555_plat {
/* Voltage setting register */
unsigned int vol_reg;
unsigned int sleep_reg;
@@ -102,7 +102,7 @@
static int fan53555_regulator_of_to_plat(struct udevice *dev)
{
- struct fan53555_platdata *dev_pdata = dev_get_plat(dev);
+ struct fan53555_plat *dev_pdata = dev_get_plat(dev);
struct dm_regulator_uclass_plat *uc_pdata =
dev_get_uclass_plat(dev);
u32 sleep_vsel;
@@ -136,7 +136,7 @@
static int fan53555_regulator_get_value(struct udevice *dev)
{
- struct fan53555_platdata *pdata = dev_get_plat(dev);
+ struct fan53555_plat *pdata = dev_get_plat(dev);
struct fan53555_priv *priv = dev_get_priv(dev);
int reg;
int voltage;
@@ -153,7 +153,7 @@
static int fan53555_regulator_set_value(struct udevice *dev, int uV)
{
- struct fan53555_platdata *pdata = dev_get_plat(dev);
+ struct fan53555_plat *pdata = dev_get_plat(dev);
struct fan53555_priv *priv = dev_get_priv(dev);
u8 vol;
@@ -239,7 +239,7 @@
.id = UCLASS_REGULATOR,
.ops = &fan53555_regulator_ops,
.of_to_plat = fan53555_regulator_of_to_plat,
- .plat_auto = sizeof(struct fan53555_platdata),
+ .plat_auto = sizeof(struct fan53555_plat),
.priv_auto = sizeof(struct fan53555_priv),
.probe = fan53555_probe,
};
diff --git a/drivers/power/regulator/fixed.c b/drivers/power/regulator/fixed.c
index efe2ec9..d3e0fb6 100644
--- a/drivers/power/regulator/fixed.c
+++ b/drivers/power/regulator/fixed.c
@@ -17,7 +17,7 @@
static int fixed_regulator_of_to_plat(struct udevice *dev)
{
struct dm_regulator_uclass_plat *uc_pdata;
- struct regulator_common_platdata *dev_pdata;
+ struct regulator_common_plat *dev_pdata;
dev_pdata = dev_get_plat(dev);
uc_pdata = dev_get_uclass_plat(dev);
@@ -89,5 +89,5 @@
.ops = &fixed_regulator_ops,
.of_match = fixed_regulator_ids,
.of_to_plat = fixed_regulator_of_to_plat,
- .plat_auto = sizeof(struct regulator_common_platdata),
+ .plat_auto = sizeof(struct regulator_common_plat),
};
diff --git a/drivers/power/regulator/gpio-regulator.c b/drivers/power/regulator/gpio-regulator.c
index 2565c44..e5e08a3 100644
--- a/drivers/power/regulator/gpio-regulator.c
+++ b/drivers/power/regulator/gpio-regulator.c
@@ -18,8 +18,8 @@
#define GPIO_REGULATOR_MAX_STATES 2
-struct gpio_regulator_platdata {
- struct regulator_common_platdata common;
+struct gpio_regulator_plat {
+ struct regulator_common_plat common;
struct gpio_desc gpio; /* GPIO for regulator voltage control */
int states[GPIO_REGULATOR_MAX_STATES];
int voltages[GPIO_REGULATOR_MAX_STATES];
@@ -28,7 +28,7 @@
static int gpio_regulator_of_to_plat(struct udevice *dev)
{
struct dm_regulator_uclass_plat *uc_pdata;
- struct gpio_regulator_platdata *dev_pdata;
+ struct gpio_regulator_plat *dev_pdata;
struct gpio_desc *gpio;
int ret, count, i, j;
u32 states_array[GPIO_REGULATOR_MAX_STATES * 2];
@@ -80,7 +80,7 @@
static int gpio_regulator_get_value(struct udevice *dev)
{
struct dm_regulator_uclass_plat *uc_pdata;
- struct gpio_regulator_platdata *dev_pdata = dev_get_plat(dev);
+ struct gpio_regulator_plat *dev_pdata = dev_get_plat(dev);
int enable;
if (!dev_pdata->gpio.dev)
@@ -101,7 +101,7 @@
static int gpio_regulator_set_value(struct udevice *dev, int uV)
{
- struct gpio_regulator_platdata *dev_pdata = dev_get_plat(dev);
+ struct gpio_regulator_plat *dev_pdata = dev_get_plat(dev);
int ret;
bool enable;
@@ -127,13 +127,13 @@
static int gpio_regulator_get_enable(struct udevice *dev)
{
- struct gpio_regulator_platdata *dev_pdata = dev_get_plat(dev);
+ struct gpio_regulator_plat *dev_pdata = dev_get_plat(dev);
return regulator_common_get_enable(dev, &dev_pdata->common);
}
static int gpio_regulator_set_enable(struct udevice *dev, bool enable)
{
- struct gpio_regulator_platdata *dev_pdata = dev_get_plat(dev);
+ struct gpio_regulator_plat *dev_pdata = dev_get_plat(dev);
return regulator_common_set_enable(dev, &dev_pdata->common, enable);
}
@@ -155,5 +155,5 @@
.ops = &gpio_regulator_ops,
.of_match = gpio_regulator_ids,
.of_to_plat = gpio_regulator_of_to_plat,
- .plat_auto = sizeof(struct gpio_regulator_platdata),
+ .plat_auto = sizeof(struct gpio_regulator_plat),
};
diff --git a/drivers/power/regulator/pfuze100.c b/drivers/power/regulator/pfuze100.c
index d75ea7c..698a6fa 100644
--- a/drivers/power/regulator/pfuze100.c
+++ b/drivers/power/regulator/pfuze100.c
@@ -41,11 +41,11 @@
};
/**
- * struct pfuze100_regulator_platdata - platform data for pfuze100
+ * struct pfuze100_regulator_plat - platform data for pfuze100
*
* @desc: Points the description entry of one regulator of pfuze100
*/
-struct pfuze100_regulator_platdata {
+struct pfuze100_regulator_plat {
struct pfuze100_regulator_desc *desc;
};
@@ -261,7 +261,7 @@
static int pfuze100_regulator_probe(struct udevice *dev)
{
struct dm_regulator_uclass_plat *uc_pdata;
- struct pfuze100_regulator_platdata *plat = dev_get_plat(dev);
+ struct pfuze100_regulator_plat *plat = dev_get_plat(dev);
struct pfuze100_regulator_desc *desc;
switch (dev_get_driver_data(dev_get_parent(dev))) {
@@ -315,7 +315,7 @@
static int pfuze100_regulator_mode(struct udevice *dev, int op, int *opmode)
{
int val;
- struct pfuze100_regulator_platdata *plat = dev_get_plat(dev);
+ struct pfuze100_regulator_plat *plat = dev_get_plat(dev);
struct pfuze100_regulator_desc *desc = plat->desc;
if (op == PMIC_OP_GET) {
@@ -449,7 +449,7 @@
{
int i;
int val;
- struct pfuze100_regulator_platdata *plat = dev_get_plat(dev);
+ struct pfuze100_regulator_plat *plat = dev_get_plat(dev);
struct pfuze100_regulator_desc *desc = plat->desc;
struct dm_regulator_uclass_plat *uc_pdata =
dev_get_uclass_plat(dev);
@@ -572,5 +572,5 @@
.id = UCLASS_REGULATOR,
.ops = &pfuze100_regulator_ops,
.probe = pfuze100_regulator_probe,
- .plat_auto = sizeof(struct pfuze100_regulator_platdata),
+ .plat_auto = sizeof(struct pfuze100_regulator_plat),
};
diff --git a/drivers/power/regulator/regulator_common.c b/drivers/power/regulator/regulator_common.c
index d307a19..93d8196 100644
--- a/drivers/power/regulator/regulator_common.c
+++ b/drivers/power/regulator/regulator_common.c
@@ -13,7 +13,7 @@
#include "regulator_common.h"
int regulator_common_of_to_plat(struct udevice *dev,
- struct regulator_common_platdata *dev_pdata,
+ struct regulator_common_plat *dev_pdata,
const char *enable_gpio_name)
{
struct gpio_desc *gpio;
@@ -49,7 +49,7 @@
}
int regulator_common_get_enable(const struct udevice *dev,
- struct regulator_common_platdata *dev_pdata)
+ struct regulator_common_plat *dev_pdata)
{
/* Enable GPIO is optional */
if (!dev_pdata->gpio.dev)
@@ -59,7 +59,7 @@
}
int regulator_common_set_enable(const struct udevice *dev,
- struct regulator_common_platdata *dev_pdata, bool enable)
+ struct regulator_common_plat *dev_pdata, bool enable)
{
int ret;
diff --git a/drivers/power/regulator/regulator_common.h b/drivers/power/regulator/regulator_common.h
index 5ae0b9a..c10492f 100644
--- a/drivers/power/regulator/regulator_common.h
+++ b/drivers/power/regulator/regulator_common.h
@@ -9,18 +9,18 @@
#include <asm/gpio.h>
-struct regulator_common_platdata {
+struct regulator_common_plat {
struct gpio_desc gpio; /* GPIO for regulator enable control */
unsigned int startup_delay_us;
unsigned int off_on_delay_us;
};
int regulator_common_of_to_plat(struct udevice *dev,
- struct regulator_common_platdata *dev_pdata,
- const char *enable_gpio_name);
+ struct regulator_common_plat *dev_pdata, const
+ char *enable_gpio_name);
int regulator_common_get_enable(const struct udevice *dev,
- struct regulator_common_platdata *dev_pdata);
+ struct regulator_common_plat *dev_pdata);
int regulator_common_set_enable(const struct udevice *dev,
- struct regulator_common_platdata *dev_pdata, bool enable);
+ struct regulator_common_plat *dev_pdata, bool enable);
#endif /* _REGULATOR_COMMON_H */