aboutsummaryrefslogtreecommitdiff
path: root/drivers/power/regulator
diff options
context:
space:
mode:
authorSimon Glass2020-12-03 16:55:20 -0700
committerSimon Glass2020-12-13 16:51:09 -0700
commitc69cda25c9b59e53a6bc8969ada58942549f5b5d (patch)
tree8c84d1773465eb8e06cbbaeb710daa6217f5618d /drivers/power/regulator
parent4f50086ad6d69c355a07389fb436c64c92ec614a (diff)
dm: treewide: Rename dev_get_platdata() to dev_get_plat()
Rename this to be consistent with the change from 'platdata'. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/power/regulator')
-rw-r--r--drivers/power/regulator/bd71837.c10
-rw-r--r--drivers/power/regulator/fan53555.c6
-rw-r--r--drivers/power/regulator/fixed.c6
-rw-r--r--drivers/power/regulator/gpio-regulator.c10
-rw-r--r--drivers/power/regulator/pfuze100.c6
-rw-r--r--drivers/power/regulator/tps62360_regulator.c6
-rw-r--r--drivers/power/regulator/tps65910_regulator.c22
7 files changed, 33 insertions, 33 deletions
diff --git a/drivers/power/regulator/bd71837.c b/drivers/power/regulator/bd71837.c
index c9d966fdebf..1637a2d018a 100644
--- a/drivers/power/regulator/bd71837.c
+++ b/drivers/power/regulator/bd71837.c
@@ -274,7 +274,7 @@ static int vrange_find_selector(struct bd71837_vrange *r, int val,
static int bd71837_get_enable(struct udevice *dev)
{
int val;
- struct bd71837_platdata *plat = dev_get_platdata(dev);
+ struct bd71837_platdata *plat = dev_get_plat(dev);
/*
* boot critical regulators on bd71837 must not be controlled by sw
@@ -298,7 +298,7 @@ static int bd71837_get_enable(struct udevice *dev)
static int bd71837_set_enable(struct udevice *dev, bool enable)
{
int val = 0;
- struct bd71837_platdata *plat = dev_get_platdata(dev);
+ struct bd71837_platdata *plat = dev_get_plat(dev);
/*
* boot critical regulators on bd71837 must not be controlled by sw
@@ -321,7 +321,7 @@ static int bd71837_set_value(struct udevice *dev, int uvolt)
unsigned int range;
int i;
int found = 0;
- struct bd71837_platdata *plat = dev_get_platdata(dev);
+ struct bd71837_platdata *plat = dev_get_plat(dev);
/*
* An under/overshooting may occur if voltage is changed for other
@@ -369,7 +369,7 @@ static int bd71837_get_value(struct udevice *dev)
{
unsigned int reg, range;
unsigned int tmp;
- struct bd71837_platdata *plat = dev_get_platdata(dev);
+ struct bd71837_platdata *plat = dev_get_plat(dev);
int i;
reg = pmic_reg_read(dev->parent, plat->volt_reg);
@@ -399,7 +399,7 @@ static int bd71837_get_value(struct udevice *dev)
static int bd71837_regulator_probe(struct udevice *dev)
{
- struct bd71837_platdata *plat = dev_get_platdata(dev);
+ struct bd71837_platdata *plat = dev_get_plat(dev);
int i, ret;
struct dm_regulator_uclass_plat *uc_pdata;
int type;
diff --git a/drivers/power/regulator/fan53555.c b/drivers/power/regulator/fan53555.c
index 709cc632498..02a08b58b06 100644
--- a/drivers/power/regulator/fan53555.c
+++ b/drivers/power/regulator/fan53555.c
@@ -102,7 +102,7 @@ struct fan53555_priv {
static int fan53555_regulator_ofdata_to_platdata(struct udevice *dev)
{
- struct fan53555_platdata *dev_pdata = dev_get_platdata(dev);
+ struct fan53555_platdata *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_ofdata_to_platdata(struct udevice *dev)
static int fan53555_regulator_get_value(struct udevice *dev)
{
- struct fan53555_platdata *pdata = dev_get_platdata(dev);
+ struct fan53555_platdata *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_get_value(struct udevice *dev)
static int fan53555_regulator_set_value(struct udevice *dev, int uV)
{
- struct fan53555_platdata *pdata = dev_get_platdata(dev);
+ struct fan53555_platdata *pdata = dev_get_plat(dev);
struct fan53555_priv *priv = dev_get_priv(dev);
u8 vol;
diff --git a/drivers/power/regulator/fixed.c b/drivers/power/regulator/fixed.c
index ed27ffc0056..4967b7051b3 100644
--- a/drivers/power/regulator/fixed.c
+++ b/drivers/power/regulator/fixed.c
@@ -19,7 +19,7 @@ static int fixed_regulator_ofdata_to_platdata(struct udevice *dev)
struct dm_regulator_uclass_plat *uc_pdata;
struct regulator_common_platdata *dev_pdata;
- dev_pdata = dev_get_platdata(dev);
+ dev_pdata = dev_get_plat(dev);
uc_pdata = dev_get_uclass_plat(dev);
if (!uc_pdata)
return -ENXIO;
@@ -63,12 +63,12 @@ static int fixed_regulator_get_current(struct udevice *dev)
static int fixed_regulator_get_enable(struct udevice *dev)
{
- return regulator_common_get_enable(dev, dev_get_platdata(dev));
+ return regulator_common_get_enable(dev, dev_get_plat(dev));
}
static int fixed_regulator_set_enable(struct udevice *dev, bool enable)
{
- return regulator_common_set_enable(dev, dev_get_platdata(dev), enable);
+ return regulator_common_set_enable(dev, dev_get_plat(dev), enable);
}
static const struct dm_regulator_ops fixed_regulator_ops = {
diff --git a/drivers/power/regulator/gpio-regulator.c b/drivers/power/regulator/gpio-regulator.c
index 39b0f081e86..80a6949e6b3 100644
--- a/drivers/power/regulator/gpio-regulator.c
+++ b/drivers/power/regulator/gpio-regulator.c
@@ -33,7 +33,7 @@ static int gpio_regulator_ofdata_to_platdata(struct udevice *dev)
int ret, count, i, j;
u32 states_array[GPIO_REGULATOR_MAX_STATES * 2];
- dev_pdata = dev_get_platdata(dev);
+ dev_pdata = dev_get_plat(dev);
uc_pdata = dev_get_uclass_plat(dev);
if (!uc_pdata)
return -ENXIO;
@@ -80,7 +80,7 @@ static int gpio_regulator_ofdata_to_platdata(struct udevice *dev)
static int gpio_regulator_get_value(struct udevice *dev)
{
struct dm_regulator_uclass_plat *uc_pdata;
- struct gpio_regulator_platdata *dev_pdata = dev_get_platdata(dev);
+ struct gpio_regulator_platdata *dev_pdata = dev_get_plat(dev);
int enable;
if (!dev_pdata->gpio.dev)
@@ -101,7 +101,7 @@ static int gpio_regulator_get_value(struct udevice *dev)
static int gpio_regulator_set_value(struct udevice *dev, int uV)
{
- struct gpio_regulator_platdata *dev_pdata = dev_get_platdata(dev);
+ struct gpio_regulator_platdata *dev_pdata = dev_get_plat(dev);
int ret;
bool enable;
@@ -127,13 +127,13 @@ static int gpio_regulator_set_value(struct udevice *dev, int uV)
static int gpio_regulator_get_enable(struct udevice *dev)
{
- struct gpio_regulator_platdata *dev_pdata = dev_get_platdata(dev);
+ struct gpio_regulator_platdata *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_platdata(dev);
+ struct gpio_regulator_platdata *dev_pdata = dev_get_plat(dev);
return regulator_common_set_enable(dev, &dev_pdata->common, enable);
}
diff --git a/drivers/power/regulator/pfuze100.c b/drivers/power/regulator/pfuze100.c
index ebf355c2755..d75ea7c1ed1 100644
--- a/drivers/power/regulator/pfuze100.c
+++ b/drivers/power/regulator/pfuze100.c
@@ -261,7 +261,7 @@ static struct pfuze100_regulator_desc *se_desc(struct pfuze100_regulator_desc *d
static int pfuze100_regulator_probe(struct udevice *dev)
{
struct dm_regulator_uclass_plat *uc_pdata;
- struct pfuze100_regulator_platdata *plat = dev_get_platdata(dev);
+ struct pfuze100_regulator_platdata *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_probe(struct udevice *dev)
static int pfuze100_regulator_mode(struct udevice *dev, int op, int *opmode)
{
int val;
- struct pfuze100_regulator_platdata *plat = dev_get_platdata(dev);
+ struct pfuze100_regulator_platdata *plat = dev_get_plat(dev);
struct pfuze100_regulator_desc *desc = plat->desc;
if (op == PMIC_OP_GET) {
@@ -449,7 +449,7 @@ static int pfuze100_regulator_val(struct udevice *dev, int op, int *uV)
{
int i;
int val;
- struct pfuze100_regulator_platdata *plat = dev_get_platdata(dev);
+ struct pfuze100_regulator_platdata *plat = dev_get_plat(dev);
struct pfuze100_regulator_desc *desc = plat->desc;
struct dm_regulator_uclass_plat *uc_pdata =
dev_get_uclass_plat(dev);
diff --git a/drivers/power/regulator/tps62360_regulator.c b/drivers/power/regulator/tps62360_regulator.c
index e44c6bb17f5..b9f4504539e 100644
--- a/drivers/power/regulator/tps62360_regulator.c
+++ b/drivers/power/regulator/tps62360_regulator.c
@@ -43,7 +43,7 @@ static struct tps62360_regulator_config tps62361_data = {
static int tps62360_regulator_set_value(struct udevice *dev, int uV)
{
- struct tps62360_regulator_pdata *pdata = dev_get_platdata(dev);
+ struct tps62360_regulator_pdata *pdata = dev_get_plat(dev);
u8 regval;
if (uV < pdata->config->vmin || uV > pdata->config->vmax)
@@ -66,7 +66,7 @@ static int tps62360_regulator_get_value(struct udevice *dev)
{
u8 regval;
int ret;
- struct tps62360_regulator_pdata *pdata = dev_get_platdata(dev);
+ struct tps62360_regulator_pdata *pdata = dev_get_plat(dev);
ret = dm_i2c_read(pdata->i2c, TPS62360_REG_SET0 + pdata->vsel_offset,
&regval, 1);
@@ -80,7 +80,7 @@ static int tps62360_regulator_get_value(struct udevice *dev)
static int tps62360_regulator_probe(struct udevice *dev)
{
- struct tps62360_regulator_pdata *pdata = dev_get_platdata(dev);
+ struct tps62360_regulator_pdata *pdata = dev_get_plat(dev);
u8 vsel0;
u8 vsel1;
int ret;
diff --git a/drivers/power/regulator/tps65910_regulator.c b/drivers/power/regulator/tps65910_regulator.c
index 3c211a1b3a1..9fb13d6a551 100644
--- a/drivers/power/regulator/tps65910_regulator.c
+++ b/drivers/power/regulator/tps65910_regulator.c
@@ -141,7 +141,7 @@ static int tps65910_regulator_get_value(struct udevice *dev,
const struct regulator_props *rgp)
{
int sel, val, vout;
- struct tps65910_regulator_pdata *pdata = dev_get_platdata(dev);
+ struct tps65910_regulator_pdata *pdata = dev_get_plat(dev);
int vin = pdata->supply;
val = pmic_reg_read(dev->parent, rgp->reg);
@@ -156,7 +156,7 @@ static int tps65910_regulator_get_value(struct udevice *dev,
static int tps65910_ldo_get_value(struct udevice *dev)
{
- struct tps65910_regulator_pdata *pdata = dev_get_platdata(dev);
+ struct tps65910_regulator_pdata *pdata = dev_get_plat(dev);
int vin;
if (!pdata)
@@ -194,7 +194,7 @@ static int tps65910_regulator_set_value(struct udevice *dev,
{
int val;
int sel = 0;
- struct tps65910_regulator_pdata *pdata = dev_get_platdata(dev);
+ struct tps65910_regulator_pdata *pdata = dev_get_plat(dev);
do {
/* we only allow exact voltage matches */
@@ -216,7 +216,7 @@ static int tps65910_regulator_set_value(struct udevice *dev,
static int tps65910_ldo_set_value(struct udevice *dev, int uV)
{
- struct tps65910_regulator_pdata *pdata = dev_get_platdata(dev);
+ struct tps65910_regulator_pdata *pdata = dev_get_plat(dev);
int vin = pdata->supply;
switch (pdata->unit) {
@@ -249,7 +249,7 @@ static int tps65910_ldo_set_value(struct udevice *dev, int uV)
static int tps65910_get_enable(struct udevice *dev)
{
int reg, val;
- struct tps65910_regulator_pdata *pdata = dev_get_platdata(dev);
+ struct tps65910_regulator_pdata *pdata = dev_get_plat(dev);
reg = get_ctrl_reg_from_unit_addr(pdata->unit);
if (reg < 0)
@@ -267,7 +267,7 @@ static int tps65910_set_enable(struct udevice *dev, bool enable)
{
int reg;
uint clr, set;
- struct tps65910_regulator_pdata *pdata = dev_get_platdata(dev);
+ struct tps65910_regulator_pdata *pdata = dev_get_plat(dev);
reg = get_ctrl_reg_from_unit_addr(pdata->unit);
if (reg < 0)
@@ -305,7 +305,7 @@ static int buck_get_vdd1_vdd2_value(struct udevice *dev, int reg_vdd)
static int tps65910_buck_get_value(struct udevice *dev)
{
- struct tps65910_regulator_pdata *pdata = dev_get_platdata(dev);
+ struct tps65910_regulator_pdata *pdata = dev_get_plat(dev);
switch (pdata->unit) {
case TPS65910_UNIT_VIO:
@@ -324,7 +324,7 @@ static int buck_set_vdd1_vdd2_value(struct udevice *dev, int uV)
int ret, reg_vdd, gain;
int val;
struct dm_regulator_uclass_plat *uc_pdata;
- struct tps65910_regulator_pdata *pdata = dev_get_platdata(dev);
+ struct tps65910_regulator_pdata *pdata = dev_get_plat(dev);
switch (pdata->unit) {
case TPS65910_UNIT_VDD1:
@@ -369,7 +369,7 @@ static int buck_set_vdd1_vdd2_value(struct udevice *dev, int uV)
static int tps65910_buck_set_value(struct udevice *dev, int uV)
{
- struct tps65910_regulator_pdata *pdata = dev_get_platdata(dev);
+ struct tps65910_regulator_pdata *pdata = dev_get_plat(dev);
if (pdata->unit == TPS65910_UNIT_VIO)
return tps65910_regulator_set_value(dev, &smps_props_vio, uV);
@@ -380,7 +380,7 @@ static int tps65910_buck_set_value(struct udevice *dev, int uV)
static int tps65910_boost_get_value(struct udevice *dev)
{
int vout;
- struct tps65910_regulator_pdata *pdata = dev_get_platdata(dev);
+ struct tps65910_regulator_pdata *pdata = dev_get_plat(dev);
vout = (pdata->supply >= 3000000) ? 5000000 : 0;
return vout;
@@ -391,7 +391,7 @@ static int tps65910_regulator_ofdata_to_platdata(struct udevice *dev)
struct udevice *supply;
int ret;
const char *supply_name;
- struct tps65910_regulator_pdata *pdata = dev_get_platdata(dev);
+ struct tps65910_regulator_pdata *pdata = dev_get_plat(dev);
pdata->unit = dev_get_driver_data(dev);
if (pdata->unit > TPS65910_UNIT_VMMC)