aboutsummaryrefslogtreecommitdiff
path: root/drivers/regulator
AgeCommit message (Collapse)AuthorFilesLines
2014-03-10regulator: max8997: Remove unnecessary **rdev from struct max8997_dataAxel Lin1-13/+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]>
2014-03-10regulator: max8660: Remove regulator_dev pointer from state containerKrzysztof Kozlowski1-10/+6
Don't store pointer to regulator_dev returned by devm_regulator_register() in state container. It isn't used anywhere outside of max8660_probe() function. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-10regulator: max8973: Remove unused field from 'struct max8973_chip'Krzysztof Kozlowski1-2/+0
The 'struct regulator_dev *rdev' of 'struct max8973_chip' isn't used anywhere in the driver so it can be removed safely. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-10regulator: max8952: Use managed regulator registrationKrzysztof Kozlowski1-13/+8
Use managed devm_regulator_register to simplify the driver probe and driver remove functions. This allows removing from state container the pointer to regulator_dev returned on registering the regulator. Patch also removes from state container pointer to 'struct device' as it is not used anywhere outside of max8952_pmic_probe() function. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-10regulator: max8925: Remove unused state container fieldsKrzysztof Kozlowski1-3/+0
Remove fields from 'struct max8925_regulator' which are not used anywhere in the driver. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-10regulator: max8907: Remove regulator_dev array from state containerKrzysztof Kozlowski1-4/+5
Don't store array of regulator_dev returned by devm_regulator_register() in state container. It isn't used anywhere outside of max8907_regulator_probe() function. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-10regulator: max8649: Remove regulator_dev pointer from state containerKrzysztof Kozlowski1-4/+4
Don't store pointer to regulator_dev returned by evm_regulator_register() an state container. It isn't used anywhere outside of max8649_regulator_probe() function. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-10regulator: max77693: Remove state container as it is not neededKrzysztof Kozlowski1-31/+6
Don't store pointers to regulator_dev returned by devm_regulator_register() in allocated memory in state container. They aren't used anywhere outside of max77693_pmic_probe() function. This change allows removing completely the 'struct max77693_pmic_dev' state container as none of its fields are used outside of probe. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-10regulator: max77686: Remove regulator_dev array from state containerKrzysztof Kozlowski1-4/+5
Don't store array of regulator_dev returned by devm_regulator_register() in state container. It isn't used anywhere outside of max77686_pmic_probe() function. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-10regulator: max1586: Remove regulator_dev pointer from state containerKrzysztof Kozlowski1-7/+5
Don't store pointer to regulator_dev returned by devm_regulator_register() in state container. It isn't used anywhere outside of max1586_pmic_probe() function. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-06regulator: helpers: Modify helpers enabling multi-bit controlCarlo Caione1-16/+32
This patch extends the regulator helpers to account for device that use multiple bits for control when using regmap enable/disable/bypass ops. The actual regulator helpers wrongly assume that the regulator control is always performed using single bits, using in the regulator_desc struct only two parameters *_reg and *_mask defining register and mask for control. This patch extends this struct and introduces the helpers to take into account devices where control is performed using multiple bits and specific multi-bit values are used for enabling/disabling/bypassing the regulator. Signed-off-by: Carlo Caione <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-06regulator: pfuze100: Add PFUZE200 support to Kconfig and module descriptionAxel Lin2-4/+4
Signed-off-by: Axel Lin <[email protected]> Acked-by: Robin Gong <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-05regulator: tps80031: remove unnecessary parenthesesJingoo Han1-1/+1
Remove unnecessary parentheses in order to fix the following checkpatch error. ERROR: return is not a function, parentheses are not required Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-04regulator: add pbias regulator supportBalaji T K3-0/+265
pbias register controls internal power supply to sd card i/o pads in most OMAPs (OMAP2-5, DRA7). Control bits for selecting voltage level and enabling/disabling are in the same PBIAS register. Signed-off-by: Balaji T K <[email protected]> Acked-by: Tony Lindgren <[email protected]> Acked-by: Mark Brown <[email protected]> Tested-by: Florian Vaussard <[email protected]> Tested-by: Stefan Roese <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2014-03-04Merge tag 'regulator-v3.14-rc5' of ↵Linus Torvalds1-28/+20
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "A couple of fixes here which ensure that regulators using the core support for GPIO enables work in all cases by ensuring that helpers are used consistently rather than open coding in places and hence not having GPIO support in some of them" * tag 'regulator-v3.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: core: Replace direct ops->disable usage regulator: core: Replace direct ops->enable usage
2014-03-04regulator: pfuze100: Add terminate entry for [i2c|of]_device_id tablesAxel Lin1-3/+5
Also remove PFUZE_NUM to avoid below build warnings: CC [M] drivers/regulator/pfuze100-regulator.o drivers/regulator/pfuze100-regulator.c:86:2: warning: excess elements in array initializer [enabled by default] drivers/regulator/pfuze100-regulator.c:86:2: warning: (near initialization for 'pfuze_device_id') [enabled by default] drivers/regulator/pfuze100-regulator.c:93:2: warning: excess elements in array initializer [enabled by default] drivers/regulator/pfuze100-regulator.c:93:2: warning: (near initialization for 'pfuze_dt_ids') [enabled by default] Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-04regulator: pfuze100: add pfuze200 supportRobin Gong1-53/+143
support pfuze200 chip which remove SW1C and SW4 based on pfuze100. Signed-off-by: Robin Gong <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-04regulator: s2mps11: Fix section mismatchKrzysztof Kozlowski1-46/+17
Remove __initconst from regulator_desc array because this array is used during probe and s2mps11_pmic_probe() is not in __init section. However still select the number of supported regulators according to device ID so the driver will be ready for adding support for S2MPS14 device. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-03regulator: tps65217: Allow missing init_data for diagnosticsAxel Lin1-13/+2
The regulator core supports this to allow the configuration to be inspected at runtime even if no software management is enabled. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-03regulator: s2mps11: Copy supported regulators from initconstKrzysztof Kozlowski1-13/+62
Add __initconst to 'regulator_desc' array with supported regulators. During probe choose how many and which regulators will be supported according to device ID. Then copy the 'regulator_desc' array to allocated memory so the regulator core can use it. Additionally allocate array of of_regulator_match() dynamically (based on number of regulators) instead of allocation on the stack. This is needed for supporting different devices in s2mps11 driver and actually prepares the regulator driver for supporting the S2MPS14 device. Code for supporting the S2MPS14 device will add its own array of 'regulator_desc' (also marked as __initconst). This way memory footprint of the driver will be reduced (approximately 'regulators_desc' array for S2MPS11 occupies 5 kB on 32-bit ARM, for S2MPS14 will occupy 3 kB). Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]> Cc: Yadwinder Singh Brar <[email protected]> Reviewed-by: Yadwinder Singh Brar <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-03regulator: s2mps11: Constify regulator_desc arrayKrzysztof Kozlowski1-1/+1
Constify the regulator_desc 'regulators' array. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-03regulator: s2mps11: Don't store registered regulators in state containerKrzysztof Kozlowski1-5/+5
Regulators registered by devm_regulator_register() do not have to be stored in state container because they are never dereferenced later. The array of regulator_dev can be safely removed from state container. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-03regulator: mc13xxx: Fix probing with DTAlexander Shiyan1-4/+4
The nodes of regulators should be retrieved from parent device. Bug was be introduced by commit (regulator: mc13xxx: Fix NULL pointer error in non-DT mode) in conjuction with (mfd: Revert "mfd: Always assign of_node in mfd_add_device()"). Signed-off-by: Alexander Shiyan <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-02-27regulator: 88pm8607: fix indent code styleJingoo Han1-3/+3
Fix indent code style in order to fix the following checkpatch issues. ERROR: code indent should use tabs where possible WARNING: please, no space before tabs WARNING: please, no spaces at the start of a line Signed-off-by: Jingoo Han <[email protected]> Acked-by: Haojian Zhuang <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-02-26regulator: dummy: Should be always-onMarkus Pargmann1-1/+5
Regulator dummy does not have any enable operations. So it is always_on. Signed-off-by: Markus Pargmann <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-02-25regulator: mc13xxx: Fix NULL pointer error in non-DT modeSachin Kamat1-4/+8
Add a check to avoid NULL pointer dereference error when booted in non-DT mode. While at it also remove the additional of_node_get which is no longer needed for of_get_child_by_name and fix the node pointer. Signed-off-by: Sachin Kamat <[email protected]> Reported-by: Philippe Rétornaz <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-02-25regulator: core: Replace direct ops->disable usageMarkus Pargmann1-21/+13
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. Cc: <[email protected]> # 3.10+ Signed-off-by: Markus Pargmann <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-02-25regulator: core: Replace direct ops->enable usageMarkus Pargmann1-7/+7
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] Cc: <[email protected]> # 3.10+ Signed-off-by: Markus Pargmann <[email protected]> Signed-off-by: Mark Brown <[email protected]> regulator: Handle invalid enable operation for always/boot on regulators Signed-off-by: Mark Brown <[email protected]>
2014-02-23pfuze100-regulator: Return error on of_node_get() failureFabio Estevam1-1/+1
If of_node_get() fails, we should return an error. Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-02-23Merge remote-tracking branches 'regulator/fix/da9063', ↵Mark Brown3-4/+9
'regulator/fix/max14577' and 'regulator/fix/s5m8767' into regulator-linus
2014-02-23Merge remote-tracking branch 'regulator/fix/core' into regulator-linusMark Brown1-1/+1
2014-02-22regulator: 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 <[email protected]> Reviwed-by: Sachin Kamat <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-02-21regulator: core: Change dummy supplies error message to a warningShuah Khan1-1/+1
Change "dummy supplies not allowed" error message to warning instead, as this is a just warning message with no change to the behavior. [Added a CC to stable since some other bug fixes cause this to come up more frequently on PCs which is how it was noticed -- broonie] Signed-off-by: Shuah Khan <[email protected]> Signed-off-by: Mark Brown <[email protected]> Cc: [email protected]
2014-02-20Merge branch 'master' into for-nextJiri Kosina28-441/+967
2014-02-20regulator: wm8994: Remove redundant error messageSachin Kamat1-3/+1
kzalloc prints its own OOM message upon failure. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-02-20regulator: wm831x-ldo: Remove redundant error messageSachin Kamat1-9/+3
kzalloc prints its own OOM message upon failure. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-02-20regulator: wm831x-isink: Remove redundant error messageSachin Kamat1-3/+1
kzalloc prints its own OOM message upon failure. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-02-20regulator: wm831x-dcdc: Remove redundant error messageSachin Kamat1-12/+4
kzalloc prints its own OOM message upon failure. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-02-20regulator: tps80031: Remove redundant error messageSachin Kamat1-3/+1
kzalloc prints its own OOM message upon failure. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-02-20regulator: tps65910: Remove redundant error messageSachin Kamat1-16/+5
kzalloc prints its own OOM message upon failure. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-02-20regulator: tps6586x: Remove redundant error messageSachin Kamat1-6/+2
kzalloc prints its own OOM message upon failure. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-02-20regulator: tps6524x: Remove redundant error messageSachin Kamat1-3/+2
kzalloc prints its own OOM message upon failure. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-02-20regulator: tps65090: Remove redundant error messageSachin Kamat1-9/+3
kzalloc prints its own OOM message upon failure. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-02-20regulator: tps6507x: Remove redundant error messageSachin Kamat1-6/+2
kzalloc prints its own OOM message upon failure. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-02-20regulator: tps62360: Remove redundant error messageSachin Kamat1-7/+2
kzalloc prints its own OOM message upon failure. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-02-20regulator: tps51632: Remove redundant error messageSachin Kamat1-6/+2
kzalloc prints its own OOM message upon failure. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-02-20regulator: s5m8767: Remove redundant error messageSachin Kamat1-8/+2
kzalloc prints its own OOM message upon failure. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-02-20regulator: rc5t583: Remove redundant error messageSachin Kamat1-3/+1
kzalloc prints its own OOM message upon failure. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-02-20regulator: max8997: Remove redundant error messageSachin Kamat1-1/+0
kzalloc prints its own OOM message upon failure. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-02-20regulator: max8952: Remove redundant error messageSachin Kamat1-3/+1
kzalloc prints its own OOM message upon failure. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Mark Brown <[email protected]>