summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
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/tol' into regulator-nextMark Brown1-0/+8
2012-12-10Merge remote-tracking branch 'regulator/topic/stub' into regulator-nextMark Brown1-0/+4
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 Brown7-256/+63
2012-12-10Merge remote-tracking branch 'regulator/topic/max8997' into regulator-nextMark Brown5-18/+384
2012-12-10Merge remote-tracking branch 'regulator/topic/max8973' into regulator-nextMark Brown4-0/+588
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 Brown72-401/+2073
2012-12-10Merge remote-tracking branch 'regulator/topic/gpio' into regulator-nextMark Brown2-0/+139
2012-12-10Merge remote-tracking branch 'regulator/topic/da9055' into regulator-nextMark Brown4-3/+715
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 Brown2-0/+23
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 Brown4-3/+148
2012-12-10Merge remote-tracking branch 'regulator/fix/wm831x' into regulator-nextMark Brown1-1/+1
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: 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 ↵Axel Lin1-61/+26
regulator_[get|set]_voltage_sel_regmap 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 ↵Axel Lin1-24/+14
[get|set]_voltage_sel 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 Szyprowski2-0/+23
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-11-28Merge branch 'topic/tps51632' of ↵Mark Brown1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-min 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>
2012-11-28regulator: core: Log when a device causes a voltage constraint failMark Brown1-1/+4
Helps with figuring out when things went wrong. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-28regulator: arizona-ldo1: Support 1.8V modeMark Brown3-1/+125
Some Arizona device support a 1.8V output mode. Enable this in the driver. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-28regulator: arizona-ldo1: Add additional top voltageMark Brown1-1/+1
The number of voltage slots supported by the LDO is 7, not 6. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-28regulator: arizona-ldo1: Support DVFS in default constraintsMark Brown1-1/+19
Some Arizona devices such as the WM5102 can use DVFS on their digital core, for these devices allow the voltage range to vary in the default setup. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-28regulator: arizona-ldo1: Add enable timeMark Brown1-0/+1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-27regulator: as3711: Fix the logic in as3711_sel_checkAxel Lin1-15/+8
Below equation means the "voltage" is the "smallest" voltage within specific range. ret = DIV_ROUND_UP(min - bottom) / step; voltage = ret * step + bottom; If we do try 1 down when (voltage > max), new voltage is then less than min voltage. Which means the new voltage is not in the requested voltage range. This patch also includes below cleanups: - Use DIV_ROUND_UP - rename variable 'ret' to 'sel' for better readability because as3711_sel_check returns the selector. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-27regulator: as3711: Fix valid min_uV/max_UV checking in as3711_bound_checkAxel Lin1-6/+3
Below cases are supposed to be valid: min_uV == max_uV == info->max_uV min_uV == max_uV == rdev->desc->min_uV Don't return -EINVAL for above cases. This patch also includes below cleanups: - Use rdev_get_drvdata(rdev) instead of rdev->reg_data. - Remove unnecessary WARN_ON, it looks pointless. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-27regulator: s2mps11: Fix ramp delay value shift operationSangbeom Kim1-5/+5
This patch fix the abnormal ramp delay setting. The shift operation was wrong. Signed-off-by: Sangbeom Kim <sbkim73@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
2012-11-27regulator: da9052: Ensure setting current limit within specific rangeAxel Lin1-5/+5
Checking da9052_current_limits[row][i] <= max_uA is not enough, it is possible da9052_current_limits[row][i] may less than the requested min_uA. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-27regulator: da9055: Select maximum current in specific range for ↵Axel Lin1-12/+9
set_current_limit Selecting the minimal value is only true for voltage regulators. For current regulators the maximum in the given range should be selected instead. This issue was reported by Heiko Stuebner for gpio-regulator driver [1], and the conclusion is to select the max current for current regulators [2]. [1] https://lkml.org/lkml/2012/8/5/162 [2] https://lkml.org/lkml/2012/8/6/183 This patch also ensures da9055_buck_set_current_limit return -EINVAL when the supported current limit does not meet the request range. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-27regulator: tps6586x: fix build warning in debug buildLaxman Dewangan1-1/+1
When building the driver in debug mode, it generates warning as drivers/regulator/tps6586x-regulator.c: In function 'tps6586x_regulator_probe': drivers/regulator/tps6586x-regulator.c:392:9: warning: 'id' is used uninitialized in this function [-Wuninitialized] Fix this warning. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reported-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-27regulator: tps51632: Fix writing to wrong register when enable_pwm_dvfs is setAxel Lin1-1/+1
When tps->enable_pwm_dvfs is true, write to TPS51632_VOLTAGE_BASE_REG rather than TPS51632_VOLTAGE_SELECT_REG. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-27regulator: da9055: Use linear_min_sel and regulator_[map|list]_voltage_linearAxel Lin1-47/+8
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>