summaryrefslogtreecommitdiff
path: root/drivers/regulator
AgeCommit message (Collapse)Author
2015-02-08Merge remote-tracking branches 'regulator/topic/axp20x', ↵Mark Brown
'regulator/topic/da9211' and 'regulator/topic/fan53555' into regulator-next
2015-02-08Merge remote-tracking branch 'regulator/topic/dt-cb' into regulator-nextMark Brown
2015-02-08Merge remote-tracking branch 'regulator/topic/core' into regulator-nextMark Brown
2015-02-08Merge remote-tracking branch 'regulator/fix/qcom-rpm' into regulator-linusMark Brown
2015-02-05regulator: max77843: Add max77843 regulator driverJaewon Kim
This patch adds new regulator driver to support max77843 MFD(Multi Function Device) chip`s regulators. The Max77843 has two voltage regulators for USB safeout. Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com> Signed-off-by: Beomho Seo <beomho.seo@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-02regulator: Build sysfs entries with static attribute groupsTakashi Iwai
Instead of calling device_create_file() manually after the device registration, put all in attribute groups and filter the unwanted ones via is_visible callback. This not only simplifies the code but also avoids the possible race between the device registration and sysfs registration. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-30regulator: qcom-rpm: Make it possible to specify supplyBjorn Andersson
Make it possible to specify the supply of a regulator, through the vin-supply property in dt. Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-28regulator: core: Consolidate drms update handlingBjorn Andersson
Refactor drms_uA_update() slightly to allow regulator_set_optimum_mode() to utilize the same logic instead of duplicating it. Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-28regulator: qcom-rpm: signedness bug in probe()Dan Carpenter
"force_mode" is a u32 so it is never "< 0", but because of type promotion then comparing "== -1" will do what we want. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-28regulator: da9211: Add gpio control for enable/disable of buckJames Ban
This is a patch for adding gpio control about enable/disable of buck. Signed-off-by: James Ban <james.ban.opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-26regulator: qcom_rpm: Don't update vreg->uV/mV if rpm_reg_write failsAxel Lin
Ensure get_voltage return correct voltage if set_voltage fails. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-26regulator: lp872x: Remove **regulators from struct lp872xAxel Lin
Current code is using devm_regulator_register(), so we don't need to store *rdev in struct lp872x for clean up. Also clean up lp872x_probe() a bit to remove unnecessary goto and num_regulators variable. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-22regulator: qcom-rpm: Add missing state flag in call to RPMBjorn Andersson
This adds the missing state parameter to the call down to the RPM. This is currently hard coded to the active state, as that's all we're supporting at this moment. Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-01-16Merge remote-tracking branch 'regulator/fix/s2mps11' into regulator-linusMark Brown
2015-01-16Merge remote-tracking branch 'regulator/fix/core' into regulator-linusMark Brown
2015-01-16regulator: da9211: fix unmatched of_nodeJames Ban
This is a patch for fixing unmatched of_node. Signed-off-by: James Ban <james.ban.opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-14regulator: Update documentation after renaming function argumentKrzysztof Kozlowski
Update documentation for regulator_register() function after renaming its argument. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-09Merge branch 'topic/core' of ↵Mark Brown
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-dt-cb Conflicts: drivers/regulator/core.c
2015-01-09regulator: axp20x: Migrate to regulator core's simplified DT parsing codeChen-Yu Tsai
A common simplified DT parsing code for regulators was introduced in commit a0c7b164ad11 ("regulator: of: Provide simplified DT parsing method"). This is very similar to our own code, so get rid of ours and use the common code. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-09regulator: axp20x: Fill regulators_node and of_match descriptor fieldsChen-Yu Tsai
This patch fills the DT related fields in the regulator descriptors, which can then be used by the regulator core's simplified DT code. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-09regulator: pfuze100-regulator: add pfuze3000 supportRobin Gong
Add pfuze3000 chip support. Signed-off-by: Robin Gong <b38343@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-08regulator: Allow parsing custom properties when using simplified DT parsingKrzysztof Kozlowski
When drivers use simplified DT parsing method (they provide 'regulator_desc.of_match') they still may want to parse custom properties for some of the regulators. For example some of the regulators support GPIO enable control. Add a driver-supplied callback for such case. This way the regulator core parses common bindings offloading a lot of code from drivers and still custom properties may be used. The callback, called for each parsed regulator, may modify the 'regulator_config' initially passed to regulator_register(). Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-08regulator: max77686: Add GPIO controlKrzysztof Kozlowski
Add enable control over GPIO for regulators supporting this: LDO20, LDO21, LDO22, buck8 and buck9. This is needed for proper (and full) configuration of the Maxim 77686 PMIC without creating redundant 'regulator-fixed' entries. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-08regulator: Copy config passed during registrationKrzysztof Kozlowski
Copy the 'regulator_config' structure passed to regulator_register() function so the driver could safely modify it after parsing init data. The driver may want to change the config as a result of specific init data parsed by regulator core (e.g. when core handled parsing device tree). Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-08regulator: s2mps11: Fix wrong calculation of register offsetJonghwa Lee
This patch adds missing registers('BUCK7_SW' & 'LDO29_CTRL'). Since BUCK7 has 1 more register (BUCK7_SW) than others, register offset should be added one more for which has bigger address than BUCK7 registers. Fixes: 76b9840b24ae04(regulator: s2mps11: Add support S2MPS13 regulator device) Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: <stable@vger.kernel.org>
2015-01-08regulator: core: fix race condition in regulator_put()Ashay Jaiswal
The regulator framework maintains a list of consumer regulators for a regulator device and protects it from concurrent access using the regulator device's mutex lock. In the case of regulator_put() the consumer is removed and regulator device's parameters are updated without holding the regulator device's mutex. This would lead to a race condition between the regulator_put() and any function which traverses the consumer list or modifies regulator device's parameters. Fix this race condition by holding the regulator device's mutex in case of regulator_put. Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2015-01-05regulator: tps65023: Constify struct regmap_config and regulator_opsKrzysztof Kozlowski
The regmap_config struct may be const because it is not modified by the driver and regmap_init() accepts pointer to const. Make struct regulator_ops const as well. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-05regulator: max8649: Constify struct regmap_config and regulator_opsKrzysztof Kozlowski
The regmap_config struct may be const because it is not modified by the driver and regmap_init() accepts pointer to const. Make struct regulator_ops const as well. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-05regulator: fan53555: Constify struct regmap_config and slew_rates arrayKrzysztof Kozlowski
The regmap_config struct may be const because it is not modified by the driver and regmap_init() accepts pointer to const. Make const also slew_rates array. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-29Merge tag 'regulator-v3.19-rc2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull one regulator fix from Mark Brown: "One fix here, a fix for the voltage mapping on one of the s2mps11 regulators which broke systems using it including apparently the Gear 2 smartwatches" * tag 'regulator-v3.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: s2mps11: Fix dw_mmc failure on Gear 2
2014-12-29regulator: core: Fix format specifier warningAniroop Mathur
Signed-off-by: Aniroop Mathur <a.mathur@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-29regulator: core: Avoid negative regulator no & initialize it to -1Aniroop Mathur
This patch initializes regulator_no to -1 to avoid extra subtraction operation performed every time we register a regulator and avoid negative regulator no in its name. Signed-off-by: Aniroop Mathur <a.mathur@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-24regulator: rt5033-regulator: Use regulator_nodes/of_match in the descriptorBeomho Seo
This patch is add regulator_nodes/of_match in the regulator descriptor for using information from DT instead of sppecific codes. Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Signed-off-by: Beomho Seo <beomho.seo@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-24regulator: mt6397: Add support for MT6397 regulatorFlora Fu
Add MT6397 regulator driver. Signed-off-by: Flora Fu <flora.fu@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-22regulator: isl9305: deprecate use of isl in compatible string for isilArnaud Ebalard
"isil" and "isl" prefixes are used at various locations inside the kernel to reference Intersil corporation. This patch is part of a series fixing those locations were "isl" is used in compatible strings to use the now expected "isil" prefix instead (NASDAQ symbol for Intersil and most used version). The old compatible string is kept for backward compatibility. Signed-off-by: Arnaud Ebalard <arno@natisbad.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-22regulator: max14577: Use regulator_nodes/of_match in the descriptorBeomho Seo
This patch is add regulator_nodes/ofmatch in the regulator descriptor for using information from DT instead of specific codes. That will be used regulation_of_get_init_data function for get regulator property on device tree. Using that make driver simpler. Signed-off-by: Beomho Seo <beomho.seo@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-14Merge tag 'driver-core-3.19-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core update from Greg KH: "Here's the set of driver core patches for 3.19-rc1. They are dominated by the removal of the .owner field in platform drivers. They touch a lot of files, but they are "simple" changes, just removing a line in a structure. Other than that, a few minor driver core and debugfs changes. There are some ath9k patches coming in through this tree that have been acked by the wireless maintainers as they relied on the debugfs changes. Everything has been in linux-next for a while" * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits) Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries" fs: debugfs: add forward declaration for struct device type firmware class: Deletion of an unnecessary check before the function call "vunmap" firmware loader: fix hung task warning dump devcoredump: provide a one-way disable function device: Add dev_<level>_once variants ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries ath: use seq_file api for ath9k debugfs files debugfs: add helper function to create device related seq_file drivers/base: cacheinfo: remove noisy error boot message Revert "core: platform: add warning if driver has no owner" drivers: base: support cpu cache information interface to userspace via sysfs drivers: base: add cpu_device_create to support per-cpu devices topology: replace custom attribute macros with standard DEVICE_ATTR* cpumask: factor out show_cpumap into separate helper function driver core: Fix unbalanced device reference in drivers_probe driver core: fix race with userland in device_add() sysfs/kernfs: make read requests on pre-alloc files use the buffer. sysfs/kernfs: allow attributes to request write buffer be pre-allocated. fs: sysfs: return EGBIG on write if offset is larger than file size ...
2014-12-12regulator: s2mps11: Fix dw_mmc failure on Gear 2Krzysztof Kozlowski
Invalid buck4 configuration for linear mapping of voltage in S2MPS14 regulators caused boot failure on Gear 2 (dw_mmc-exynos): [ 3.569137] EXT4-fs (mmcblk0p15): mounted filesystem with ordered data mode. Opts: (null) [ 3.571716] VFS: Mounted root (ext4 filesystem) readonly on device 179:15. [ 3.629842] mmcblk0: error -110 sending status command, retrying [ 3.630244] mmcblk0: error -110 sending status command, retrying [ 3.636292] mmcblk0: error -110 sending status command, aborting Buck4 voltage regulator has different minimal voltage value than other bucks. Commit merging multiple regulator description macros caused to use linear_min_sel from buck[1235] regulators as value for buck4. This lead to lower voltage of buck4 than required. Output of the buck4 is used internally as power source for LDO{3,4,7,11,19,20,21,23}. On Gear 2 board LDO11 is used as MMC regulator (V_EMMC_1.8V). Fixes: 5a867cf28893 ("regulator: s2mps11: Optimize the regulator description macro") Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: <stable@vger.kernel.org>
2014-12-09regulator: rk808: Fix sparse non static symbol warningsWei Yongjun
Fixes the following sparse warnings: drivers/regulator/rk808-regulator.c:100:5: warning: symbol 'rk808_set_suspend_voltage' was not declared. Should it be static? drivers/regulator/rk808-regulator.c:115:5: warning: symbol 'rk808_set_suspend_enable' was not declared. Should it be static? drivers/regulator/rk808-regulator.c:126:5: warning: symbol 'rk808_set_suspend_disable' was not declared. Should it be static? Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-08Merge tag 'regulator-v3.19' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "The main thing this time around is support for suspend mode configuration from DT which will enable some very useful power savings on systems where we can't rely on the bootloader configuration. We still don't really support dynamic configuration of this at runtime, that may come later if there is any demand. Summary: - Support for specifying the target regulation mode and voltage during system suspend via DT, enabling power savings in that mode. - Reduce the default verbosity of the logging on boot, improving boot times especially for systems with very large numbers of regulators. - Lots of cleanups and fixes for Maxim PMIC drivers. - New driver for Richtek RT5033" * tag 'regulator-v3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (62 commits) regulator: core: Fix regualtor_ena_gpio_free not to access pin after freeing regulator: sky81452: Modify Device Tree structure regulator: sky81452: Modify Device Tree structure dt-bindings: Update documentation for "system-power-controller" and fix misspellings of: Rename "poweroff-source" property to "system-power-controller" regulator: max77686: Remove support for board files regulator: max77802: Remove support for board files regulator: max77802: Fill regulator modes translation callback regulator: max77802: Document binding for regulator operating modes regulator: of: Add support for parsing initial and suspend modes regulator: of: Pass the regulator description in the match table regulator: of: Add regulator desc param to of_get_regulator_init_data() regulator: Add mode mapping function to struct regulator_desc regulator: Document binding for initial and suspend modes regulator: core: Add PRE_DISABLE notification regulator: gpio: fix parsing of gpio list regulator: rpm: add support for RPM-controller SMB208 regulator: da9063: Do not transform local IRQ to virtual regulator: sky81452: Modify dependent Kconfig symbol regulator: rt5033: Add RT5033 Regulator device driver ...
2014-12-08Merge tag 'mfd-for-linus-3.19' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "Changes to the core: - Honour PLATFORM_DEVID_NONE and PLATFORM_DEVID_AUTO dev IDs Changes to existing drivers: - IRQ additions/fixes; axp20x, da9063-core - Code simplification; i2c-dln2 - Regmap additions/fixes; max77693 - Error checking/handling improvements; dln2, db8500-prcmu - Bug fixes; dln2, wm8350-core - DT support/documentation; max77693, max77686, tps65217, twl4030-power, gpio-tc3589x - Decouple syscon interface from platform devices - Use MFD hotplug registration; rtsx_usb, viperboard, hid-sensor-hub - Regulator fixups; sec-core - Power Management additions/fixes; rts5227, tc6393xb - Remove relic/redundant code; ab8500-sysctrl, lpc_sch, max77693-private - Clean-up/coding style changes; tps65090 - Clk additions/fixes; tc6393xb, tc6387xb, t7l66xb - Add USB-SPI support; dln2 - Trivial changes; max14577, arizona-spi, lpc_sch, wm8997-tables, wm5102-tables wm5110-tables, axp20x, atmel-hlcdc, rtsx_pci New drivers/supported devices: - axp288 PMIC support added to axp20x - s2mps13 support added to sec-core - New support for Diolan DLN-2 - New support for atmel-hlcdc" * tag 'mfd-for-linus-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (55 commits) mfd: rtsx: Add func to split u32 into register mfd: atmel-hlcdc: Add Kconfig option description and name mfd: da9063: Get irq base dynamically before registering device mfd: max14577: Fix obvious typo in company name in copyright mfd: axp20x: Constify axp20x_acpi_match and rid unused warning mfd: t7l66xb: prepare/unprepare clocks mfd: tc6387xb: prepare/unprepare clocks mfd: dln2: add support for USB-SPI module mfd: wm5110: Add missing registers for AIF2 channels 3-6 mfd: tc3589x: get rid of static base mfd: arizona: Document HP_CTRL_1L and HP_CTRL_1R registers mfd: wm8997: Mark INTERRUPT_STATUS_2_MASK as readable mfd: tc6393xb: Prepare/unprepare clocks mfd: tps65090: Fix bonkers indenting strategy mfd: tc6393xb: Fail ohci suspend if full state restore is required mfd: lpc_sch: Don't call mfd_remove_devices() mfd: wm8350-core: Fix probable mask then right shift defect mfd: ab8500-sysctrl: Drop ab8500_restart mfd: db8500-prcmu: Provide sane error path values mfd: db8500-prcmu: Check return of devm_ioremap for error ...
2014-12-05Merge remote-tracking branches 'regulator/topic/sky81452' and ↵Mark Brown
'regulator/topic/stub' into regulator-next
2014-12-05Merge remote-tracking branches 'regulator/topic/rn5t618', ↵Mark Brown
'regulator/topic/rpm', 'regulator/topic/rt5033', 'regulator/topic/s2mpa01' and 'regulator/topic/s2mps11' into regulator-next
2014-12-05Merge remote-tracking branches 'regulator/topic/max77686', ↵Mark Brown
'regulator/topic/max77693', 'regulator/topic/max77802', 'regulator/topic/power-off' and 'regulator/topic/rk808' into regulator-next
2014-12-05Merge remote-tracking branches 'regulator/topic/anatop', ↵Mark Brown
'regulator/topic/disable', 'regulator/topic/dummy' and 'regulator/topic/gpio' into regulator-next
2014-12-05Merge remote-tracking branch 'regulator/topic/core' into regulator-nextMark Brown
2014-12-05Merge remote-tracking branch 'regulator/fix/da9063' into regulator-linusMark Brown
2014-12-05Merge branch 'topic/suspend' of ↵Mark Brown
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-sky81452 Conflicts: drivers/regulator/sky81452-regulator.c
2014-12-04regulator: core: Fix regualtor_ena_gpio_free not to access pin after freeingSeung-Woo Kim
After freeing pin from regulator_ena_gpio_free, loop can access the pin. So this patch fixes not to access pin after freeing. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-02regulator: sky81452: Modify Device Tree structureGyungoh Yoo
Signed-off-by: Gyungoh Yoo <jack.yoo@skyworksinc.com> Signed-off-by: Mark Brown <broonie@kernel.org>