summaryrefslogtreecommitdiff
path: root/drivers/regulator
AgeCommit message (Collapse)Author
2013-04-28Merge remote-tracking branch 'regulator/topic/wm8994' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/twl' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/tps80031' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/tps6586x' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/tps65023' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/tps62360' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/s5m8767' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/rc5t583' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/palmas' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/max8998' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/max8997' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/max8973' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/max8952' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/max8925' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/max77686' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/max1586' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/lp8788' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/gpio' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/fan53555' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/enable-invert' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/core' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/ascend' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/as3711' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/arizona' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/ab8500' into v3.9-rc8Mark Brown
2013-04-28Merge remote-tracking branch 'regulator/topic/ab3100' into v3.9-rc8Mark Brown
2013-04-28regulator: mc13892: Fix MC13892_SWITCHERS0_SWxHI bit in set_voltage_selAxel Lin
It is necessary to clear MC13892_SWITCHERS0_SWxHI bit when set voltage to the voltage range from 1100000 to 1375000. Leaving MC13892_SWITCHERS0_SWxHI bit untouched may result in wrong voltage setting. For example, currently switch voltage from 1400000 to 1300000 will set the voltage to 1800000 because the HI bit is still set. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@sirena.org.uk>
2013-04-28regulator: Remove NULL test before calling regulator_unregister()Axel Lin
It's safe to call regulator_unregister() with NULL, thus remove the NULL test before regulator_unregister() calls. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@sirena.org.uk>
2013-04-28regulator: mc13783: Add device tree probe supportAlexander Shiyan
Patch adds device tree probe support for mc13783-regulator driver. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Mark Brown <broonie@sirena.org.uk>
2013-04-28regulator: mc13xxx: Add warning of incorrect names of regulatorsAlexander Shiyan
This patch adds a warning about incorrect regulators instead of printing the names of non-information message about the wrong amount. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Mark Brown <broonie@sirena.org.uk>
2013-04-28regulator: max77686: Don't update max77686->opmode if update register failsAxel Lin
Ensure max77686->opmode always has correct status. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@sirena.org.uk>
2013-04-26regulator: max8952: Add missing config.of_node setting for regulator registerAxel Lin
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-26regulator: ab3100: Fix regulator register error handlingAxel Lin
Ensure to unregister all regulators before return error in probe(). The regulator register order depends on the regulator ID pass to ab3100_regulator_register() function. Thus we need to scan ab3100_regulator_desc and find the index of successfully registered regulators, or alternatively just call ab3100_regulators_remove() to unregister all registered regulators. Since current code uses a static ab3100_regulators table, explicitly set reg->rdev = NULL after regulator_unregister() call to ensure calling ab3100_regulators_remove() in the unwind path always work. Also move ab3100_regulators_remove() to avoid forward declaration. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-26regulator: tps6524x: Use regulator_map_voltage_ascendAxel Lin
All regulators have ascendant voltage list in this driver. Use regulator_map_voltage_ascend for them. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-25regulator: lp8788-buck: Use regulator_map_voltage_ascendAxel Lin
All regulators have ascendant voltage list in this driver. Use regulator_map_voltage_ascend for them. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-25regulator: lp872x: Use regulator_map_voltage_ascendAxel Lin
All regulators have ascendant voltage list in this driver. Use regulator_map_voltage_ascend for them. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-25regulator: mc13892: Use regulator_map_voltage_ascend for ↵Axel Lin
mc13892_sw_regulator_ops Both mc13892_sw1 and mc13892_sw voltage table have ascendant voltage list. Use regulator_map_voltage_ascend for them. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-25regulator: tps65023: Use regulator_map_voltage_ascendAxel Lin
All regulators have ascendant voltage list in this driver. Use regulator_map_voltage_ascend for them. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-25regulator: tps65023: Merge tps65020 ldo1 and ldo2 vsel tableAxel Lin
tps65020 ldo1 and ldo2 vsel tables are identical, merge them. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-25regulator: tps6507x: Use regulator_map_voltage_ascendAxel Lin
All regulators have ascendant voltage list in this driver. Use regulator_map_voltage_ascend for them. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-24regulator: ab3100: device tree supportLinus Walleij
This implements device tree support for the AB3100 regulators driver. The initial settings are moved out of platform data and into the driver for the device tree case, as it appears that there is no way to supply this as AUXDATA for an I2C device. The style and bindings are heavily inspired by Lee Jones' style for AB8500. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-24regulator: ab3100: refactor probe to use IDsLinus Walleij
This refactors the AB3100 regulator probe to use regulator IDs and pass this to a separate registration function. This works much smoother when migrating to device tree, as we can use a match table with this regulator ID encoded in the .driver_data. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-24regulator: max8973: Don't override control1 variable when set ramp delay bitsAxel Lin
Current code overrides control1 variable when setting ramp delay bits. Fix it by just setting ramp_delay bits. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-23regulator: tps80031: Convert tps80031_dcdc_ops to [get|set]_voltage_sel_regmapAxel Lin
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-23regulator: tps80031: Fix LDO2 track mode for TPS80031 or TPS80032-ES1.0Axel Lin
Currently we have a special code in tps80031_ldo_set_voltage_sel() to handle LDO2 track mode for TPS80031 or TPS80032-ES1.0. The purpose is to address below issues: Issue description: - LDO2 traking mode is enabled - LDO2 tracks SMPS2 voltage. - LDO2 automatically switch-off when LDO2_CFG_VOLTAGE is changed to some discrete values (non exhaustive list): 00011001, 00011010, 00011011, 00011100, . - LDO2 switch-on again when LDO2_CFG_VOLTAGE is changed to other values (non exhaustive list): 00011000, 00010111, . LDOs have reserved codes. For these codes, LDO is switch-off. In tracking, LDO2 ref comes from SMPS2. However LDO2 enable is still gated by LDO2 VSEL decoding. As a result, in tracking mode LDO2 will be disabled for following code (SMPS VSEL format): 000000 & 100000 (MSB not decoded) 011001 & 111001 (MSB not decoded) 011010 & 111010 (MSB not decoded) 011100 & 111100 (MSB not decoded) 011101 & 111101 (MSB not decoded) 011110 & 111110 (MSB not decoded) However, current code has below bugs: 1. It uses regulator_list_voltage_linear, so list_voltage() still shows above invalid selectors have supported voltage. 2. Current code may return -EINVAL in tps80031_ldo_set_voltage_sel() for supported voltage. This is because when we use regulator_list_voltage_linear as list_voltage callback, regulator core will default use regulator_map_voltage_linear(). regulator_map_voltage_linear() has an assumption that the voltages are linear which is not true for this case. For example, when request voltage range is: min_uV=950000 uV && max_uV=1200000 uV regulator_map_voltage_linear() returns the selector is 29 (0x1D), set_voltage_sel() returns -EINVAL. (The selector is in invalid range, 0x19 ~ 0x1f). In above case, map_voltage() should find the lowest valid voltage within specific range (selector = 0x20) and set_voltage_sel() should successfully set the voltage to 987500 uV. This patch fixes these issues by: 1. Add checking valid setting for LDO2 track mode of TPS80031 or TPS80032-ES1.0 in list_voltage. So it returns -EINVAL for invalid selectors. 2. Implement tps80031_ldo_map_voltage, use regulator_map_voltage_iterate() to find the lowest voltage within specific range for TPS80031 or TPS80032-ES1.0. This is required when the voltage map is no longer linear. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-23regulator: tps6586x: Convert to use regulator_map_voltage_ascendAxel Lin
All regulators have ascendant voltage list in this driver. Thus use regulator_map_voltage_ascend is more efficient than the default regulator_map_voltage_iterate. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-23regulator: tps65910: Convert to use regulator_map_voltage_ascendAxel Lin
All regulators have ascendant voltage list in this driver. Some regulators have more than 200 supported voltages. e.g. For TPS65910_REG_VDD1 and TPS65910_REG_VDD2: n_voltages = VDD1_2_NUM_VOLT_FINE * VDD1_2_NUM_VOLT_COARSE = 73 * 3 = 219 Thus it worth converting to regulator_map_voltage_ascend rather than use default regulator_map_voltage_iterate. For consistent, convert all regulators to regulator_map_voltage_ascend. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-23regulator: lp3972: Convert to use regulator_map_voltage_ascendAxel Lin
All regulators have ascendant voltage list in this driver. Thus use regulator_map_voltage_ascend is more efficient than the default regulator_map_voltage_iterate. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-23regulator: lp3971: Convert to use regulator_map_voltage_ascendAxel Lin
All regulators have ascendant voltage list in this driver. Thus use regulator_map_voltage_ascend is more efficient than the default regulator_map_voltage_iterate. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-23regulator: tps65023: Use [set|get]_voltage_sel_regmap instead of open codedAxel Lin
Simply the [get|set]_voltage_sel implementation by using regulator_[set|get]_voltage_sel_regmap instead of open coded. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>