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/acpi_pmc/acpi-pmc-uclass.c b/drivers/power/acpi_pmc/acpi-pmc-uclass.c
index 7eeecc0..32a2836 100644
--- a/drivers/power/acpi_pmc/acpi-pmc-uclass.c
+++ b/drivers/power/acpi_pmc/acpi-pmc-uclass.c
@@ -204,7 +204,7 @@
 	       upriv->gen_pmcon1, upriv->gen_pmcon2, upriv->gen_pmcon3);
 }
 
-int pmc_ofdata_to_uc_platdata(struct udevice *dev)
+int pmc_ofdata_to_uc_plat(struct udevice *dev)
 {
 	struct acpi_pmc_upriv *upriv = dev_get_uclass_priv(dev);
 	int ret;
diff --git a/drivers/power/acpi_pmc/pmc_emul.c b/drivers/power/acpi_pmc/pmc_emul.c
index 0a72afd..a61eb5b 100644
--- a/drivers/power/acpi_pmc/pmc_emul.c
+++ b/drivers/power/acpi_pmc/pmc_emul.c
@@ -14,12 +14,12 @@
 #include <power/acpi_pmc.h>
 
 /**
- * struct pmc_emul_platdata - platform data for this device
+ * struct pmc_emul_plat - platform data for this device
  *
  * @command:	Current PCI command value
  * @bar:	Current base address values
  */
-struct pmc_emul_platdata {
+struct pmc_emul_plat {
 	u16 command;
 	u32 bar[6];
 };
@@ -46,7 +46,7 @@
 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_plat(emul);
+	struct pmc_emul_plat *plat = dev_get_plat(emul);
 
 	switch (offset) {
 	case PCI_COMMAND:
@@ -99,7 +99,7 @@
 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_plat(emul);
+	struct pmc_emul_plat *plat = dev_get_plat(emul);
 
 	switch (offset) {
 	case PCI_COMMAND:
@@ -127,7 +127,7 @@
 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_plat(emul);
+	struct pmc_emul_plat *plat = dev_get_plat(emul);
 	int barnum;
 
 	for (barnum = 0; barnum < ARRAY_SIZE(barinfo); barnum++) {
@@ -236,7 +236,7 @@
 	.ops		= &sandbox_pmc_emul_emul_ops,
 	.probe		= sandbox_pmc_probe,
 	.priv_auto	= sizeof(struct pmc_emul_priv),
-	.plat_auto	= sizeof(struct pmc_emul_platdata),
+	.plat_auto	= sizeof(struct pmc_emul_plat),
 };
 
 static struct pci_device_id sandbox_pmc_emul_supported[] = {
diff --git a/drivers/power/acpi_pmc/sandbox.c b/drivers/power/acpi_pmc/sandbox.c
index 6cb7af1..8cf03f7 100644
--- a/drivers/power/acpi_pmc/sandbox.c
+++ b/drivers/power/acpi_pmc/sandbox.c
@@ -74,7 +74,7 @@
 	upriv->pmc_bar0 = map_sysmem(base, 0x2000);
 	upriv->gpe_cfg = (u32 *)(upriv->pmc_bar0 + GPIO_GPE_CFG);
 
-	return pmc_ofdata_to_uc_platdata(dev);
+	return pmc_ofdata_to_uc_plat(dev);
 }
 
 static struct acpi_pmc_ops sandbox_pmc_ops = {
diff --git a/drivers/power/domain/imx8-power-domain-legacy.c b/drivers/power/domain/imx8-power-domain-legacy.c
index cf6e068..ec369ae 100644
--- a/drivers/power/domain/imx8-power-domain-legacy.c
+++ b/drivers/power/domain/imx8-power-domain-legacy.c
@@ -100,7 +100,7 @@
 static int imx8_power_domain_on(struct power_domain *power_domain)
 {
 	struct udevice *dev = power_domain->dev;
-	struct imx8_power_domain_platdata *pdata;
+	struct imx8_power_domain_plat *pdata;
 	struct imx8_power_domain_priv *ppriv;
 	sc_err_t ret;
 	int err;
@@ -116,7 +116,7 @@
 			return err;
 	}
 
-	pdata = (struct imx8_power_domain_platdata *)dev_get_plat(dev);
+	pdata = (struct imx8_power_domain_plat *)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,
@@ -151,7 +151,7 @@
 	struct udevice *child;
 	struct imx8_power_domain_priv *ppriv;
 	struct imx8_power_domain_priv *child_ppriv;
-	struct imx8_power_domain_platdata *pdata;
+	struct imx8_power_domain_plat *pdata;
 	sc_err_t ret;
 
 	ppriv = dev_get_priv(dev);
@@ -202,13 +202,13 @@
 	struct udevice *child;
 	struct imx8_power_domain_priv *ppriv;
 	struct imx8_power_domain_priv *child_ppriv;
-	struct imx8_power_domain_platdata *pdata;
+	struct imx8_power_domain_plat *pdata;
 	sc_err_t ret;
 	struct power_domain parent_pd;
 
 	if (device_get_uclass_id(parent) == UCLASS_POWER_DOMAIN) {
 		pdata =
-		(struct imx8_power_domain_platdata *)dev_get_plat(parent);
+		(struct imx8_power_domain_plat *)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_of_to_plat(struct udevice *dev)
 {
 	int reg;
-	struct imx8_power_domain_platdata *pdata = dev_get_plat(dev);
+	struct imx8_power_domain_plat *pdata = dev_get_plat(dev);
 
 	reg = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev), "reg", -1);
 	if (reg == -1) {
@@ -377,7 +377,7 @@
 	.bind = imx8_power_domain_bind,
 	.probe = imx8_power_domain_probe,
 	.of_to_plat = imx8_power_domain_of_to_plat,
-	.plat_auto	= sizeof(struct imx8_power_domain_platdata),
+	.plat_auto	= sizeof(struct imx8_power_domain_plat),
 	.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 4997889..341c83b 100644
--- a/drivers/power/domain/imx8m-power-domain.c
+++ b/drivers/power/domain/imx8m-power-domain.c
@@ -30,7 +30,7 @@
 static int imx8m_power_domain_on(struct power_domain *power_domain)
 {
 	struct udevice *dev = power_domain->dev;
-	struct imx8m_power_domain_platdata *pdata;
+	struct imx8m_power_domain_plat *pdata;
 
 	pdata = dev_get_plat(dev);
 
@@ -49,7 +49,7 @@
 static int imx8m_power_domain_off(struct power_domain *power_domain)
 {
 	struct udevice *dev = power_domain->dev;
-	struct imx8m_power_domain_platdata *pdata;
+	struct imx8m_power_domain_plat *pdata;
 	pdata = dev_get_plat(dev);
 
 	if (pdata->resource_id < 0)
@@ -106,7 +106,7 @@
 
 static int imx8m_power_domain_of_to_plat(struct udevice *dev)
 {
-	struct imx8m_power_domain_platdata *pdata = dev_get_plat(dev);
+	struct imx8m_power_domain_plat *pdata = dev_get_plat(dev);
 
 	pdata->resource_id = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev),
 					    "reg", -1);
@@ -137,6 +137,6 @@
 	.bind = imx8m_power_domain_bind,
 	.probe = imx8m_power_domain_probe,
 	.of_to_plat = imx8m_power_domain_of_to_plat,
-	.plat_auto	= sizeof(struct imx8m_power_domain_platdata),
+	.plat_auto	= sizeof(struct imx8m_power_domain_plat),
 	.ops = &imx8m_power_domain_ops,
 };
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 */