aboutsummaryrefslogtreecommitdiff
path: root/drivers/regulator
AgeCommit message (Collapse)AuthorFilesLines
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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-04-11Merge tag 'regulator-v3.15-fixes' of ↵Linus Torvalds4-14/+12
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator 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' ↵Mark Brown4-14/+12
and 'regulator/fix/s5m8767' into regulator-linus
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 <[email protected]> Acked-by: Matt Porter <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-04-09Merge tag 'mmc-updates-for-3.15-rc1' of ↵Linus Torvalds3-0/+265
git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc 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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-04-02Merge branch 'for-linus' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 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 <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
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 <[email protected]> Acked-by: Sachin Kamat <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-26Merge remote-tracking branches 'regulator/topic/tps65218', ↵Mark Brown12-67/+320
'regulator/topic/tps6524x', 'regulator/topic/tps6586x', 'regulator/topic/tps65910', 'regulator/topic/tps80031', 'regulator/topic/wm831x', 'regulator/topic/wm8350' and 'regulator/topic/wm8994' into regulator-next
2014-03-26Merge remote-tracking branches 'regulator/topic/s5m8767', ↵Mark Brown10-184/+400
'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-next
2014-03-26Merge remote-tracking branches 'regulator/topic/max8973', ↵Mark Brown10-192/+954
'regulator/topic/max8997', 'regulator/topic/max8998', 'regulator/topic/mc13xxx', 'regulator/topic/pfuze100', 'regulator/topic/rc5t583' and 'regulator/topic/s2mps11' into regulator-next
2014-03-26Merge remote-tracking branches 'regulator/topic/max1586', ↵Mark Brown8-97/+70
'regulator/topic/max77686', 'regulator/topic/max77693', 'regulator/topic/max8649', 'regulator/topic/max8660', 'regulator/topic/max8907', 'regulator/topic/max8925' and 'regulator/topic/max8952' into regulator-next
2014-03-26Merge remote-tracking branches 'regulator/topic/doc', ↵Mark Brown7-78/+77
'regulator/topic/enable', 'regulator/topic/fan53555', 'regulator/topic/fixed', 'regulator/topic/gpio', 'regulator/topic/lp3971', 'regulator/topic/lp872x' and 'regulator/topic/max14577' into regulator-next
2014-03-26Merge remote-tracking branches 'regulator/topic/bcm590xx', ↵Mark Brown9-26/+520
'regulator/topic/da9052', 'regulator/topic/da9055', 'regulator/topic/da9063', 'regulator/topic/da9210', 'regulator/topic/db8500' and 'regulator/topic/dbx500' into regulator-next
2014-03-26Merge remote-tracking branches 'regulator/topic/88pm800', ↵Mark Brown9-59/+130
'regulator/topic/88pm8607', 'regulator/topic/aat2870', 'regulator/topic/act8865', 'regulator/topic/anatop', 'regulator/topic/arizona', 'regulator/topic/as3711' and 'regulator/topic/as3722' into regulator-next
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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
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 <[email protected]> Acked-by: Lee Jones <[email protected]> Signed-off-by: Mark Brown <[email protected]>
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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-21regulator: bcm590xx: Remove **rdev from struct bcm590xx_regAxel Lin1-10/+0
The **rdev of 'struct bcm590xx_reg' isn't used anywhere in the driver so remove it. Signed-off-by: Axel Lin <[email protected]> Acked-by: Matt Porter <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-21regulator: bcm590xx: Make the modalias matches the driver nameAxel Lin1-1/+1
Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-21regulator: s5m8767: Convert to use regulator_[enable|disable|is_enabled]_regmapAxel Lin1-59/+19
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. Signed-off-by: Axel Lin <[email protected]> Tested-by: Krzysztof Kozlowski <[email protected]> Reviewed-by Krzysztof Kozlowski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-21regulator: db8500-prcmu: Set 1.8V as a fixed voltage for vsmps2Ulf Hansson1-0/+2
This regulator is used for system IO and is fixed to 1.8V. Let's give consumers the option to fetch the voltage level. Signed-off-by: Ulf Hansson <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-19regulator: s2mps11: Add missing of_node_putSachin Kamat1-0/+1
Add of_node_put to decrement the ref count. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-19regulator: s2mps11: Use of_get_child_by_nameSachin Kamat1-1/+1
of_find_node_by_name walks the allnodes list, and can thus walk outside of the parent node. Use of_get_child_by_name instead. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-19regulator: s2mps11: Add set_suspend_disable for S2MPS14Krzysztof Kozlowski1-1/+50
S2MPS14 regulators support suspend mode where their status is controlled by PWREN coming from SoC. This patch implements the set_suspend_disable for S2MPS14 regulators. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-19regulator: s2mps11: Add support for S2MPS14 regulatorsKrzysztof Kozlowski2-65/+196
Add support for S2MPS14 PMIC regulators to s2mps11 driver. The S2MPS14 has fewer BUCK-s and LDO-s than S2MPS11. It also does not support controlling the BUCK ramp delay. Signed-off-by: Krzysztof Kozlowski <[email protected]> Cc: Mark Brown <[email protected]> Cc: Liam Girdwood <[email protected]> Reviewed-by: Yadwinder Singh Brar <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-19Merge branch 'ib-mfd-regulator-3.15' of ↵Mark Brown8-8/+505
git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into regulator-s2mps11
2014-03-19regulator: max8660: Fix brace alignmentSachin Kamat1-1/+2
Move the "};" to next line as is the general coding practice. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-19regulator: dbx500: use seq_puts() instead of seq_printf()Jingoo Han1-2/+2
For a constant format without additional arguments, use seq_puts() instead of seq_printf(). Also, it fixes the following checkpatch warning. WARNING: Prefer seq_puts to seq_printf Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-19regulator: dbx500-prcmu: Silence checkpatch warningsSachin Kamat1-0/+2
Silences the following warning type: WARNING: Missing a blank line after declarations Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-18regulator: anatop: Remove checking control_reg in [set|get]_voltage_selAxel Lin1-23/+2
Remove checking control_reg in [set|get]_voltage_sel and then convert to use regulator_[set|get]_voltage_sel_regmap for [set|get]_voltage_sel callbacks. The anatop-reg-offset property is a required property rather than optional property. So the question is what is the meaning of setting anatop-reg-offset to 0? If 0 is a valid setting for anatop-reg-offset and it has special meaning, we had better document it in the binding document. Otherwise, remove the testing for control_reg in the driver. No anatop voltage regulator node in the dts files set anatop-reg-offset to 0. So I think it's safe to remove testing if control_reg is 0. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-18regulator: max8952: Silence checkpatch warningSachin Kamat1-0/+1
Silences the following type of checkpatch warning: WARNING: Missing a blank line after declarations Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-18regulator: max8925: Silence checkpatch warningSachin Kamat1-0/+1
Silences the following type of checkpatch warning: WARNING: Missing a blank line after declarations Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-18regulator: max8660: Silence checkpatch warningsSachin Kamat1-4/+11
Silences the following type of error/warnings: ERROR: that open brace { should be on the previous line WARNING: Missing a blank line after declarations Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-18regulator: arizona-ldo1: Correct default regulator init_dataCharles Keepax1-4/+3
Both 5102 and 8997 have the regulator capable of supplying 1.8V, and the voltage step from the 5110 regulator is different from what is specified in the default description. This patch updates the default regulator description to match 5110 and selects the 1.8V capable description for 8997. Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Mark Brown <[email protected]> Cc: [email protected]
2014-03-18regulator: Add support for S2MPA01 regulatorSachin Kamat3-0/+489
Add support for S2MPA01 voltage and current regulator. Signed-off-by: Sachin Kamat <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2014-03-13regulator: tps6586x: Remove unnecessary rdev[] arrayAxel Lin1-10/+4
Now we are using devm_regulator_register(), so we don't need the rdev[] array to store return value of devm_regulator_register. Use a *rdev variable is enough for checking return status. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-11regulator: da9063: fix assignment of da9063_reg_matches to NULLColin Ian King1-1/+1
cppcheck detected an incorrect assignment: drivers/regulator/da9063-regulator.c:711]: (warning) Assignment of function parameter has no effect outside the function the original code didn't do anything, instead, *da9063_reg_matches needs to be set to NULL. Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-11regulator: add bcm590xx regulator driverMatt Porter3-0/+422
Add a regulator driver for the BCM590xx PMU voltage regulators. The driver supports LDOs and DCDCs in normal mode only. There is no support for low-power mode or power sequencing. Signed-off-by: Matt Porter <[email protected]> Reviewed-by: Tim Kryger <[email protected]> Reviewed-by: Markus Mayer <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-10regulator: act8865: Remove unnecessary *rdev[] from struct act8865Axel Lin1-8/+5
Now we are using devm_regulator_register(), so we don't need the *rdev[] array to store return value of devm_regulator_register. Use a *rdev variable is enough for checking return status. Signed-off-by: Axel Lin <[email protected]> Acked-by: Wenyou Yang <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-10regulator: max1586: Don't allocate memory for regulator_dev pointersKrzysztof Kozlowski1-2/+1
Do not allocate memory for 'struct regulator_dev *' since it was removed from state container (values returned by devm_regulator_register() are not used outside of probe). Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-10regulator: max8998: Remove unnecessary **rdev from struct max8998_dataAxel Lin1-14/+6
Now we are using devm_regulator_register(), so we don't need to allocate *rdev[] array to store return value of devm_regulator_register. Use a *rdev variable is enough for checking return status. Signed-off-by: Axel Lin <[email protected]> Acked-by: MyungJoo Ham <[email protected]> Signed-off-by: Mark Brown <[email protected]>