summaryrefslogtreecommitdiff
path: root/drivers/regulator
AgeCommit message (Collapse)AuthorFilesLines
2014-08-08regulator: s5m8767: Fix build breakChanwoo Choi1-23/+23
This patch fix build break as following log: drivers/regulator/s5m8767.c: In function ‘s5m8767_reg_is_enabled’: drivers/regulator/s5m8767.c:229:2: warning: passing argument 1 of ‘sec_reg_read’ from incompatible pointer type [enabled by default] include/linux/mfd/samsung/core.h:69:12: note: expected ‘struct regmap *’ but argument is of type ‘struct sec_pmic_dev *’ drivers/regulator/s5m8767.c:229:2: warning: passing argument 3 of ‘sec_reg_read’ from incompatible pointer type [enabled by default] include/linux/mfd/samsung/core.h:69:12: note: expected ‘u8 *’ but argument is of type ‘unsigned int *’ drivers/regulator/s5m8767.c: In function ‘s5m8767_reg_enable’: drivers/regulator/s5m8767.c:246:2: warning: passing argument 1 of ‘sec_reg_update’ from incompatible pointer type [enabled by default] include/linux/mfd/samsung/core.h:73:12: note: expected ‘struct regmap *’ but argument is of type ‘struct sec_pmic_dev *’ drivers/regulator/s5m8767.c: In function ‘s5m8767_reg_disable’: drivers/regulator/s5m8767.c:259:2: warning: passing argument 1 of ‘sec_reg_update’ from incompatible pointer type [enabled by default] include/linux/mfd/samsung/core.h:73:12: note: expected ‘struct regmap *’ but argument is of type ‘struct sec_pmic_dev *’ drivers/regulator/s5m8767.c: In function ‘s5m8767_pmic_probe’: drivers/regulator/s5m8767.c:730:2: warning: passing argument 1 of ‘sec_reg_write’ from incompatible pointer type [enabled by default] include/linux/mfd/samsung/core.h:71:12: note: expected ‘struct regmap *’ but argument is of type ‘struct sec_pmic_dev *’ drivers/regulator/s5m8767.c:735:2: warning: passing argument 1 of ‘sec_reg_write’ from incompatible pointer type [enabled by default] include/linux/mfd/samsung/core.h:71:12: note: expected ‘struct regmap *’ but argument is of type ‘struct sec_pmic_dev *’ drivers/regulator/s5m8767.c:740:2: warning: passing argument 1 of ‘sec_reg_write’ from incompatible pointer type [enabled by default] include/linux/mfd/samsung/core.h:71:12: note: expected ‘struct regmap *’ but argument is of type ‘struct sec_pmic_dev *’ drivers/regulator/s5m8767.c:824:5: warning: passing argument 1 of ‘sec_reg_update’ from incompatible pointer type [enabled by default] include/linux/mfd/samsung/core.h:73:12: note: expected ‘struct regmap *’ but argument is of type ‘struct sec_pmic_dev *’ drivers/regulator/s5m8767.c:827:5: warning: passing argument 1 of ‘sec_reg_update’ from incompatible pointer type [enabled by default] include/linux/mfd/samsung/core.h:73:12: note: expected ‘struct regmap *’ but argument is of type ‘struct sec_pmic_dev *’ drivers/regulator/s5m8767.c:830:5: warning: passing argument 1 of ‘sec_reg_update’ from incompatible pointer type [enabled by default] include/linux/mfd/samsung/core.h:73:12: note: expected ‘struct regmap *’ but argument is of type ‘struct sec_pmic_dev *’ drivers/regulator/s5m8767.c:837:9: warning: passing argument 1 of ‘sec_reg_write’ from incompatible pointer type [enabled by default] include/linux/mfd/samsung/core.h:71:12: note: expected ‘struct regmap *’ but argument is of type ‘struct sec_pmic_dev *’ drivers/regulator/s5m8767.c:842:9: warning: passing argument 1 of ‘sec_reg_write’ from incompatible pointer type [enabled by default] include/linux/mfd/samsung/core.h:71:12: note: expected ‘struct regmap *’ but argument is of type ‘struct sec_pmic_dev *’ drivers/regulator/s5m8767.c:847:9: warning: passing argument 1 of ‘sec_reg_write’ from incompatible pointer type [enabled by default] include/linux/mfd/samsung/core.h:71:12: note: expected ‘struct regmap *’ but argument is of type ‘struct sec_pmic_dev *’ drivers/regulator/s5m8767.c:852:3: warning: passing argument 1 of ‘sec_reg_update’ from incompatible pointer type [enabled by default] include/linux/mfd/samsung/core.h:73:12: note: expected ‘struct regmap *’ but argument is of type ‘struct sec_pmic_dev *’ drivers/regulator/s5m8767.c:855:3: warning: passing argument 1 of ‘sec_reg_update’ from incompatible pointer type [enabled by default] include/linux/mfd/samsung/core.h:73:12: note: expected ‘struct regmap *’ but argument is of type ‘struct sec_pmic_dev *’ drivers/regulator/s5m8767.c:858:3: warning: passing argument 1 of ‘sec_reg_update’ from incompatible pointer type [enabled by default] include/linux/mfd/samsung/core.h:73:12: note: expected ‘struct regmap *’ but argument is of type ‘struct sec_pmic_dev *’ drivers/regulator/s5m8767.c:865:6: warning: passing argument 1 of ‘sec_reg_update’ from incompatible pointer type [enabled by default] include/linux/mfd/samsung/core.h:73:12: note: expected ‘struct regmap *’ but argument is of type ‘struct sec_pmic_dev *’ drivers/regulator/s5m8767.c:869:6: warning: passing argument 1 of ‘sec_reg_update’ from incompatible pointer type [enabled by default] include/linux/mfd/samsung/core.h:73:12: note: expected ‘struct regmap *’ but argument is of type ‘struct sec_pmic_dev *’ drivers/regulator/s5m8767.c:873:6: warning: passing argument 1 of ‘sec_reg_update’ from incompatible pointer type [enabled by default] include/linux/mfd/samsung/core.h:73:12: note: expected ‘struct regmap *’ but argument is of type ‘struct sec_pmic_dev *’ drivers/regulator/s5m8767.c:877:6: warning: passing argument 1 of ‘sec_reg_update’ from incompatible pointer type [enabled by default] include/linux/mfd/samsung/core.h:73:12: note: expected ‘struct regmap *’ but argument is of type ‘struct sec_pmic_dev *’ drivers/regulator/s5m8767.c:881:6: warning: passing argument 1 of ‘sec_reg_update’ from incompatible pointer type [enabled by default] include/linux/mfd/samsung/core.h:73:12: note: expected ‘struct regmap *’ but argument is of type ‘struct sec_pmic_dev *’ drivers/regulator/s5m8767.c:885:6: warning: passing argument 1 of ‘sec_reg_update’ from incompatible pointer type [enabled by default] include/linux/mfd/samsung/core.h:73:12: note: expected ‘struct regmap *’ but argument is of type ‘struct sec_pmic_dev *’ drivers/regulator/s5m8767.c:910:24: error: ‘struct sec_pmic_dev’ has no member named ‘regmap’ make[2]: *** [drivers/regulator/s5m8767.o] Error 1 Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2014-08-08regulator: 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-08-08regulator: max14577: Fix invalid return value on DT parse successKrzysztof Kozlowski1-2/+3
This fixes bug introduced in 667a6b7a (regulator: max14577: Add missing of_node_put). The DTS parsing function returned number of matched regulators as success status which then was compared against 0 in probe. Result was a probe fail after successful parsing the DTS: max14577-regulator: probe of max14577-regulator failed with error 2 Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Reviwed-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-08regulator: max14577: Add missing of_node_putKrzysztof Kozlowski1-2/+3
Decrease the reference count for 'regulators' device_node, obtained by of_get_child_by_name(). Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-08regulator: max14577: Remove unused state container definitionKrzysztof Kozlowski1-7/+1
Remove the "struct max14577_regulator" because this is not used anywhere. It should be removed earlier along with changing the driver after review on the mailing lists. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-08regulator: max14577: Add module alias to support module auto-loadingAxel Lin1-0/+1
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-08regulator: max14577: Add regulator driver for Maxim 14577Krzysztof Kozlowski3-0/+280
MAX14577 chip is a multi-function device which includes MUIC, charger and voltage regulator. The driver is located in drivers/mfd. This patch adds regulator driver for MAX14577 chip. There are two regulators in this chip: 1. Safeout LDO with constant voltage output of 4.9V. It can be only enabled or disabled. 2. Current regulator for the charger. It provides current from 90mA up to 950mA. Driver supports Device Tree. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-08regulator: s2mps11: Add support for S2MPS14 regulatorsKrzysztof Kozlowski1-96/+384
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 <k.kozlowski@samsung.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2014-08-08upstream: treewide: Fix typo in printkMasanari Iida1-1/+1
Correct spelling typo within various part of the kernel Signed-off-by: Masanari Iida <standby24x7@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Conflicts: drivers/media/i2c/s5c73m3/s5c73m3-core.c drivers/net/ethernet/mellanox/mlx4/fw.c drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c drivers/net/wireless/ath/ath10k/pci.c
2014-08-08Revert "regulator: Handle suspend and resume of regulators"Jonghwa Lee1-28/+0
This reverts commit bdc1383dd59ea144e4acdb97c6077c09f371df78. I revert the commit because it is not merged to ML. Change-Id: I8c616af1429a4c53d263c99baa05d35e379635e5 Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
2014-08-08cosmetic: max77686: Remove unused variableLukasz Majewski1-1/+0
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
2014-08-08regulator: max77686: Support DVS control in max77686 regulator.Jonghwa Lee1-1/+94
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
2014-08-08mfd: max8998: Add support for Device TreeTomasz Figa1-4/+127
This patch adds Device Tree support to max8998 driver. Signed-off-by: Tomasz Figa <t.figa@samsung.com> Acked-by: Mark Brown <broonie@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-08-08regulator: max8998: Use arrays for specifying voltages in platform dataTomasz Figa1-67/+29
This patch modifies the platform data of max8998 to use arrays for specifying predefined voltages of buck1 and buck2 instead of separate field for each voltage. This allows to simplify the code a bit and will help in adding support for Device Tree, which will be introduced in further patch. Signed-off-by: Tomasz Figa <t.figa@samsung.com> Acked-by: Mark Brown <broonie@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-08-08regulator: max77686: Fix suspend-mode settings of regulatorsTomasz Figa1-10/+89
LDO20, LDO21, LDO22, BUCK8 and BUCK9 regulators provide external pins for enable control in addition to I2C control, which is usually used to control regulator states in suspend. BUCK5-BUCK7 do not provide any suspend-mode control. This patch modifies the driver to account for these factors, making it program sleep mode states of regulators correctly. Signed-off-by: Tomasz Figa <t.figa@samsung.com> Conflicts: drivers/regulator/max77686.c
2014-08-08regulator: max77686: Add set_suspend_enable callback for buck regulatorsTomasz Figa1-0/+18
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
2014-08-08regulator: of: Parse regulator state in mem mode from DTTomasz Figa1-0/+20
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
2014-08-08regulator: Handle suspend and resume of regulatorsTomasz Figa1-0/+28
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
2014-08-08regulator: max77693: Do code clean.Jonghwa Lee1-21/+16
This patch removes unnecessary dev_info, and changes some of them to dev_dbg. Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
2014-08-08regulator: max77693: Pass of_node when regulator is registered.Jonghwa Lee1-0/+1
Since of_get_regulator() retrieve regulator's list with of_node pointer, all regulator is required to hold their device tree node if regulator driver uses device tree. Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
2014-08-08regulator: max77693: Modify platform deivce id according to mfd driver.Jonghwa Lee1-2/+2
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
2014-08-08regulator: max77693: Support to parse data from device treeJonghwa Lee1-0/+58
This patch supports max77693 regulator driver to get a initial data from device tree. Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
2014-08-08regulator: wm8994: Enable device tree based driver matchingSylwester Nawrocki1-0/+7
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2014-08-08regulator: max77693: Remove no longer supported __dev* attributesSylwester Nawrocki1-3/+3
This patch fixes following build error: drivers/regulator/max77693.c:673: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’ drivers/regulator/max77693.c:743: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘max77693_pmic_remove’ drivers/regulator/max77693.c:768: error: ‘max77693_pmic_probe’ undeclared here (not in a function) drivers/regulator/max77693.c:769: error: implicit declaration of function ‘__devexit_p’ drivers/regulator/max77693.c:769: error: ‘max77693_pmic_remove’ undeclared here (not in a function) Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2014-08-08regulator: max77693: Add regulator driver for max77693Jonghwa Lee3-0/+801
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
2014-03-31regulator: core: Replace direct ops->disable usageMarkus Pargmann1-21/+13
commit 66fda75f47dc583f1c187556e9a2c082dd64f8c6 upstream. There are many places where ops->disable is called directly. Instead we should use _regulator_do_disable() which also handles gpio regulators. To be able to use the wrapper function from _regulator_force_disable(), I moved the _notifier_call_chain() call from _regulator_do_disable() to _regulator_disable(). This way, _regulator_force_disable() can use different flags for _notifier_call_chain() without calling it twice. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-23regulator: core: Replace direct ops->enable usageMarkus Pargmann1-7/+7
commit 30c219710358c5cca2f8bd2e9e547c6aadf7cf8b upstream. There are some direct ops->enable in the regulator core driver. This is a potential issue as the function _regulator_do_enable() handles gpio regulators and the normal ops->enable calls. These gpio regulators are simply ignored when ops->enable is called directly. One possible bug is that boot-on and always-on gpio regulators are not enabled on registration. This patch replaces all ops->enable calls by _regulator_do_enable. [Handle missing enable operations -- broonie] Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-24mfd: tps6586x: correct device name of the regulator cellMarc Dietrich1-1/+1
Change the device name of the regulator function to the one chosen for MODULE_ALIAS. This fixes kernel auto-module loading for the regulator function. Signed-off-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-05-30Merge remote-tracking branch 'regulator/fix/palmas' into regulator-linusMark Brown1-2/+2
2013-05-30Merge remote-tracking branch 'regulator/fix/doc' into regulator-linusMark Brown1-1/+4
2013-05-30Merge remote-tracking branch 'regulator/fix/dbx500' into regulator-linusMark Brown1-12/+12
2013-05-30regulator: palmas: Fix "enable_reg" to point to the correct reg for SMPS10Kishon Vijay Abraham I1-1/+1
regulator_enable_regmap() uses enable_reg to enable the regulator. But enable_reg for smps10 points to SMPS10_STATUS which is a read-only register. Fixed the same by having enable_reg set to SMPS10_CTRL. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
2013-05-30regulator: palmas: Fix incorrect conditionSachin Kamat1-1/+1
Since 'id' cannot take two values at the same time, the condition should probably be an OR (||) instead of AND (&&). Introduced by commit 28d1e8cd67 ("regulator: palma: add ramp delay support through regulator constraints"). Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-21regulator: core: Correct spelling mistake in commentCharles Keepax1-1/+1
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-09Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linuxLinus Torvalds1-1/+1
Pull removal of GENERIC_GPIO from Grant Likely: "GENERIC_GPIO now synonymous with GPIOLIB. There are no longer any valid cases for enableing GENERIC_GPIO without GPIOLIB, even though it is possible to do so which has been causing confusion and breakage. This branch does the work to completely eliminate GENERIC_GPIO." * tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux: gpio: update gpio Chinese documentation Remove GENERIC_GPIO config option Convert selectors of GENERIC_GPIO to GPIOLIB blackfin: force use of gpiolib m68k: coldfire: use gpiolib mips: pnx833x: remove requirement for GENERIC_GPIO openrisc: default GENERIC_GPIO to false avr32: default GENERIC_GPIO to false xtensa: remove explicit selection of GENERIC_GPIO sh: replace CONFIG_GENERIC_GPIO by CONFIG_GPIOLIB powerpc: remove redundant GENERIC_GPIO selection unicore32: default GENERIC_GPIO to false unicore32: remove unneeded select GENERIC_GPIO arm: plat-orion: use GPIO driver on CONFIG_GPIOLIB arm: remove redundant GENERIC_GPIO selection mips: alchemy: require gpiolib mips: txx9: change GENERIC_GPIO to GPIOLIB mips: loongson: use GPIO driver on CONFIG_GPIOLIB mips: remove redundant GENERIC_GPIO select
2013-05-08regulator: dbx500: Make local symbol staticSachin Kamat1-12/+12
power_state_active_get is used only in this file. Make it static. While at it also move this function definition inside the CONFIG_REGULATOR_DEBUG macro as it is called only from within it. This also avoids further build warning related to unused definition. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-02regulator: Fix kernel-doc generation warnings.Robert P. J. Day1-1/+4
Add a couple kernel-doc lines to get rid of kernel-doc generation warnings, no functional change. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-28Merge remote-tracking branch 'regulator/topic/wm8994' into v3.9-rc8Mark Brown1-19/+42
2013-04-28Merge remote-tracking branch 'regulator/topic/twl' into v3.9-rc8Mark Brown1-31/+3
2013-04-28Merge remote-tracking branch 'regulator/topic/tps80031' into v3.9-rc8Mark Brown1-21/+24
2013-04-28Merge remote-tracking branch 'regulator/topic/tps6586x' into v3.9-rc8Mark Brown1-4/+2
2013-04-28Merge remote-tracking branch 'regulator/topic/tps65023' into v3.9-rc8Mark Brown1-22/+9
2013-04-28Merge remote-tracking branch 'regulator/topic/tps62360' into v3.9-rc8Mark Brown1-1/+1
2013-04-28Merge remote-tracking branch 'regulator/topic/s5m8767' into v3.9-rc8Mark Brown1-1/+1
2013-04-28Merge remote-tracking branch 'regulator/topic/rc5t583' into v3.9-rc8Mark Brown1-6/+0
2013-04-28Merge remote-tracking branch 'regulator/topic/palmas' into v3.9-rc8Mark Brown1-60/+305
2013-04-28Merge remote-tracking branch 'regulator/topic/max8998' into v3.9-rc8Mark Brown1-3/+6
2013-04-28Merge remote-tracking branch 'regulator/topic/max8997' into v3.9-rc8Mark Brown1-2/+2
2013-04-28Merge remote-tracking branch 'regulator/topic/max8973' into v3.9-rc8Mark Brown1-5/+5
2013-04-28Merge remote-tracking branch 'regulator/topic/max8952' into v3.9-rc8Mark Brown1-2/+73