diff options
author | Tom Rini <trini@konsulko.com> | 2020-12-14 18:57:57 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-12-14 18:57:57 -0500 |
commit | 8351a29d2df18c92d8e365cfa848218c3859f3d2 (patch) | |
tree | 5d29001be9accfb8029df9d9ed78fba196ee07b9 /drivers/power/regulator/fixed.c | |
parent | ddaa94978583d07ec515e7226e397221d8cc44c8 (diff) | |
parent | b7bbd553de0d9752f919dfc616f560f6f2504c14 (diff) |
Merge tag 'dm-pull-14dec20' of git://git.denx.de/u-boot-dm into next
Driver model tidy-up for livetree
Driver model big rename for consistency
Python 3 clean-ups for patman
Update sandbox serial driver to use membuff
Diffstat (limited to 'drivers/power/regulator/fixed.c')
-rw-r--r-- | drivers/power/regulator/fixed.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/power/regulator/fixed.c b/drivers/power/regulator/fixed.c index 2fa6c7e6b2..d3e0fb672d 100644 --- a/drivers/power/regulator/fixed.c +++ b/drivers/power/regulator/fixed.c @@ -14,26 +14,26 @@ #include "regulator_common.h" -static int fixed_regulator_ofdata_to_platdata(struct udevice *dev) +static int fixed_regulator_of_to_plat(struct udevice *dev) { - struct dm_regulator_uclass_platdata *uc_pdata; - struct regulator_common_platdata *dev_pdata; + struct dm_regulator_uclass_plat *uc_pdata; + struct regulator_common_plat *dev_pdata; - dev_pdata = dev_get_platdata(dev); - uc_pdata = dev_get_uclass_platdata(dev); + dev_pdata = dev_get_plat(dev); + uc_pdata = dev_get_uclass_plat(dev); if (!uc_pdata) return -ENXIO; uc_pdata->type = REGULATOR_TYPE_FIXED; - return regulator_common_ofdata_to_platdata(dev, dev_pdata, "gpio"); + return regulator_common_of_to_plat(dev, dev_pdata, "gpio"); } 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_value(struct udevice *dev) 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; @@ -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 = { @@ -88,6 +88,6 @@ U_BOOT_DRIVER(regulator_fixed) = { .id = UCLASS_REGULATOR, .ops = &fixed_regulator_ops, .of_match = fixed_regulator_ids, - .ofdata_to_platdata = fixed_regulator_ofdata_to_platdata, - .platdata_auto_alloc_size = sizeof(struct regulator_common_platdata), + .of_to_plat = fixed_regulator_of_to_plat, + .plat_auto = sizeof(struct regulator_common_plat), }; |