1
0
Fork 0
Commit Graph

2191 Commits (9e5e2ffda320bacb761e4812e3ef7a7decd592a9)

Author SHA1 Message Date
Axel Lin 89ad288961 regulator: bcm590xx: Remove **rdev from struct bcm590xx_reg
The **rdev of 'struct bcm590xx_reg' isn't used anywhere in the driver so
remove it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Matt Porter <mporter@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-21 18:09:36 +00:00
Axel Lin c93474316d regulator: bcm590xx: Make the modalias matches the driver name
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-21 18:09:34 +00:00
Axel Lin 9c4c60554a regulator: s5m8767: Convert to use regulator_[enable|disable|is_enabled]_regmap
Since commit ca5d1b3524
"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 <axel.lin@ingics.com>
Tested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-21 17:47:49 +00:00
Ulf Hansson eced9d5e93 regulator: db8500-prcmu: Set 1.8V as a fixed voltage for vsmps2
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 <ulf.hansson@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-21 17:46:40 +00:00
Sachin Kamat 991acaf629 regulator: s2mps11: Add missing of_node_put
Add of_node_put to decrement the ref count.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-19 13:11:07 +00:00
Sachin Kamat 14256f734e regulator: s2mps11: Use of_get_child_by_name
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 <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-19 13:11:07 +00:00
Krzysztof Kozlowski 05be09bb5e regulator: s2mps11: Add set_suspend_disable for S2MPS14
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 <k.kozlowski@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-19 13:02:51 +00:00
Krzysztof Kozlowski 15f77300c9 regulator: s2mps11: Add support for S2MPS14 regulators
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>
Cc: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Reviewed-by: Yadwinder Singh Brar <yadi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-19 13:02:51 +00:00
Mark Brown 236b11de51 Merge branch 'ib-mfd-regulator-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into regulator-s2mps11 2014-03-19 13:02:34 +00:00
Sachin Kamat dda5e36b1c regulator: max8660: Fix brace alignment
Move the "};" to next line as is the general coding practice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-19 12:47:06 +00:00
Jingoo Han 80c48e72f8 regulator: dbx500: use seq_puts() instead of seq_printf()
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 <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-19 10:19:49 +00:00
Sachin Kamat e77addc597 regulator: dbx500-prcmu: Silence checkpatch warnings
Silences the following warning type:
WARNING: Missing a blank line after declarations

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-19 10:19:46 +00:00
Axel Lin 114c5748d5 regulator: anatop: Remove checking control_reg in [set|get]_voltage_sel
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 <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-18 18:35:56 +00:00
Sachin Kamat a5f8f96307 regulator: max8952: Silence checkpatch warning
Silences the following type of checkpatch warning:
WARNING: Missing a blank line after declarations

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-18 12:43:20 +00:00
Sachin Kamat c74c76e850 regulator: max8925: Silence checkpatch warning
Silences the following type of checkpatch warning:
WARNING: Missing a blank line after declarations

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-18 12:40:19 +00:00
Sachin Kamat f920ec7981 regulator: max8660: Silence checkpatch warnings
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 <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-18 12:38:56 +00:00
Charles Keepax a35ff28616 regulator: arizona-ldo1: Correct default regulator init_data
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 <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2014-03-18 11:18:00 +00:00
Sachin Kamat f187927146 regulator: Add support for S2MPA01 regulator
Add support for S2MPA01 voltage and current regulator.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-18 10:56:30 +00:00
Axel Lin d6fe2c7251 regulator: tps6586x: Remove unnecessary rdev[] array
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 <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-13 11:42:23 +00:00
Colin Ian King f377ed107b regulator: da9063: fix assignment of da9063_reg_matches to NULL
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 <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-11 19:05:05 +00:00
Matt Porter 462c9fc5cb regulator: add bcm590xx regulator driver
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 <mporter@linaro.org>
Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
Reviewed-by: Markus Mayer <markus.mayer@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-11 18:51:42 +00:00
Axel Lin fb8eb45400 regulator: act8865: Remove unnecessary *rdev[] from struct act8865
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 <axel.lin@ingics.com>
Acked-by: Wenyou Yang <Wenyou.yang@atmel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-10 10:30:21 +00:00
Krzysztof Kozlowski 2d45e78a9a regulator: max1586: Don't allocate memory for regulator_dev pointers
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 <k.kozlowski@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-10 10:24:28 +00:00
Axel Lin 8a221df699 regulator: max8998: Remove unnecessary **rdev from struct max8998_data
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 <axel.lin@ingics.com>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-10 10:12:13 +00:00
Axel Lin ad78bba42a regulator: max8997: Remove unnecessary **rdev from struct max8997_data
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 <axel.lin@ingics.com>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-10 10:11:15 +00:00
Krzysztof Kozlowski 67f76a935f regulator: max8660: Remove regulator_dev pointer from state container
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 <k.kozlowski@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-10 09:46:28 +00:00
Krzysztof Kozlowski 9654fbe9cd regulator: max8973: Remove unused field from 'struct max8973_chip'
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 <k.kozlowski@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-10 09:36:42 +00:00
Krzysztof Kozlowski b874f41c6b regulator: max8952: Use managed regulator registration
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 <k.kozlowski@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-10 09:36:15 +00:00
Krzysztof Kozlowski 15af45d152 regulator: max8925: Remove unused state container fields
Remove fields from 'struct max8925_regulator' which are not used
anywhere in the driver.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-10 09:35:35 +00:00
Krzysztof Kozlowski f991525a1a regulator: max8907: Remove regulator_dev array from state container
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 <k.kozlowski@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-10 09:34:59 +00:00
Krzysztof Kozlowski b7313b89c5 regulator: max8649: Remove regulator_dev pointer from state container
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 <k.kozlowski@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-10 09:32:58 +00:00
Krzysztof Kozlowski 640c24a77b regulator: max77693: Remove state container as it is not needed
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 <k.kozlowski@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-10 09:31:56 +00:00
Krzysztof Kozlowski b0c13e8030 regulator: max77686: Remove regulator_dev array from state container
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 <k.kozlowski@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-10 09:29:01 +00:00
Krzysztof Kozlowski aaa46b4b1a regulator: max1586: Remove regulator_dev pointer from state container
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 <k.kozlowski@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-10 09:22:51 +00:00
Carlo Caione ca5d1b3524 regulator: helpers: Modify helpers enabling multi-bit control
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 <carlo@caione.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-06 17:30:10 +08:00
Axel Lin 2cee2121db regulator: pfuze100: Add PFUZE200 support to Kconfig and module description
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Robin Gong <b38343@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-06 12:26:21 +08:00
Jingoo Han 350ff52d40 regulator: tps80031: remove unnecessary parentheses
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 <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-05 12:33:18 +08:00
Balaji T K 11469e0bb1 regulator: add pbias regulator support
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 <balajitk@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Mark Brown <broonie@linaro.org>
Tested-by: Florian Vaussard <florian.vaussard@epfl.ch>
Tested-by: Stefan Roese <sr@denx.de>
Signed-off-by: Chris Ball <chris@printf.net>
2014-03-04 11:44:47 -05:00
Linus Torvalds 16e3f5391c regulator: Fixes for v3.14-rc5
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.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTFU8hAAoJELSic+t+oim9SmgP+wVddsDf+4igNw6Lo5JTW368
 aY5m6ulB8XIwCtYQhsLHzUIcVbY3/p1zY+cdi0VmmINja3qHCE30H4Asq/LjcT9U
 1DI4Z20CgUOST5PZDKK5+sILSro/AxfsnGyIIj5F9YhX3wl46jUfrw2us5fbPDJU
 ny3NnUM8R/fFIzOd0ishxcY3L1GSe/4a2Ob9uqsq/tPWAeHKoDVAefN6wUeFhulI
 0CVlrRaL/FGnnbdcQ+TZgKxm7TXRrUkLqrUR2RxZr7Olk2ZEQhT18OcncdFesIM2
 F9GuXE+QL04QrTeLVOsPXWqmcS0UzJqy2luNBbMfOQ/K/JY/lyL6wrLlVi4snfcX
 v2GrrPQTJ13IU/itBtAMOtWmjJlg3r91vYgqXu05T/7Lt2DCkp3YfUZ6UDjwDe1c
 K4l/l/VwbUPur3NhMupZO+Ohfe+grp2+UPCUC6McmNWAEJSZPoGA7lNo618ZfrQQ
 x3ByYcIit9dpTNw6j0rWbgOqsZ4VscW32gSJd+QXAqxolbvnbDnRDHNjS4O9sx1k
 rHHZk8oDvhkfp4ptSkWQeuDUEAZsuidlonQMdfQl1+T2yZnxE19G3CwmPA94itAk
 i8owlr+Fp3YcDoE8jaRf2JFKiKHC5f3dF5ceDqFufMk0a+nqEGkOj/RmGch3y3wz
 itzqO0PcRi/YEsoTW7dt
 =Vx3C
 -----END PGP SIGNATURE-----

