aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-12-11Merge remote-tracking branch 'regulator/topic/sm8767' into regulator-nextMark Brown1-14/+26
2012-12-11Merge remote-tracking branch 'regulator/topic/change' into regulator-nextMark Brown1-1/+1
2012-12-11regulator: core: Fix logic to determinate if regulator can change voltageAxel Lin1-1/+1
Having a linear_min_sel setting means the first linear_min_sel selectors are invalid. We need to subtract linear_min_sel when use n_voltages to determinate if regulator can change voltage. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-11Merge branch 'topic/min' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-changeMark Brown8-199/+1042
2012-12-11regulator: s5m8767: Fix to work even if no DVS gpio presentAmit Daniel Kachhap1-7/+10
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-11regulator: s5m8767: Fix to read the first DVS register.Amit Daniel Kachhap1-3/+3
This patch modifies the DVS register read function to select correct DVS1 register. This change is required because the GPIO select pin is 000 in unintialized state and hence selects the DVS1 register. Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-11regulator: s5m8767: Fix to work when platform registers less regulatorsAmit Daniel Kachhap1-4/+13
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-10Merge remote-tracking branch 'regulator/topic/gpio' into regulator-nextMark Brown1-3/+3
2012-12-10regulator: gpio-regulator: gpio_set_value should use cansleepLee Jones1-2/+2
If it's possible for gpio_set_value to sleep, we should be using the *_cansleep call instead. This patch fixes multiple warnings from gpiolib. Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-10regulator: gpio-regulator: Fix logical error in for() loopLee Jones1-1/+1
The cond-statement of this particular for() loop will always be true as long as at least one voltage-shifting GPIO is present. If it wasn't for the break below, we'd be stuck in a forever loop. This patch inserts the correct cond-statement into the statement. Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-10Merge remote-tracking branch 'regulator/topic/wm831x' into regulator-nextMark Brown1-1/+2
2012-12-10Merge remote-tracking branch 'regulator/topic/tps80031' into regulator-nextMark Brown1-16/+11
2012-12-10Merge remote-tracking branch 'regulator/topic/tps65910' into regulator-nextMark Brown1-0/+7
2012-12-10Merge remote-tracking branch 'regulator/topic/tps6586x' into regulator-nextMark Brown1-1/+1
2012-12-10Merge remote-tracking branch 'regulator/topic/tps65090' into regulator-nextMark Brown1-0/+1
2012-12-10Merge remote-tracking branch 'regulator/topic/tps516312' into regulator-nextMark Brown1-0/+15
2012-12-10Merge remote-tracking branch 'regulator/topic/s2mps11' into regulator-nextMark Brown1-5/+5
2012-12-10Merge remote-tracking branch 'regulator/topic/palmas' into regulator-nextMark Brown1-83/+38
2012-12-10Merge remote-tracking branch 'regulator/topic/min' into regulator-nextMark Brown6-256/+61
2012-12-10Merge remote-tracking branch 'regulator/topic/max8997' into regulator-nextMark Brown1-17/+164
2012-12-10Merge remote-tracking branch 'regulator/topic/max8973' into regulator-nextMark Brown3-0/+516
2012-12-10Merge remote-tracking branch 'regulator/topic/max77686' into regulator-nextMark Brown1-9/+155
2012-12-10Merge remote-tracking branch 'regulator/topic/max1586' into regulator-nextMark Brown1-3/+41
2012-12-10Merge remote-tracking branch 'regulator/topic/lp8788' into regulator-nextMark Brown2-25/+6
2012-12-10Merge remote-tracking branch 'regulator/topic/log' into regulator-nextMark Brown1-2/+7
2012-12-10Merge remote-tracking branch 'regulator/topic/hotplug' into regulator-nextMark Brown63-282/+1905
2012-12-10Merge remote-tracking branch 'regulator/topic/gpio' into regulator-nextMark Brown1-0/+102
2012-12-10Merge remote-tracking branch 'regulator/topic/da9055' into regulator-nextMark Brown3-0/+691
2012-12-10Merge remote-tracking branch 'regulator/topic/da9052' into regulator-nextMark Brown1-5/+5
2012-12-10Merge remote-tracking branch 'regulator/topic/change' into regulator-nextMark Brown1-0/+22
2012-12-10Merge remote-tracking branch 'regulator/topic/as3711' into regulator-nextMark Brown3-0/+377
2012-12-10Merge remote-tracking branch 'regulator/topic/arizona' into regulator-nextMark Brown2-3/+129
2012-12-10regulator: anatop: Use regulator_[get|set]_voltage_sel_regmapAxel Lin1-15/+6
Call regulator_[get|set]_voltage_sel_regmap instead of open code. Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Ying-Chun Liu <paulliu@debian.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-10regulator: anatop: Use linear_min_sel with linear mappingAxel Lin1-8/+7
By setting linear_min_sel to anatop_reg->min_bit_val, we can avoid adjust the anatop_reg->min_bit_val offset in [set|get]_voltage_sel. With this chance we can refactor this driver to use regulator_[get|set]_voltage_sel_regmap. Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Ying-Chun Liu <paulliu@debian.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-10regulator: max1586: Implement get_voltage_sel callbackAxel Lin1-3/+41
This is required since commit f7df20ec32 "regulator: core: Use list_voltage() to read single voltage regulators", otherwise _regulator_get_voltage returns rdev->desc->ops->list_voltage(rdev, 0). The Maxim 1586 controls V3 and V6 voltages, but offers no way of reading back the set up value. Thus this patch caches the setting when setting new voltage. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-10regulator: lp8788-buck: Kill _gpio_request functionAxel Lin1-14/+4
Simply use devm_gpio_request_one() instead. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-07regulator: tps80031: Convert tps80031_ldo_ops to linear_min_sel and list_voltage_linearAxel Lin1-9/+2
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-07regulator: lp8788-ldo: Remove val array in lp8788_config_ldo_enable_modeAxel Lin1-10/+1
To clear the mask bit, setting data argument to be 0 with proper mask setting for lp8788_update_bits. We don't need the var array here. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-06regulator: gpio-regulator: Add ifdef CONFIG_OF guard for regulator_gpio_of_matchAxel Lin1-1/+3
Use of_match_ptr and add ifdef CONFIG_OF guard for regulator_gpio_of_match. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-06regulator: palmas: Convert palmas_ops_smps to regulator_[get|set]_voltage_sel_regmapAxel Lin1-61/+26
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-06regulator: palmas: Return raw register values as the selectors in [get|set]_voltage_selAxel Lin1-24/+14
Don't adjust the selector in [get|set]_voltage_sel, fix it in list_voltage() instead. For smps*(except smps10), the vsel reg-value and voltage mapping as below: reg-value volt (uV) ( Assume RANGE is x1 ) 0 0 1 500000 2 500000 3 500000 4 500000 5 500000 6 500000 (0.49V + 1 * 0.01V) * RANGE 7 510000 (0.49V + 2 * 0.01V) * RANGE 8 520000 (0.49V + 3 * 0.01V) * RANGE 9 530000 (0.49V + 4 * 0.01V) * RANGE .... The linear mapping is start from selector 6. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-06regulators: add regulator_can_change_voltage() functionMarek Szyprowski1-0/+22
Introduce a regulator_can_change_voltage() function for the subsytems or drivers which might check if applying voltage change is possible and use special workaround code when the driver is used with fixed regulators or regulators with disabled ability to change the voltage. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-03regulator: tps51632: Ensure [base|max]_voltage_uV pdata settings are validAxel Lin1-0/+15
If pdata->base_voltage_uV is missing or the settings of pdata->base_voltage_uV and pdata->max_voltage_uV are out of range, TPS51632_VOLT_VSEL macro returns wrong vsel. Thus add checking [base|max]_voltage_uV pdata settings in probe. 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>
2012-12-03regulator: wm831x-dcdc: Add MODULE_ALIAS for wm831x-boostpAxel Lin1-0/+1
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-03regulator: wm831x-dcdc: Ensure selected voltage falls within requested rangeAxel Lin1-1/+1
Use DIV_ROUND_UP to ensure selected voltage won't less than min_uV due to integer truncation. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-28Merge branch 'topic/tps51632' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-minMark Brown1-1/+1
Conflicts: drivers/regulator/tps51632-regulator.c
2012-11-28regulator: tps51632: Use linear_min_sel and regulator_[map|list]_voltage_linearAxel Lin1-10/+5
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>
2012-11-28regulator: pcf50633: Use linear_min_sel and regulator_[map|list]_voltage_linearAxel Lin1-148/+28
This driver can be converted to use linear_min_sel and regulator_[map|list]_voltage_linear. Below shows the equation (from Datasheet) for each LDOs. For AUTOOUT: VO(prog) = 0.625 + auto_out x 0.025 V; e.g. (00000000 to 00101110: reserved) 00101111: 1.8 V (min) 01010011: 2.7 V 01101010: 3.275 V 01101011: 3.300 V 01101100: 3.325 V 01111111 : 3.800 V (max) The linear mapping start from 0x2f selector. Thus we convert this equation to: VO(prog) = 1.8 + (selector - linear_min_sel) x 0.025 V (min_uV = 1800000, uV_step = 25000, linear_min_sel = 0x2f) For DOWNxOUT: VO(prog) = 0.625 + downx_out x 0.025 V; e.g. 00000000 : 0.625 V (min) 00010111 : 1.200 V 00101111 : 1.800 V 01011111 : 3.000 V (max) For xLDOOUT: VO(prog) = 0.9 + xldo_out x 0.1 V; e.g. 00000: 0.9 V 00001: 1.0 V 11000 : 3.3 V 11011 : 3.6 V Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-28regulator: arizona-micsupp: Add ramp time informationMark Brown1-0/+2
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-28regulator: core: Say what unsupportable voltage constraints areMark Brown1-1/+3
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>