From 93c0203357dd05068309c1141a802585f7c6be27 Mon Sep 17 00:00:00 2001 From: Simone Willett Date: Tue, 31 Jul 2012 16:30:10 -0700 Subject: Revert "regulator: tps80031: rename regulator-name enums" This reverts commit 5bc340e408aa3f009651735c71f3c97676fbe79f Change-Id: I70e40e9cf025c73fde46d1a5577547dc37182a64 Reviewed-on: http://git-master/r/119800 Reviewed-by: Simone Willett Tested-by: Simone Willett --- arch/arm/mach-tegra/board-enterprise-power.c | 2 +- drivers/regulator/tps80031-regulator.c | 26 ++++++++++----------- include/linux/regulator/tps80031-regulator.h | 34 ++++++++++++++-------------- 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/arch/arm/mach-tegra/board-enterprise-power.c b/arch/arm/mach-tegra/board-enterprise-power.c index 4698c75b56b6..37d4576feb96 100644 --- a/arch/arm/mach-tegra/board-enterprise-power.c +++ b/arch/arm/mach-tegra/board-enterprise-power.c @@ -340,7 +340,7 @@ static struct tps80031_bg_platform_data battery_gauge_data = { #define TPS_REG(_id, _data, _sname) \ { \ - .id = TPS80031_REGULATOR_##_id, \ + .id = TPS80031_ID_##_id, \ .name = "tps80031-regulator", \ .platform_data = &pdata_##_data##_##_sname, \ } diff --git a/drivers/regulator/tps80031-regulator.c b/drivers/regulator/tps80031-regulator.c index 925012330169..33d4b62e58da 100644 --- a/drivers/regulator/tps80031-regulator.c +++ b/drivers/regulator/tps80031-regulator.c @@ -514,7 +514,7 @@ static int tps80031ldo_list_voltage(struct regulator_dev *rdev, unsigned index) if (index == 0) return 0; - if ((ri->desc.id == TPS80031_REGULATOR_LDO2) && + if ((ri->desc.id == TPS80031_ID_LDO2) && (ri->flags & TRACK_MODE_ENABLE)) return (ri->min_mV + (((index - 1) * 125))/10) * 1000; @@ -572,7 +572,7 @@ static int __tps80031_ldo_set_voltage(struct device *parent, if ((min_uV/1000 < ri->min_mV) || (max_uV/1000 > ri->max_mV)) return -EDOM; - if ((ri->desc.id == TPS80031_REGULATOR_LDO2) && + if ((ri->desc.id == TPS80031_ID_LDO2) && (ri->flags & TRACK_MODE_ENABLE)) return __tps80031_ldo2_set_voltage_track_mode(parent, ri, min_uV, max_uV); @@ -608,7 +608,7 @@ static int tps80031ldo_get_voltage(struct regulator_dev *rdev) uint8_t vsel; - if ((ri->desc.id == TPS80031_REGULATOR_LDO2) && + if ((ri->desc.id == TPS80031_ID_LDO2) && (ri->flags & TRACK_MODE_ENABLE)) { vsel = ri->volt_reg_cache & 0x3F; return (ri->min_mV + (((vsel - 1) * 125))/10) * 1000; @@ -756,12 +756,12 @@ static struct regulator_ops tps80031vbus_ops = { .force_reg = _force_reg, \ .volt_reg = _volt_reg, \ .volt_id = _volt_id, \ - .id = TPS80031_REGULATOR_##_id, \ + .id = TPS80031_ID_##_id, \ .min_mV = min_mVolts, \ .max_mV = max_mVolts, \ .desc = { \ .name = tps80031_rails(_id), \ - .id = TPS80031_REGULATOR_##_id, \ + .id = TPS80031_ID_##_id, \ .n_voltages = _n_volt, \ .ops = &_ops, \ .type = REGULATOR_VOLTAGE, \ @@ -856,7 +856,7 @@ static int tps80031_regulator_preinit(struct device *parent, int ret = 0; uint8_t reg_val; - if (ri->desc.id == TPS80031_REGULATOR_LDOUSB) { + if (ri->desc.id == TPS80031_ID_LDOUSB) { if (ri->platform_flags & USBLDO_INPUT_VSYS) ret = tps80031_update(parent, SLAVE_ID1, TPS80031_MISC2_ADD, @@ -872,7 +872,7 @@ static int tps80031_regulator_preinit(struct device *parent, } } - if (ri->desc.id == TPS80031_REGULATOR_LDO3) { + if (ri->desc.id == TPS80031_ID_LDO3) { if (ri->platform_flags & LDO3_OUTPUT_VIB) ret = tps80031_update(parent, SLAVE_ID1, TPS80031_MISC2_ADD, @@ -961,22 +961,22 @@ static void check_smps_mode_mult(struct device *parent, { int mult_offset; switch (ri->desc.id) { - case TPS80031_REGULATOR_VIO: + case TPS80031_ID_VIO: mult_offset = SMPS_MULTOFFSET_VIO; break; - case TPS80031_REGULATOR_SMPS1: + case TPS80031_ID_SMPS1: mult_offset = SMPS_MULTOFFSET_SMPS1; break; - case TPS80031_REGULATOR_SMPS2: + case TPS80031_ID_SMPS2: mult_offset = SMPS_MULTOFFSET_SMPS2; break; - case TPS80031_REGULATOR_SMPS3: + case TPS80031_ID_SMPS3: mult_offset = SMPS_MULTOFFSET_SMPS3; break; - case TPS80031_REGULATOR_SMPS4: + case TPS80031_ID_SMPS4: mult_offset = SMPS_MULTOFFSET_SMPS4; break; - case TPS80031_REGULATOR_LDO2: + case TPS80031_ID_LDO2: ri->flags = (tps80031_get_smps_mult(parent) & (1 << 5)) ? TRACK_MODE_ENABLE : 0; /* TRACK mode the ldo2 varies from 600mV to 1300mV */ diff --git a/include/linux/regulator/tps80031-regulator.h b/include/linux/regulator/tps80031-regulator.h index 1609eeee6763..4dfdf7950918 100644 --- a/include/linux/regulator/tps80031-regulator.h +++ b/include/linux/regulator/tps80031-regulator.h @@ -29,23 +29,23 @@ #define tps80031_rails(_name) "tps80031_"#_name enum { - TPS80031_REGULATOR_VIO, - TPS80031_REGULATOR_SMPS1, - TPS80031_REGULATOR_SMPS2, - TPS80031_REGULATOR_SMPS3, - TPS80031_REGULATOR_SMPS4, - TPS80031_REGULATOR_VANA, - TPS80031_REGULATOR_LDO1, - TPS80031_REGULATOR_LDO2, - TPS80031_REGULATOR_LDO3, - TPS80031_REGULATOR_LDO4, - TPS80031_REGULATOR_LDO5, - TPS80031_REGULATOR_LDO6, - TPS80031_REGULATOR_LDO7, - TPS80031_REGULATOR_LDOLN, - TPS80031_REGULATOR_LDOUSB, - TPS80031_REGULATOR_VBUS, - TPS80031_REGULATOR_CHARGER, + TPS80031_ID_VIO, + TPS80031_ID_SMPS1, + TPS80031_ID_SMPS2, + TPS80031_ID_SMPS3, + TPS80031_ID_SMPS4, + TPS80031_ID_VANA, + TPS80031_ID_LDO1, + TPS80031_ID_LDO2, + TPS80031_ID_LDO3, + TPS80031_ID_LDO4, + TPS80031_ID_LDO5, + TPS80031_ID_LDO6, + TPS80031_ID_LDO7, + TPS80031_ID_LDOLN, + TPS80031_ID_LDOUSB, + TPS80031_ID_VBUS, + TPS80031_ID_CHARGER, }; -- cgit v1.2.3