Merge tag 'regulator-v3.14-rc5' of 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-04 08:41:42 -08:00
Axel Lin e6c4c3378d regulator: pfuze100: Add terminate entry for [i2c|of]_device_id tables
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 <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-04 18:46:55 +08:00
Robin Gong f2518480c7 regulator: pfuze100: add pfuze200 support
support pfuze200 chip which remove SW1C and SW4 based on pfuze100.

Signed-off-by: Robin Gong <b38343@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-04 17:40:31 +08:00
Krzysztof Kozlowski 0f4cc28295 regulator: s2mps11: Fix section mismatch
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 <k.kozlowski@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-04 11:01:57 +08:00
Axel Lin 94ee607c96 regulator: tps65217: Allow missing init_data for diagnostics
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 <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-03 12:00:39 +08:00
Krzysztof Kozlowski 3e80f95bfc regulator: s2mps11: Copy supported regulators from initconst
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 <k.kozlowski@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Cc: Yadwinder Singh Brar <yadi.brar01@gmail.com>
Reviewed-by: Yadwinder Singh Brar <yadi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-03 10:08:55 +08:00
Krzysztof Kozlowski 219ef031de regulator: s2mps11: Constify regulator_desc array
Constify the regulator_desc 'regulators' array.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-03 10:08:55 +08:00
Krzysztof Kozlowski 3119525203 regulator: s2mps11: Don't store registered regulators in state container
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 <k.kozlowski@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-03 10:08:54 +08:00
Alexander Shiyan b431e69a6f regulator: mc13xxx: Fix probing with DT
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 <shc_work@mail.ru>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-03 10:58:23 +09:00
Jingoo Han e54f19bff4 regulator: 88pm8607: fix indent code style
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 <jg1.han@samsung.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-27 13:39:29 +09:00
Markus Pargmann 8669544a78 regulator: dummy: Should be always-on
Regulator dummy does not have any enable operations. So it is always_on.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-26 08:49:52 +09:00
Sachin Kamat bf7f882b1e regulator: mc13xxx: Fix NULL pointer error in non-DT mode
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 <sachin.kamat@linaro.org>
Reported-by: Philippe Rétornaz <philippe.retornaz@epfl.ch>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-25 21:27:59 +09:00
Markus Pargmann 66fda75f47 regulator: core: Replace direct ops->disable usage
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: <stable@vger.kernel.org> # 3.10+
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-25 10:31:45 +09:00
Markus Pargmann 30c2197103 regulator: core: Replace direct ops->enable usage
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: <stable@vger.kernel.org> # 3.10+
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>

