diff options
author | Simon Glass <sjg@chromium.org> | 2020-12-03 16:55:20 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-12-13 16:51:09 -0700 |
commit | c69cda25c9b59e53a6bc8969ada58942549f5b5d (patch) | |
tree | 8c84d1773465eb8e06cbbaeb710daa6217f5618d /drivers/power | |
parent | 4f50086ad6d69c355a07389fb436c64c92ec614a (diff) | |
download | u-boot-c69cda25c9b59e53a6bc8969ada58942549f5b5d.zip u-boot-c69cda25c9b59e53a6bc8969ada58942549f5b5d.tar.gz u-boot-c69cda25c9b59e53a6bc8969ada58942549f5b5d.tar.bz2 |
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')
-rw-r--r-- | drivers/power/acpi_pmc/pmc_emul.c | 6 | ||||
-rw-r--r-- | drivers/power/domain/imx8-power-domain-legacy.c | 8 | ||||
-rw-r--r-- | drivers/power/domain/imx8m-power-domain.c | 6 | ||||
-rw-r--r-- | drivers/power/pmic/i2c_pmic_emul.c | 8 | ||||
-rw-r--r-- | drivers/power/regulator/bd71837.c | 10 | ||||
-rw-r--r-- | drivers/power/regulator/fan53555.c | 6 | ||||
-rw-r--r-- | drivers/power/regulator/fixed.c | 6 | ||||
-rw-r--r-- | drivers/power/regulator/gpio-regulator.c | 10 | ||||
-rw-r--r-- | drivers/power/regulator/pfuze100.c | 6 | ||||
-rw-r--r-- | drivers/power/regulator/tps62360_regulator.c | 6 | ||||
-rw-r--r-- | drivers/power/regulator/tps65910_regulator.c | 22 |
11 files changed, 47 insertions, 47 deletions
diff --git a/drivers/power/acpi_pmc/pmc_emul.c b/drivers/power/acpi_pmc/pmc_emul.c index 9ce8c16..0a72afd 100644 --- a/drivers/power/acpi_pmc/pmc_emul.c +++ b/drivers/power/acpi_pmc/pmc_emul.c @@ -46,7 +46,7 @@ struct pmc_emul_priv { static int sandbox_pmc_emul_read_config(const struct udevice *emul, uint offset, ulong *valuep, enum pci_size_t size) { - struct pmc_emul_platdata *plat = dev_get_platdata(emul); + struct pmc_emul_platdata *plat = dev_get_plat(emul); switch (offset) { case PCI_COMMAND: @@ -99,7 +99,7 @@ static int sandbox_pmc_emul_read_config(const struct udevice *emul, uint offset, static int sandbox_pmc_emul_write_config(struct udevice *emul, uint offset, ulong value, enum pci_size_t size) { - struct pmc_emul_platdata *plat = dev_get_platdata(emul); + struct pmc_emul_platdata *plat = dev_get_plat(emul); switch (offset) { case PCI_COMMAND: @@ -127,7 +127,7 @@ static int sandbox_pmc_emul_write_config(struct udevice *emul, uint offset, static int sandbox_pmc_emul_find_bar(struct udevice *emul, unsigned int addr, int *barnump, unsigned int *offsetp) { - struct pmc_emul_platdata *plat = dev_get_platdata(emul); + struct pmc_emul_platdata *plat = dev_get_plat(emul); int barnum; for (barnum = 0; barnum < ARRAY_SIZE(barinfo); barnum++) { diff --git a/drivers/power/domain/imx8-power-domain-legacy.c b/drivers/power/domain/imx8-power-domain-legacy.c index ed88fd7..c97dfbb 100644 --- a/drivers/power/domain/imx8-power-domain-legacy.c +++ b/drivers/power/domain/imx8-power-domain-legacy.c @@ -116,7 +116,7 @@ static int imx8_power_domain_on(struct power_domain *power_domain) return err; } - pdata = (struct imx8_power_domain_platdata *)dev_get_platdata(dev); + pdata = (struct imx8_power_domain_platdata *)dev_get_plat(dev); ppriv = (struct imx8_power_domain_priv *)dev_get_priv(dev); debug("%s(power_domain=%s) resource_id %d\n", __func__, dev->name, @@ -155,7 +155,7 @@ static int imx8_power_domain_off_node(struct power_domain *power_domain) sc_err_t ret; ppriv = dev_get_priv(dev); - pdata = dev_get_platdata(dev); + pdata = dev_get_plat(dev); debug("%s, %s, state_on %d\n", __func__, dev->name, ppriv->state_on); @@ -208,7 +208,7 @@ static int imx8_power_domain_off_parentnodes(struct power_domain *power_domain) if (device_get_uclass_id(parent) == UCLASS_POWER_DOMAIN) { pdata = - (struct imx8_power_domain_platdata *)dev_get_platdata(parent); + (struct imx8_power_domain_platdata *)dev_get_plat(parent); ppriv = (struct imx8_power_domain_priv *)dev_get_priv(parent); debug("%s, %s, state_on %d\n", __func__, parent->name, @@ -343,7 +343,7 @@ static int imx8_power_domain_probe(struct udevice *dev) static int imx8_power_domain_ofdata_to_platdata(struct udevice *dev) { int reg; - struct imx8_power_domain_platdata *pdata = dev_get_platdata(dev); + struct imx8_power_domain_platdata *pdata = dev_get_plat(dev); reg = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev), "reg", -1); if (reg == -1) { diff --git a/drivers/power/domain/imx8m-power-domain.c b/drivers/power/domain/imx8m-power-domain.c index 7e2d232..1248f93 100644 --- a/drivers/power/domain/imx8m-power-domain.c +++ b/drivers/power/domain/imx8m-power-domain.c @@ -32,7 +32,7 @@ static int imx8m_power_domain_on(struct power_domain *power_domain) struct udevice *dev = power_domain->dev; struct imx8m_power_domain_platdata *pdata; - pdata = dev_get_platdata(dev); + pdata = dev_get_plat(dev); if (pdata->resource_id < 0) return -EINVAL; @@ -50,7 +50,7 @@ static int imx8m_power_domain_off(struct power_domain *power_domain) { struct udevice *dev = power_domain->dev; struct imx8m_power_domain_platdata *pdata; - pdata = dev_get_platdata(dev); + pdata = dev_get_plat(dev); if (pdata->resource_id < 0) return -EINVAL; @@ -106,7 +106,7 @@ static int imx8m_power_domain_probe(struct udevice *dev) static int imx8m_power_domain_ofdata_to_platdata(struct udevice *dev) { - struct imx8m_power_domain_platdata *pdata = dev_get_platdata(dev); + struct imx8m_power_domain_platdata *pdata = dev_get_plat(dev); pdata->resource_id = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev), "reg", -1); diff --git a/drivers/power/pmic/i2c_pmic_emul.c b/drivers/power/pmic/i2c_pmic_emul.c index 168b8a5..a85de82 100644 --- a/drivers/power/pmic/i2c_pmic_emul.c +++ b/drivers/power/pmic/i2c_pmic_emul.c @@ -30,7 +30,7 @@ struct sandbox_i2c_pmic_plat_data { static int sandbox_i2c_pmic_read_data(struct udevice *emul, uchar chip, uchar *buffer, int len) { - struct sandbox_i2c_pmic_plat_data *plat = dev_get_platdata(emul); + struct sandbox_i2c_pmic_plat_data *plat = dev_get_plat(emul); if (plat->rw_idx + len > plat->buf_size) { pr_err("Request exceeds PMIC register range! Max register: %#x", @@ -50,7 +50,7 @@ static int sandbox_i2c_pmic_write_data(struct udevice *emul, uchar chip, uchar *buffer, int len, bool next_is_read) { - struct sandbox_i2c_pmic_plat_data *plat = dev_get_platdata(emul); + struct sandbox_i2c_pmic_plat_data *plat = dev_get_plat(emul); /* Probe only */ if (!len) @@ -105,7 +105,7 @@ static int sandbox_i2c_pmic_xfer(struct udevice *emul, struct i2c_msg *msg, static int sandbox_i2c_pmic_ofdata_to_platdata(struct udevice *emul) { - struct sandbox_i2c_pmic_plat_data *plat = dev_get_platdata(emul); + struct sandbox_i2c_pmic_plat_data *plat = dev_get_plat(emul); struct udevice *pmic_dev = i2c_emul_get_device(emul); debug("%s:%d Setting PMIC default registers\n", __func__, __LINE__); @@ -116,7 +116,7 @@ static int sandbox_i2c_pmic_ofdata_to_platdata(struct udevice *emul) static int sandbox_i2c_pmic_probe(struct udevice *emul) { - struct sandbox_i2c_pmic_plat_data *plat = dev_get_platdata(emul); + struct sandbox_i2c_pmic_plat_data *plat = dev_get_plat(emul); struct udevice *pmic_dev = i2c_emul_get_device(emul); struct uc_pmic_priv *upriv = dev_get_uclass_priv(pmic_dev); const u8 *reg_defaults; diff --git a/drivers/power/regulator/bd71837.c b/drivers/power/regulator/bd71837.c index c9d966fd..1637a2d 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 709cc63..02a08b5 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 ed27ffc..4967b70 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 39b0f08..80a6949 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 ebf355c..d75ea7c 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 e44c6bb..b9f4504 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, ®val, 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 3c211a1..9fb13d6 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) |