aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-05-17regulator: s2mpa01: Fix accidental enable of buck4 ramp delayKrzysztof Kozlowski1-5/+9
S2MPA01 supports enabling/disabling ramp delay only for buck[1234]. Other bucks have ramp delay enabled always. However the bit shift for enabling buck4 ramp delay in register is equal to 0. When ramp delay was set for the bucks unsupporting enable/disable (buck[56789] and buck10), the ramp delay for buck4 was also enabled. Fixes: f7b1a8dc1c1c ("regulator: s2mpa01: Don't check enable_shift before setting enable ramp rate") Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Reviewed-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-15mfd: vexpress: Convert custom func API to regmapPawel Moll1-38/+12
Components of the Versatile Express platform (configuration microcontrollers on motherboard and daughterboards in particular) talk to each other over a custom configuration bus. They provide miscellaneous functions (from clock generator control to energy sensors) which are represented as platform devices (and Device Tree nodes). The transactions on the bus can be generated by different "bridges" in the system, some of which are universal for the whole platform (for the price of high transfer latencies), others restricted to a subsystem (but much faster). Until now drivers for such functions were using custom "func" API, which is being replaced in this patch by regmap calls. This required: * a rework (and move to drivers/bus directory, as suggested by Samuel and Arnd) of the config bus core, which is much simpler now and uses device model infrastructure (class) to keep track of the bridges; non-DT case (soon to be retired anyway) is simply covered by a special device registration function * the new config-bus driver also takes over device population, so there is no need for special matching table for of_platform_populate nor "simple-bus" hack in the arm64 model dtsi file (relevant bindings documentation has been updated); this allows all the vexpress devices fit into normal device model, making it possible to remove plenty of early inits and other hacks in the near future * adaptation of the syscfg bridge implementation in the sysreg driver, again making it much simpler; there is a special case of the "energy" function spanning two registers, where they should be both defined in the tree now, but backward compatibility is maintained in the code * modification of the relevant drivers: * hwmon - just a straight-forward API change * power/reset driver - API change * regulator - API change plus error handling simplification * osc clock driver - this one required larger rework in order to turn in into a standard platform driver Signed-off-by: Pawel Moll <pawel.moll@arm.com> Acked-by: Mark Brown <broonie@linaro.org> Acked-by: Lee Jones <lee.jones@linaro.org> Acked-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Mike Turquette <mturquette@linaro.org>
2014-05-14drivers/regulator/virtual: avoid world-writable sysfs files.Rusty Russell1-5/+5
In line with practice for module parameters, we're adding a build-time check that sysfs files aren't world-writable. Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2014-05-08regulator: arizona-micsupp: Add missing #includeCharles Keepax1-0/+1
of.h is presently being included through asm-generic/gpio.h so will not be included on some architectures, causing implicit declaration errors for of_get_child_by_name, of_parse_phandle and of_node_put. This patch adds the direct include that should be there. Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-07regulator: max8952: Make of_device_id array constJingoo Han1-1/+1
Make of_device_id array const, because all OF functions handle it as const. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-07regulator: vexpress: Make of_device_id array constJingoo Han1-1/+1
Make of_device_id array const, because all OF functions handle it as const. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Pawel Moll <pawel.moll@arm.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-07regulator: st-pwm: Make of_device_id array constJingoo Han1-1/+1
Make of_device_id array const, because all OF functions handle it as const. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-07regulator: palmas: Make of_device_id array constJingoo Han1-1/+1
Make of_device_id array const, because all OF functions handle it as const. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-07regulator: anatop: Make of_device_id array constJingoo Han1-1/+1
Make of_device_id array const, because all OF functions handle it as const. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-02regulator: tps65090: Fix tps65090 crash on Tegra DalmoreDoug Anderson1-2/+5
The patch (60e91b5 regulator: tps65090: Allow setting the overcurrent wait time) introduced a crash on Tegra Dalmore. On Dalmore the device tree doesn't have an entry for all of the FETs so it leaves tps_pdata NULL in some cases. Add a check for NULL like the rest of the code does. Reported-by: Olof Johansson <olof@lixom.net> Signed-off-by: Doug Anderson <dianders@chromium.org> Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-01regulator: s2mps11: Allow GPIO 0 to be used as external control on S2MPS14Krzysztof Kozlowski1-11/+11
GPIO 0 is a valid GPIO so allow using it as external control for S2MPS14 regulators. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-01regulator: s5m8767: Allow GPIO 0 to be used as external controlKrzysztof Kozlowski1-14/+6
GPIO 0 is a valid GPIO so allow using it as external control for regulator. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-29regulator: tps65090: Make FETs more reliable by adding retriesDoug Anderson1-15/+140
An issue was discovered with tps65090 where sometimes the FETs wouldn't actually turn on when requested (they would report overcurrent). The most problematic FET was the one used for the LCD backlight on the Samsung ARM Chromebook (FET1). Problems were especially prevalent when the device was plugged in to AC power (when the backlight voltage was higher). Mitigate the problem by adding retries on the enables of the FETs, which works around the problem fairly effectively. Signed-off-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Michael Spang <spang@chromium.org> Signed-off-by: Sean Paul <seanpaul@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-23regulator: max14577: Add support for MAX77836 regulatorsKrzysztof Kozlowski2-38/+246
Add support for MAX77836 chipset and its additional two LDO regulators. These LDO regulators are controlled by the PMIC block with additional regmap (different I2C slave address). The MAX77836 charger and safeout regulators are almost identical to MAX14577. The registers layout is the same, except values for charger's current. The patch adds simple mapping between device type and supported current by the charger regulator. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Reviewed-by: Mark Brown <broonie@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-04-18regulator: arizona-ldo1: Add processing of init_data from device treeCharles Keepax1-2/+32
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-18regulator: arizona-ldo1: Move setup processing from arizona-coreCharles Keepax1-0/+27
It is more idiomatic to process things relating to the regulator in its driver. This patch moves both processing of device tree relating to the regulator and checking if the regulator is external from arizona-core into the regulator driver. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-18regulator: arizona-micsupp: Add processing of init_data from device treeCharles Keepax1-0/+37
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-18regulator: core: Use devres for releasing of_regulator_match of_nodesCharles Keepax1-21/+26
Rather than requiring individual drivers to put the of_nodes returned from of_regulator_match use devres to put them. This also has the benefit it makes the life-time of the of_nodes match the lifetime of the init data also contained in the of_regulator_match structure, which seems more consistent. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-18regulator: tps65217: Use regulator_map_voltage_ascend for LDO1Axel Lin1-0/+1
The voltages in LDO1_VSEL_table are in ascendant order, so use regulator_map_voltage_ascend. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-18regulator: tps65090: Allow setting the overcurrent wait timeDoug Anderson1-0/+56
The tps65090 regulator allows you to specify how long you want it to wait before detecting an overcurrent condition. Allow specifying that through the device tree (or through platform data). Signed-off-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Michael Spang <spang@chromium.org> Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-18regulator: tps65217: Remove *rdev[] from struct tps65217Axel Lin1-3/+0
Now this driver uses devm_regulator_register() so we don't need to save rdev pointer to tps->rdev[i] for cleanup. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-15regulator: pbias: Convert to use regulator_[enable|is_enabled]_regmapAxel Lin1-22/+3
Since commit ca5d1b3524b4d "regulator: helpers: Modify helpers enabling multi-bit control", we can set enable_val setting for device that use multiple bits for control when using regmap enable/disable/bypass ops. Signed-off-by: Axel Lin <axel.lin@ingics.com> Tested-by: Balaji T K <balajitk@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-14regulator: pbias: Convert to use regmap helper functionsAxel Lin1-55/+19
This patch converts this driver to use the regmap helper functions provided by regulator core. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Balaji T K <balajitk@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-14regulator: pbias: Fix is_enabled callback implementationAxel Lin1-1/+1
The is_enabled implementation is wrong in some cases: e.g. for pbias_mmc_omap5: enable_mask is : BIT(27) | BIT(25) | BIT(26) However, pbias_regulator_enable() only sets BIT(27) | BIT(26) bits. So is_enabled callback will always return false in this case. Fix the logic to compare the register value with info->enable rather than info->enable_mask. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Balaji T K <balajitk@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-14regulator: s2mps11: Add external GPIO control for S2MPS14Krzysztof Kozlowski1-2/+65
Add support for external control over GPIO for LDO10, LDO11 and LDO12 S2MPS14 regulators. External control can be turned on by writing 0x0 to control register which in case of other regulators is used for disabling them. These LDO10-LDO12 regulators can be disabled only by I2C GPIO or PWREN pin so the patch actually allows proper way of disabling them. Additionally the GPIO control has two benefits: - It is faster than toggling it over I2C bus. - It allows disabling the regulator during suspend to RAM; The AP will enable it during resume. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-14regulator: s2mps11: Move DTS parsing code to separate functionKrzysztof Kozlowski1-12/+23
Refactor code for parsing DTS to increase a little code readability. The behaviour should not change. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-14regulator: s5m8767: Remove regulator_dev pointer from state containerKrzysztof Kozlowski1-11/+6
Don't store pointer to regulator_dev returned by devm_regulator_register() in state container. It isn't used anywhere outside of probe. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-14regulator: core: Get and put regulator of_nodeCharles Keepax1-1/+2
Currently the regulator core does not take an additional reference to the of_node it is passed. This means that the caller must ensure that the of_node is valid for the duration of the regulator's existance. It is reasonable for the framework to assume it is passed a valid of_node but seems onerous for it to assume the caller will keep the node valid for the life-time of the regulator, especially when devm_regulator_register is used and there will likely be no code in the driver called at the point it would be safe to put the of_node. This patch adds an additional of_node_get when the regulator is registered and an of_node_put when it is unregistered in the core. This means individual drivers are free to put their of_node references at the end of probe letting the regulator core handling it from there. This simplifies code on the driver side. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-14regulator: core: Add helper to put of_nodes from matchesCharles Keepax1-0/+21
As of_regulator_match will take an of_node reference to each matched regulator, it makes sense to provide a helper to put all those references. This patch does that. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-14regulator: core: Add of_node_get to of_regulator_matchCharles Keepax1-2/+3
Currently, of_regulator_match does not increment the reference count of the of_nodes it takes new references to. This could cause the node pointer held to be invalid, by the time it is passed to the regulator core. This patchs adds an of_node_get when we copy each of_node pointer into the match structure. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-14regulator: AXP20x: Add support for regulators subsystemCarlo Caione3-0/+293
AXP202 and AXP209 come with two synchronous step-down DC-DCs and five LDOs. This patch introduces basic support for those regulators. Signed-off-by: Carlo Caione <carlo@caione.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-11Merge tag 'regulator-v3.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulatorLinus Torvalds4-14/+12
Pull regulator fixes from Mark Brown: "A few driver specific fixes that have come in over the merge window, all only relevant for the specific driver" * tag 'regulator-v3.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: bcm590xx: Set n_voltages for linear reg regulator: s5m8767: Fix carried over ena_gpio assignment regulator: s2mps11: Don't check enable_shift before setting enable ramp rate regulator: s2mpa01: Don't check enable_shift before setting enable ramp rate
2014-04-10Merge remote-tracking branches 'regulator/fix/bcm590xx', 'regulator/fix/s2m' and 'regulator/fix/s5m8767' into regulator-linusMark Brown4-14/+12
2014-04-10regulator: bcm590xx: Set n_voltages for linear regTim Kryger1-0/+1
Fix the macro used to define linear range regulators to include the number of voltages. Signed-off-by: Tim Kryger <tim.kryger@linaro.org> Acked-by: Matt Porter <mporter@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-09Merge tag 'mmc-updates-for-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmcLinus Torvalds3-0/+265
Pull MMC updates from Chris Ball: "MMC highlights for 3.15: Core: - CONFIG_MMC_UNSAFE_RESUME=y is now default behavior - DT bindings for SDHCI UHS, eMMC HS200, high-speed DDR, at 1.8/1.2V - Add GPIO descriptor based slot-gpio card detect API Drivers: - dw_mmc: Refactor SOCFPGA support as a variant inside dw_mmc-pltfm.c - mmci: Support HW busy detection on ux500 - omap: Support MMC_ERASE - omap_hsmmc: Support MMC_PM_KEEP_POWER, MMC_PM_WAKE_SDIO_IRQ, (a)cmd23 - rtsx: Support pre-req/post-req async - sdhci: Add support for Realtek RTS5250 controllers - sdhci-acpi: Add support for 80860F16, fix 80860F14/SDIO card detect - sdhci-msm: Add new driver for Qualcomm SDHCI chipset support - sdhci-pxav3: Add support for Marvell Armada 380 and 385 SoCs" * tag 'mmc-updates-for-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (102 commits) mmc: sdhci-acpi: Intel SDIO has broken card detect mmc: sdhci-pxav3: add support for the Armada 38x SDHCI controller mmc: sdhci-msm: Add platform_execute_tuning implementation mmc: sdhci-msm: Initial support for Qualcomm chipsets mmc: sdhci-msm: Qualcomm SDHCI binding documentation sdhci: only reprogram retuning timer when flag is set mmc: rename ARCH_BCM to ARCH_BCM_MOBILE mmc: sdhci: Allow for irq being shared mmc: sdhci-acpi: Add device id 80860F16 mmc: sdhci-acpi: Fix broken card detect for ACPI HID 80860F14 mmc: slot-gpio: Add GPIO descriptor based CD GPIO API mmc: slot-gpio: Split out CD IRQ request into a separate function mmc: slot-gpio: Record GPIO descriptors instead of GPIO numbers Revert "dts: socfpga: Add support for SD/MMC on the SOCFPGA platform" mmc: sdhci-spear: use generic card detection gpio support mmc: sdhci-spear: remove support for power gpio mmc: sdhci-spear: simplify resource handling mmc: sdhci-spear: fix platform_data usage mmc: sdhci-spear: fix error handling paths for DT mmc: sdhci-bcm-kona: fix build errors when built-in ...
2014-04-07regulator: s5m8767: Fix carried over ena_gpio assignmentKrzysztof Kozlowski1-0/+1
During registration of regulators if external control for regulator was set in DTS the ena_gpio and ena_gpio_flags fields of regulator_config were set to proper values. However the same regulator_config was used in next iterations of loop so the ena_gpio fields carried over to next regulators. The issue was not observed as ena_gpio is supported only for Buck9 regulator which is often the last regulator parsed from DTS. Be sure to clear ena_gpio config fields before registering the regulator. Fixes: ee1e0994ab1bd (regulator: s5m8767: Use GPIO for controlling Buck9/eMMC) Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-02Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivialLinus Torvalds1-1/+1
Pull trivial tree updates from Jiri Kosina: "Usual rocket science -- mostly documentation and comment updates" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: sparse: fix comment doc: fix double words isdn: capi: fix "CAPI_VERSION" comment doc: DocBook: Fix typos in xml and template file Bluetooth: add module name for btwilink driver core: unexport static function create_syslog_header mmc: core: typo fix in printk specifier ARM: spear: clean up editing mistake net-sysfs: fix comment typo 'CONFIG_SYFS' doc: Insert MODULE_ in module-signing macros Documentation: update URL to hfsplus Technote 1150 gpio: update path to documentation ixgbe: Fix format string in ixgbe_fcoe. Kconfig: Remove useless "default N" lines user_namespace.c: Remove duplicated word in comment CREDITS: fix formatting treewide: Fix typo in Documentation/DocBook mm: Fix warning on make htmldocs caused by slab.c ata: ata-samsung_cf: cleanup in header file idr: remove unused prototype of idr_free()
2014-04-02regulator: s2mps11: Don't check enable_shift before setting enable ramp rateAxel Lin1-7/+5
Current code misses updating the register when enable_shift is 0. e.g. S2MPS11_BUCK9_RAMP_SHIFT and S2MPS11_BUCK6_RAMP_EN_SHIFT are 0. Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-02regulator: s2mpa01: Don't check enable_shift before setting enable ramp rateAxel Lin1-7/+5
Current code misses updating the register when enable_shift is 0. e.g. S2MPA01_BUCK4_RAMP_EN_SHIFT is 0. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-26Merge remote-tracking branches 'regulator/topic/tps65218', 'regulator/topic/tps6524x', 'regulator/topic/tps6586x', 'regulator/topic/tps65910', 'regulator/topic/tps80031', 'regulator/topic/wm831x', 'regulator/topic/wm8350' and 'regulator/topic/wm8994' into regulator-nextMark Brown12-67/+320
2014-03-26Merge remote-tracking branches 'regulator/topic/s5m8767', 'regulator/topic/st-pwm', 'regulator/topic/ti-abb', 'regulator/topic/tps51632', 'regulator/topic/tps62360', 'regulator/topic/tps6507x', 'regulator/topic/tps65090' and 'regulator/topic/tps65217' into regulator-nextMark Brown10-184/+400
2014-03-26Merge remote-tracking branches 'regulator/topic/max8973', 'regulator/topic/max8997', 'regulator/topic/max8998', 'regulator/topic/mc13xxx', 'regulator/topic/pfuze100', 'regulator/topic/rc5t583' and 'regulator/topic/s2mps11' into regulator-nextMark Brown10-192/+954
2014-03-26Merge remote-tracking branches 'regulator/topic/max1586', 'regulator/topic/max77686', 'regulator/topic/max77693', 'regulator/topic/max8649', 'regulator/topic/max8660', 'regulator/topic/max8907', 'regulator/topic/max8925' and 'regulator/topic/max8952' into regulator-nextMark Brown8-97/+70
2014-03-26Merge remote-tracking branches 'regulator/topic/doc', 'regulator/topic/enable', 'regulator/topic/fan53555', 'regulator/topic/fixed', 'regulator/topic/gpio', 'regulator/topic/lp3971', 'regulator/topic/lp872x' and 'regulator/topic/max14577' into regulator-nextMark Brown7-78/+77
2014-03-26Merge remote-tracking branches 'regulator/topic/bcm590xx', 'regulator/topic/da9052', 'regulator/topic/da9055', 'regulator/topic/da9063', 'regulator/topic/da9210', 'regulator/topic/db8500' and 'regulator/topic/dbx500' into regulator-nextMark Brown9-26/+520
2014-03-26Merge remote-tracking branches 'regulator/topic/88pm800', 'regulator/topic/88pm8607', 'regulator/topic/aat2870', 'regulator/topic/act8865', 'regulator/topic/anatop', 'regulator/topic/arizona', 'regulator/topic/as3711' and 'regulator/topic/as3722' into regulator-nextMark Brown9-59/+130
2014-03-26Merge remote-tracking branch 'regulator/topic/core' into regulator-nextMark Brown4-4/+22
2014-03-26regulator: aat2870: Use regulator_map_voltage_ascendAxel Lin1-0/+1
The voltages in aat2870_ldo_voltages table are in ascendant order, so use regulator_map_voltage_ascend. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-24regulator: st-pwm: Convert to get_voltage_selAxel Lin1-6/+3
Also remove test for selector in st_pwm_regulator_set_voltage_sel, the checking is already done in .list_voltage. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-21regulator: Add new driver for ST's PWM controlled voltage regulatorsLee Jones3-0/+200
On some STMicroelectronics hardware reside regulators consisting partly of a PWM input connected to the feedback loop. As the PWM duty-cycle is varied the output voltage adapts. This driver allows us to vary the output voltage by adapting the PWM input duty-cycle. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>