regulator: Handle invalid enable operation for always/boot on regulators

Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-25 10:31:25 +09:00
Fabio Estevam 6428789e11 pfuze100-regulator: Return error on of_node_get() failure
If of_node_get() fails, we should return an error.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-23 14:34:32 +09:00
Mark Brown bcad2ca372 Merge remote-tracking branches 'regulator/fix/da9063', 'regulator/fix/max14577' and 'regulator/fix/s5m8767' into regulator-linus 2014-02-23 12:22:18 +09:00
Mark Brown f29d778fa4 Merge remote-tracking branch 'regulator/fix/core' into regulator-linus 2014-02-23 12:22:18 +09:00
Krzysztof Kozlowski 08221fc4e7 regulator: max14577: Fix invalid return value on DT parse success
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-02-22 11:54:17 +09:00
Shuah Khan acc3d5cec8 regulator: core: Change dummy supplies error message to a warning
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 <shuah.kh@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2014-02-21 08:35:31 +09:00
Jiri Kosina d4263348f7 Merge branch 'master' into for-next 2014-02-20 14:54:28 +01:00
Sachin Kamat 4deaf85a39 regulator: wm8994: Remove redundant error message
kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 21:05:39 +09:00
Sachin Kamat fae3b83645 regulator: wm831x-ldo: Remove redundant error message
kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 21:03:17 +09:00
Sachin Kamat d718debcdb regulator: wm831x-isink: Remove redundant error message
kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 21:03:16 +09:00
Sachin Kamat 5730aa57de regulator: wm831x-dcdc: Remove redundant error message
kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 21:03:14 +09:00
Sachin Kamat 96fa8c4b9b regulator: tps80031: Remove redundant error message
kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 21:02:22 +09:00
Sachin Kamat bcb2c0d691 regulator: tps65910: Remove redundant error message
kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 21:01:27 +09:00
Sachin Kamat 02e905845f regulator: tps6586x: Remove redundant error message
kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 20:57:06 +09:00
Sachin Kamat 516add1d9d regulator: tps6524x: Remove redundant error message
kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 20:54:59 +09:00
Sachin Kamat 0ad91c69ab regulator: tps65090: Remove redundant error message
kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 20:53:58 +09:00
Sachin Kamat fe23ce0813 regulator: tps6507x: Remove redundant error message
kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 20:53:09 +09:00
Sachin Kamat 33e63ba6c6 regulator: tps62360: Remove redundant error message
kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 20:51:08 +09:00
Sachin Kamat ef4bcf88ea regulator: tps51632: Remove redundant error message
kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 20:50:01 +09:00
Sachin Kamat 4754b4211d regulator: s5m8767: Remove redundant error message
kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 20:49:06 +09:00
Sachin Kamat 2ea2583f2f regulator: rc5t583: Remove redundant error message
kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 20:26:05 +09:00
Sachin Kamat f0d5c73af6 regulator: max8997: Remove redundant error message
kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 20:24:59 +09:00
Sachin Kamat 7752d96400 regulator: max8952: Remove redundant error message
kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 20:24:00 +09:00
Sachin Kamat d016bdc7f4 regulator: max8907: Remove redundant error message
kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 20:23:18 +09:00
Sachin Kamat f1b3f9031d regulator: fixed: Remove redundant error message
kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 20:22:35 +09:00
Sachin Kamat 7c2ee82c16 regulator: max77686: Remove redundant error message
kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 20:21:47 +09:00
Sachin Kamat df948bbf48 regulator: fan53555: Remove redundant error message
kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Yunfan Zhang <yfzhang@marvell.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 20:20:39 +09:00
Sachin Kamat cb487c5c0e regulator: dbx500: Remove redundant error message
kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 20:19:45 +09:00
Sachin Kamat 6c48acfb2a regulator: da9210: Remove redundant error message
kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 19:58:46 +09:00
Sachin Kamat 8b5baa56f2 regulator: da9063: Remove redundant error message
kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 19:57:19 +09:00
Sachin Kamat 31833581de regulator: as3711: Remove redundant error message
kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 01:38:41 +09:00
Sachin Kamat 820cd31e36 regulator: arizona-micsupp: Remove redundant error message
kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 01:37:59 +09:00
Sachin Kamat f4a6c5b41c regulator: arizona-ldo1: Remove redundant error message
kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 01:37:59 +09:00
Sachin Kamat 5ee77ef27e regulator: act8865: Remove redundant error message
kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 01:35:31 +09:00
Sachin Kamat 001f004ba7 regulator: 88pm800: Remove redundant error message
kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 01:34:38 +09:00
Sachin Kamat fe2eb72218 regulator: da9055: Do not hardcode return value
Propagate the error value returned by the function instead.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 01:33:53 +09:00
Sachin Kamat 8a7963d55b regulator: da9063: Do not hardcode return values
Propagate the error values returned by the function instead.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 01:31:47 +09:00
Sachin Kamat 145fe1e1d5 regulator: fan53555: Do not hardcode return values
Propagate the error values returned by the function instead.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 01:30:08 +09:00
Sachin Kamat a1985d469d regulator: lp3971: Do not hardcode return value
Propagate the error value returned by the function instead.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 01:28:12 +09:00
Sachin Kamat ad5ec6cdb2 regulator: lp872x: Do not hardcode return values
Propagate the error values returned by the function instead.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 01:26:02 +09:00
Masanari Iida e227867f12 treewide: Fix typo in Documentation/DocBook
This patch fix spelling typo in Documentation/DocBook.
It is because .html and .xml files are generated by make htmldocs,
I have to fix a typo within the source files.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-02-19 14:58:17 +01:00
Sachin Kamat e9fa1a3ac6 regulator: max8925: Do not hardcode return value
Propagate the error value returned by the function instead.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-19 22:08:35 +09:00
Sachin Kamat 21024dee20 regulator: max8973: Remove redundant error message
kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-19 22:07:51 +09:00
Sachin Kamat 8bad62cca3 regulator: ti-abb: Remove redundant error message
kzalloc prints its own OOM message upon failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-19 22:06:52 +09:00
Sachin Kamat 0ab5c85d68 regulator: ti-abb: Do not hardcode return value
Propagate the error value returned by the function instead.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-19 22:06:52 +09:00
Philipp Zabel 5c99a7b1f0 regulator: da9052: Add ramp speed information for the DVC regulators
Some LDOs and DCDCs have a fixed ramp speed of 6.25 mV/µs. This patch adds
the set_voltage_time_sel function to let consumers know about this.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-19 22:04:38 +09:00
Axel Lin 948838a10a regulator: tps65218: Add OF dependency
This is a DT-only driver, so make it depend on OF and remove of_match_ptr in
the code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-19 21:18:58 +09:00
Axel Lin 413be59e2f regulator: tps65218: Remove unnecessary regulator_unregister call
Current code uses devm_regulator_register() so the we don't need to explicitly
call regulator_unregister() in .remove.
And then we don't need to save rdev pointer to tps->rdev[id].

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-19 21:18:54 +09:00
Axel Lin c46b5295ac regulator: tps65218: Add terminate entry for of_device_id table
Fixes below build error:
FATAL: drivers/regulator/tps65218-regulator: struct of_device_id is not terminated with a NULL entry!

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-19 21:18:50 +09:00
Sachin Kamat 0b61ad1a7e regulator: wm8350: Do not hardcode return value
Propagate the error value returned by the function instead.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-19 13:24:12 +09:00
Fabio Estevam 3e01c75a45 pfuze100-regulator: Fix of_node_get() parameter
Since commit d7857c42 (regulator: pfuze100: Use of_get_child_by_name) we get
the following probe failure:

