From 54c710020c117465058e12a77b66257177bc328c Mon Sep 17 00:00:00 2001 From: Simone Willett Date: Tue, 31 Jul 2012 16:32:09 -0700 Subject: Revert "Revert "regulator: tps80031: rename regulator-name enums"" This reverts commit 70e40e9cf025c73fde46d1a5577547dc37182a64 Change-Id: Iaf390c0d3ea16686f619f321bceea572ee7434fc Reviewed-on: http://git-master/r/119802 Reviewed-by: Simone Willett Tested-by: Simone Willett --- drivers/regulator/tps80031-regulator.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'drivers/regulator/tps80031-regulator.c') diff --git a/drivers/regulator/tps80031-regulator.c b/drivers/regulator/tps80031-regulator.c index 33d4b62e58da..925012330169 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_ID_LDO2) && + if ((ri->desc.id == TPS80031_REGULATOR_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_ID_LDO2) && + if ((ri->desc.id == TPS80031_REGULATOR_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_ID_LDO2) && + if ((ri->desc.id == TPS80031_REGULATOR_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_ID_##_id, \ + .id = TPS80031_REGULATOR_##_id, \ .min_mV = min_mVolts, \ .max_mV = max_mVolts, \ .desc = { \ .name = tps80031_rails(_id), \ - .id = TPS80031_ID_##_id, \ + .id = TPS80031_REGULATOR_##_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_ID_LDOUSB) { + if (ri->desc.id == TPS80031_REGULATOR_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_ID_LDO3) { + if (ri->desc.id == TPS80031_REGULATOR_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_ID_VIO: + case TPS80031_REGULATOR_VIO: mult_offset = SMPS_MULTOFFSET_VIO; break; - case TPS80031_ID_SMPS1: + case TPS80031_REGULATOR_SMPS1: mult_offset = SMPS_MULTOFFSET_SMPS1; break; - case TPS80031_ID_SMPS2: + case TPS80031_REGULATOR_SMPS2: mult_offset = SMPS_MULTOFFSET_SMPS2; break; - case TPS80031_ID_SMPS3: + case TPS80031_REGULATOR_SMPS3: mult_offset = SMPS_MULTOFFSET_SMPS3; break; - case TPS80031_ID_SMPS4: + case TPS80031_REGULATOR_SMPS4: mult_offset = SMPS_MULTOFFSET_SMPS4; break; - case TPS80031_ID_LDO2: + case TPS80031_REGULATOR_LDO2: ri->flags = (tps80031_get_smps_mult(parent) & (1 << 5)) ? TRACK_MODE_ENABLE : 0; /* TRACK mode the ldo2 varies from 600mV to 1300mV */ -- cgit v1.2.3