pfuze100-regulator 1-0008: Full layer: 1, Metal layer: 0
pfuze100-regulator 1-0008: FAB: 0, FIN: 0
pfuze100-regulator 1-0008: regulators node not found
pfuze100-regulator: probe of 1-0008 failed with error -22

Now that of_get_child_by_name() is used we should adjust the device_node pointer
'np' to not get the parent node anymore.

Suggested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-19 13:15:02 +09:00
Sachin Kamat 026cdfe6f8 regulator: tps65090: Add missing of_node_put
Add of_node_put to decrement the ref count.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-18 11:05:00 +09:00
Sachin Kamat aaacb0e9e6 regulator: tps6507x: Add missing of_node_put
Add of_node_put to decrement the ref count.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-18 11:03:51 +09:00
Sachin Kamat 58c9537791 regulator: max8998: Add missing of_node_put
Add of_node_put to decrement the ref count.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-18 11:02:43 +09:00
Sachin Kamat cde248f92f regulator: max8660: Add missing of_node_put
Add of_node_put to decrement the ref count.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-18 11:02:08 +09:00
Sachin Kamat d9aa5c5631 regulator: max77693: Add missing of_node_put
Add of_node_put to decrement the ref count.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-18 11:01:15 +09:00
Sachin Kamat da0ee72d6d regulator: max77686: Add missing of_node_put
Add of_node_put to decrement the ref count.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-18 11:00:45 +09:00
Sachin Kamat 2da8215ce2 regulator: da9063: Add missing of_node_put
Add of_node_put to decrement the ref count.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-18 10:59:59 +09:00
Sachin Kamat ba40e5571b regulator: as3722: Add missing of_node_put
Add of_node_put to decrement the ref count.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-18 10:59:02 +09:00
Sachin Kamat 0079eb53c0 regulator: act8865: Add missing of_node_put
Add of_node_put to decrement the ref count.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-18 10:56:51 +09:00
Sachin Kamat 93195c33eb regulator: tps65217: Use of_get_child_by_name
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 <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-14 21:21:54 +00:00
Sachin Kamat e3d4edfd98 regulator: tps6507x: Use of_get_child_by_name
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 <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-14 21:20:49 +00:00
Sachin Kamat d7857c4294 regulator: pfuze100: Use of_get_child_by_name
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 <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-14 21:20:06 +00:00
Sachin Kamat fc5a6e5b0c regulator: mc13xxx: Use of_get_child_by_name
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 <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-14 21:19:27 +00:00
Sachin Kamat 25cc275a8b regulator: da9063: Use of_get_child_by_name
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 <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-14 21:18:37 +00:00
Sachin Kamat a4b4e66aad regulator: da9055: Use of_get_child_by_name
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 <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-14 21:17:59 +00:00
Sachin Kamat b327bcc0ac regulator: da9052: Use of_get_child_by_name
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 <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-14 21:16:30 +00:00
Sachin Kamat eecb02c003 regulator: as3711: Use of_get_child_by_name
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 <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-14 21:15:46 +00:00
Sachin Kamat 6ea970a9be regulator: act8865: Use of_get_child_by_name
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 <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-14 21:14:36 +00:00
Sachin Kamat ca1e3f33d9 regulator: 88pm8607: Use of_get_child_by_name
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 <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-14 21:13:40 +00:00
Sachin Kamat c0a3536317 regulator: max8997: Use of_get_child_by_name
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 <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-14 21:11:39 +00:00
Sachin Kamat 1f4f88c0ae regulator: max8925: Use of_get_child_by_name
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 <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-14 21:10:50 +00:00
Sachin Kamat c61f140139 regulator: max8907: Use of_get_child_by_name
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 <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-14 21:10:05 +00:00
Sachin Kamat 826adb4900 regulator: max8660: Use of_get_child_by_name
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 <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-14 21:09:32 +00:00
Sachin Kamat 4fa43a4a6f regulator: max77693: Use of_get_child_by_name
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 <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-14 21:08:31 +00:00
Sachin Kamat 398a6616b5 regulator: max77686: Use of_get_child_by_name
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 <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-14 21:07:45 +00:00
Philipp Zabel d38018f201 regulator: anatop: Add bypass support to digital LDOs
The ARM, PU, and SOC LDOs in the i.MX6 PMU can operate
in bypass mode. This allows to use external switching
regulators for cpu voltage scaling.

Since bypass and power gating modes are not configured
with their own bits, but via the voltage target bitfield,
store bypass state to be restored when reenabling the
regulator.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-14 20:30:47 +00:00
Philipp Zabel 605ebd35f0 regulator: anatop: Add power gating support to digital LDOs
The ARM, PU, and SOC LDOs in the i.MX6 PMU can completely gate
their power output. Since power gating is configured by writing
zero to the voltage target bitfield,, store a copy of the
voltage selector to be restored when reenabling the regulator.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-14 20:30:47 +00:00
Keerthy 90e7d52627 regulator: tps65218: Add Regulator driver for TPS65218 PMIC
This patch adds support for TPS65218 PMIC regulators.

The regulators set consists of 6 DCDCs and 1 LDO. The output
voltages are configurable and are meant to supply power to the
main processor and other components.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-14 20:20:35 +00:00
Heiko Stuebner 1f5a9623eb regulator: gpio-regulator: fix forgotten gpios-states reading
Commit 934624d6e9 ("regulator: gpio-regulator: do not open-code counting
and access of dt array elements") forgot to convert the recently added
gpios-states property using the same pattern.

Convert this instance to use the of-helpers too, resolving the build error.

Signed-off-by: Heiko Stuebner <heiko.stuebner@bqreaders.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-14 14:58:57 +00:00
Sachin Kamat b7db01f3b3 regulator: s5m8767: Add missing of_node_put
Add of_node_put to decrement the ref count.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-13 18:25:40 +00:00
Sachin Kamat 4e52c03dfc regulator: s5m8767: Use of_get_child_by_name
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 <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-13 18:25:40 +00:00
Heiko Stuebner 5c24d355dd regulator: ti-abb-regulator: do not open-code counting and access of dt array elements
Open coding the counting of elements in a dt-property is abstracted by the newly
introduced of_property_count_uXX_elems functions. Additionally the raw iteration
over the states element exposes the endian conversion and dtb-format details,
which according to Mark Rutland "would be nice to limit [...] to of_ helper
functions".

Thus change ti-abb-regulator to use the helper for element counting and
of_property_read_u32_index for retrieval of individual values.

This makes it possible to remove the raw access to the property entirely.

Signed-off-by: Heiko Stuebner <heiko.stuebner@bqreaders.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-12 15:51:25 +00:00
Heiko Stuebner 934624d6e9 regulator: gpio-regulator: do not open-code counting and access of dt array elements
Open coding the counting of elements in a dt-property is abstracted by the newly
introduced of_property_count_uXX_elems functions. Additionally the raw iteration
over the states element exposes the endian conversion and dtb-format details,
which according to Mark Rutland "would be nice to limit [...] to of_ helper
functions".

Thus change gpio-regulator to use the helper for element counting and
of_property_read_u32_index for retrieval of individual values.

This makes it possible to remove the raw access to the states property entirely.

Signed-off-by: Heiko Stuebner <heiko.stuebner@bqreaders.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-12 15:50:40 +00:00
Steve Twiss ebf6dad0de regulator: da9063: Bug fix when setting max voltage on LDOs 5-11
Bug fix to allow the setting of maximum voltage for certain LDOs.

What the bug is:

There is a problem caused by an invalid calculation of n_voltages
in the driver. This n_voltages value has the potential to be
different for each regulator.

The value for linear_min_sel is set as DA9063_V##regl_name#
which can be different depending upon the regulator. This is
chosen according to the following definitions in the DA9063
registers.h file:

DA9063_VLDO1_BIAS	0
DA9063_VLDO2_BIAS	0
DA9063_VLDO3_BIAS	0
DA9063_VLDO4_BIAS	0
DA9063_VLDO5_BIAS	2
DA9063_VLDO6_BIAS	2
DA9063_VLDO7_BIAS	2
DA9063_VLDO8_BIAS	2
DA9063_VLDO9_BIAS	3
DA9063_VLDO10_BIAS	2
DA9063_VLDO11_BIAS	2

The calculation for n_voltages is valid for LDOs whose BIAS value
is zero but this is not correct for those LDOs which have a
non-zero value.

What the fix is:

In order to take into account the non-zero linear_min_sel value which
is set for the regulators LDO5, LDO6, LDO7, LDO8, LDO9, LDO10 and
LDO11, the calculation for n_voltages should take into account the
missing term defined by DA9063_V##regl_name#.

This will in turn allow the core constraints calculation to set the
maximum voltage limits correctly and therefore allow users to apply
the maximum expected voltage to all of the LDOs.

Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2014-02-12 15:14:37 +00:00
Kuninori Morimoto 5676ddc5c6 regulator: gpio: print warning if gpios <-> gpios-states mismatch on DT
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-12 12:01:14 +00:00
SeongJae Park dae6cdb422 regulator: da9055: declare return type of inline function exclusively
da9055_regulator_dt_init does not declare return type and it cause
following build warning.

drivers/regulator/da9055-regulator.c:582:15: warning:
        return type defaults to ‘int’ [-Wreturn-type]
 static inline da9055_regulator_dt_init(struct platform_device *pdev,
               ^

Fix the warning by declare return type as int exclusively.

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-12 11:55:40 +00:00
Mark Brown 5c306c8ab5 Merge remote-tracking branches 'regulator/fix/da9055' and 'regulator/fix/max14577' into regulator-linus 2014-02-12 11:47:33 +00:00
Manish Badarkhe 84d0ffbe28 regulator: fixed: update to devm_* API
Update the code to use devm_* API so that driver core will manage
resources.

Signed-off-by: Manish Badarkhe <badarkhe.manish@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-11 16:34:32 +00:00
Axel Lin 3f24bf70a4 regulator: rc5t583: Allow missing init_data for diagnostics
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 <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-11 12:27:45 +00:00
Axel Lin f7e9e52f7d regulator: as3711: Allow missing init_data for diagnostics
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 <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-11 12:26:24 +00:00
Adam Thomson 8b61a28d61 regulator: da9055: Add DT support
Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-07 16:30:02 +00:00
Adam Thomson f17083c3af regulator: da9055: Remove use of regmap_irq_get_virq()
Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-07 16:27:37 +00:00
Bjorn Andersson c00dc359e5 regulator: core: Allow regulator_set_voltage for fixed regulators
Make it okay to call regulator_set_voltage on regulators with fixed
voltage if the requested range overlaps the current/configured voltage.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-07 12:14:19 +00:00
Manish Badarkhe 4246e55fa8 regulator: tps6507x: Use "IS_ENABLED" for DT code.
Instead of "#ifdef CONFIG_OF" use "IS_ENABLED(CONFIG_OF)"
option for DT code to avoid if-deffery in code.
Also, modify code as per coding style.

Signed-off-by: Manish Badarkhe <badarkhe.manish@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-07 12:13:11 +00:00
Krzysztof Kozlowski 667a6b7a62 regulator: max14577: Add missing of_node_put
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-02-05 17:06:13 +00:00
Kuninori Morimoto 0094050d78 regulator: gpio: add gpios-status for DT
config->gpios[x].flags indicates initial pin status,
and it will be used for drvdata->state
on gpio_regulator_probe().
But, current of_get_gpio_regulator_config() doesn't care
about this flags.
This patch adds new gpios-status property in order to
care about initial pin status.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-04 18:36:48 +00:00
Mark Brown a6a671e1b6 Merge remote-tracking branches 'regulator/fix/ab3100' and 'regulator/fix/s2mps11' into regulator-linus 2014-02-04 12:58:19 +00:00
Mark Brown 00e6747024 Merge remote-tracking branch 'regulator/fix/core' into regulator-linus 2014-02-04 12:58:17 +00:00