1
0
Fork 0
Commit Graph

1941 Commits (2b9e4a73fbd90cb8459cf84c12ae05d2eb81da41)

Author SHA1 Message Date
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
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
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
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
Krzysztof Kozlowski 54820f5802 regulator: s2mps11: Fix NULL pointer of_node value when using platform data
When platform_data is used for regulator (of_node of sec-core MFD device
is NULL) the config.of_node for regulator is not initialized. This NULL
value of config.of_node is later stored during regulator_register().
Thus any call by regulator consumers to of_get_regulator() will fail on
of_parse_phandle() returning NULL.

In this case (using platform_data and parent's driver of_node is NULL)
set the config.of_node to reg_node from platform_data.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-31 16:52:03 +00:00
Mark Brown 317b5684d5 regulator: core: Correct default return value for full constraints
Once we have full constraints then all supply mappings should be known to
the regulator API. This means that we should treat failed lookups as fatal
rather than deferring in the hope of further registrations but this was
broken by commit 9b92da1f12 "regulator: core: Fix default return
value for _get()" which was targeted at DT systems but unintentionally
broke non-DT systems by changing the default return value.

Fix this by explicitly returning -EPROBE_DEFER from the DT lookup if we
find a property but no corresponding regulator and by having the non-DT
case default to -ENODEV when we have full constraints.

Fixes: 9b92da1f12 "regulator: core: Fix default return value for _get()"
Signed-off-by: Mark Brown <broonie@linaro.org>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Cc: stable@vger.kernel.org
2014-01-28 11:37:43 +00:00
Linus Torvalds 15333539a9 regulator: Updates for v3.14
A respin of the merges in the previous pull request with one extra fix.
 A quiet release for the regulator API, quite a large number of small
 improvements all over but other than the addition of new drivers for the
 AS3722 and MAX14577 there is nothing of substantial non-local impact.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJS4QTYAAoJELSic+t+oim92bMP/09kMG+4zS6TGM+ljselfYLQ
 XmqEAfLpND+07HmxlCRMHIRdrzMm7QrrW076UT3u6Q/RUi6L7LjXWdFNhm9d7k4V
 l45lvpo8C+bJkmX9Y9+dBPKbY5qnz9Kttpr/8wn0uAz1zhqhCCG2GYp0eV7Qcz7L
 XrBfiWmmeu11ArFtQcVPheGMdjiG2hpxbHqJ4e5nZ8kJ3C31RgfTR2r8xA8xr99H
 LhzuwoKjlsjzIuXUgd2F/i4TqtOkpg69wQocRnOYyyEpd4TnI+q4pk4GiMx4EuH1
 GMZ/XGmd1GuiAa7hXIWOyz7vNe54RPoLTWN8QEaYGXf8m/AUUVbje33BTtWbwEeU
 VXWbKpNEWWzykE6lPtxY9I0KMYbqAUvcflIL7kLYbxLS6RE5U4+dwYVEF0gwAWor
 svwgwXhjzNCJhb+DQlzKQa2zcWwJr0uT+DllPXEXJE5yIIn7cHEraYcS4cPfLNL5
 MLnB9BGX5zJQDJVsex/8jnCafI7M/CefIB06CbLK4klR1OtyTJc3yEhGCgWlJU4C
 NKdUbUhirCkPqY2v4RwWwOaxGs0WFWsyd5gYhCy3gL7O22pGW5yGO3MG524mRWrU
 ccU9lbpXgtHTTcb+RKBEwr9fWEcsCIt5gImcRoMxqfkjY0CsQJD8tVdl4Md7OYYv
 BjJexZZulWce7R3F7+Kf
 =1NsR
 -----END PGP SIGNATURE-----

Merge tag 'regulator-v3.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator updates from Mark Brown:
 "A respin of the merges in the previous pull request with one extra
  fix.

  A quiet release for the regulator API, quite a large number of small
  improvements all over but other than the addition of new drivers for
  the AS3722 and MAX14577 there is nothing of substantial non-local
  impact"

* tag 'regulator-v3.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (47 commits)
  regulator: pfuze100-regulator: Improve dev_info() message
  regulator: pfuze100-regulator: Fix some checkpatch complaints
  regulator: twl: Fix checkpatch issue
  regulator: core: Fix checkpatch issue
  regulator: anatop-regulator: Remove unneeded memset()
  regulator: s5m8767: Update LDO index in s5m8767-regulator.txt
  regulator: as3722: set enable time for SD0/1/6
  regulator: as3722: detect SD0 low-voltage mode
  regulator: tps62360: Fix up a pointer-integer size mismatch warning
  regulator: anatop-regulator: Remove unneeded kstrdup()
  regulator: act8865: Fix build error when !OF
  regulator: act8865: register all regulators regardless of how many are used
  regulator: wm831x-dcdc: Remove unneeded 'err' label
  regulator: anatop-regulator: Add MODULE_ALIAS()
  regulator: act8865: fix incorrect devm_kzalloc for act8865
  regulator: act8865: Remove set_suspend_[en|dis]able implementation
  regulator: act8865: Remove unneeded regulator_unregister() calls
  regulator: s2mps11: Clean up redundant code
  regulator: tps65910: Simplify setting enable_mask for regulators
  regulator: act8865: add device tree binding doc
  ...
2014-01-25 13:19:10 -08:00
Linus Walleij 23e21ddf6c regulator: ab3100: cast fix
The AB3100 regulator driver emits a warning when compiled on 64bit
systems like this:

drivers/regulator/ab3100.c:
In function ‘ab3100_regulator_of_probe’:
srivers/regulator/ab3100.c:649:4:
warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

As the int is a different size than the 64bit pointer used to
pass regulator data. Switch to using an unsigned long as ID
passed for the regulator to get rid of the warning.

Reported-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-23 19:52:09 +00:00
Mark Brown 07b1980848 Merge remote-tracking branches 'regulator/topic/s2mps11', 'regulator/topic/s5m8767', 'regulator/topic/stw481x-vmmc', 'regulator/topic/tps51632', 'regulator/topic/tps62360', 'regulator/topic/tps65910', 'regulator/topic/twl' and 'regulator/topic/wm831x' into regulator-linus 2014-01-23 12:01:31 +00:00
Mark Brown a2a2be6309 Merge remote-tracking branches 'regulator/topic/db8500', 'regulator/topic/gpio', 'regulator/topic/lp3971', 'regulator/topic/lp3972', 'regulator/topic/max14577', 'regulator/topic/max77693', 'regulator/topic/mc13892', 'regulator/topic/pcf50633' and 'regulator/topic/pfuze100' into regulator-linus 2014-01-23 12:01:27 +00:00
Mark Brown 849e1517a4 Merge remote-tracking branches 'regulator/fix/pfuze100', 'regulator/fix/s5m8767', 'regulator/topic/ab8500', 'regulator/topic/act8865', 'regulator/topic/anatop', 'regulator/topic/arizona' and 'regulator/topic/as3722' into regulator-linus 2014-01-23 12:01:24 +00:00
Mark Brown 7cd94843d0 Merge remote-tracking branch 'regulator/topic/core' into regulator-linus 2014-01-23 12:01:24 +00:00
Fabio Estevam f269438368 regulator: pfuze100-regulator: Improve dev_info() message
'lay' is not very meaningful, so use it 'layer' instead to let the dev_info()
clearer.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-23 12:00:17 +00:00
Alexander Shiyan e5a3da2143 mfd: mc13xxx: Remove useless symbol MFD_MC13783
Symbol MFD_MC13783 always selected by MFD_MC13XXX, so no need
to keep additional symbol.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-01-21 08:28:09 +00:00
Stefan Agner 844a4f0d8a regulator: tps6586x: Add and use correct voltage table
Depending on the regulator version, the voltage table might be
different. Use version specific regulator tables in order to select
correct voltage table. For the following regulator versions different
voltage tables are now used:

  * TPS658623: Use correct voltage table for SM2
  * TPS658643: New voltage table for SM2

Both versions are in use on the Colibri T20 module. Make use of the
correct tables by requesting the correct SM2 voltage of 1.8V.

This change is not backward compatible since an old driver is not able
to correctly set that value. The value 1.8V is out of range for the old
driver and will refuse to probe the device. The regulator starts with
default settings and the driver shows appropriate error messages.

On Colibri T20, the old value used to work with TPS658623 since the
driver applied a wrong voltage table too. However, the TPS658643 used
on V1.2 devices uses yet another voltage table and those broke that
pseudo-compatibility. The regulator driver now has the correct voltage
table for both regulator versions and those the correct voltage can be
used in the device tree.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Acked-by: Mark Brown <broonie@linaro.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-01-21 08:28:01 +00:00
Fabio Estevam 62b389161f regulator: pfuze100-regulator: Fix some checkpatch complaints
Fix the following checkpatch error and warning:

ERROR: switch and case should be at the same indent
#311: FILE: drivers/regulator/pfuze100-regulator.c:311:
+	switch (value & 0x0f) {
[...]
+		case 0x8:
[...]
+		case 0x0:
[...]
+		default:

WARNING: line over 80 characters
#312: FILE: drivers/regulator/pfuze100-regulator.c:312:
+		/* Freescale misprogrammed 1-3% of parts prior to week 8 of 2013 as ID=8 */

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-15 11:46:56 +00:00
Mark Brown 598911b42c Linux 3.13-rc4
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQEcBAABAgAGBQJSrhGrAAoJEHm+PkMAQRiGsNoH/jIK3CsQ2lbW7yRLXmfgtbzz
 i2Kep6D4SDvmaLpLYOVC8xNYTiE8jtTbSXHomwP5wMZ63MQDhBfnEWsEWqeZ9+D9
 3Q46p0QWuoBgYu2VGkoxTfygkT6hhSpwWIi3SeImbY4fg57OHiUil/+YGhORM4Qc
 K4549OCTY3sIrgmWL77gzqjRUo+pQ4C73NKqZ3+5nlOmYBZC1yugk8mFwEpQkwhK
 4NRNU760Fo+XIht/bINqRiPMddzC15p0mxvJy3cDW8bZa1tFSS9SB7AQUULBbcHL
 +2dFlFOEb5SV1sNiNPrJ0W+h2qUh2e7kPB0F8epaBppgbwVdyQoC2u4uuLV2ZN0=
 =lI2r
 -----END PGP SIGNATURE-----

Merge tag 'v3.13-rc4' into regulator-pfuze100

Linux 3.13-rc4
2014-01-15 11:46:35 +00:00
Jingoo Han 3db3988593 regulator: twl: Fix checkpatch issue
Fix the following checkpatch warnings.

  WARNING: please, no space before tabs
  WARNING: space prohibited between function name and open parenthesis '('

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 17:16:07 +00:00
Jingoo Han 0d25d09de1 regulator: core: Fix checkpatch issue
Fix the following checkpatch errors and warnings.

  ERROR: trailing whitespace
  ERROR: return is not a function, parentheses are not required
  WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 17:13:57 +00:00
Fabio Estevam 06e57b6c1e regulator: anatop-regulator: Remove unneeded memset()
sreg is allocated via devm_kzalloc(), so there is no need to explicitly zero out
rdesc via memset().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 12:50:11 +00:00
Vince Hsu fb04f1b0c0 regulator: as3722: set enable time for SD0/1/6
Add an enable time of 600us for SD0/1/6 to ensure that we have
enough setup time for the power rail.

Signed-off-by: Vince Hsu <vinceh@nvidia.com>
Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-06 18:09:39 +00:00
Andrew Bresticker 762a8ee808 regulator: as3722: detect SD0 low-voltage mode
SD0 may operate in low-voltage mode, with a minimum of 0.41V
and a maximum of 1.5V.  This is indicated by bit 4 of FUSE7.

Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Signed-off-by: Vince Hsu <vinceh@nvidia.com>
broonie.e6264@m.evernote.com
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-06 18:09:36 +00:00
David Howells 541f597f10 regulator: tps62360: Fix up a pointer-integer size mismatch warning
Fix up the following pointer-integer size mismatch warning in tps62360_probe():

	drivers/regulator/tps62360-regulator.c: In function 'tps62360_probe':
	drivers/regulator/tps62360-regulator.c:363:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
	   chip_id = (int)match->data;
		     ^

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-06 12:38:11 +00:00
Fabio Estevam f2b269b83d regulator: anatop-regulator: Remove unneeded kstrdup()
We can simply pass the regulator name via of_get_property() instead of making
a copy via kstrdup().

This leads to some code simplification.

Suggested-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-06 12:20:19 +00:00
Axel Lin a8659ba461 regulator: act8865: Fix build error when !OF
Fix below build error when !OF:
  CC [M]  drivers/regulator/act8865-regulator.o
drivers/regulator/act8865-regulator.c: In function 'act8865_pmic_probe':
drivers/regulator/act8865-regulator.c:306:18: error: 'act8865_matches' undeclared (first use in this function)
drivers/regulator/act8865-regulator.c:306:18: note: each undeclared identifier is reported only once for each function it appears in
drivers/regulator/act8865-regulator.c:306:18: error: negative width in bit-field '<anonymous>'
make[2]: *** [drivers/regulator/act8865-regulator.o] Error 1
make[1]: *** [drivers/regulator] Error 2
make: *** [drivers] Error 2

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-06 12:12:07 +00:00
Wenyou Yang d04b755273 regulator: act8865: register all regulators regardless of how many are used
As Mark pointed out, the driver should register all regulators
regardless of how many are used in the system in order to aid diagnostics.

But in the previous patch, only register the regulators that are used.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-31 13:05:55 +00:00
Fabio Estevam 477b2bacb1 regulator: wm831x-dcdc: Remove unneeded 'err' label
There is no need to jump to the 'err' label.

Returnn the error directly instead.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-31 13:04:37 +00:00
Fabio Estevam 89705b9e35 regulator: anatop-regulator: Add MODULE_ALIAS()
Provide a MODULE_ALIAS() entry to the driver.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-31 13:03:52 +00:00
Wenyou Yang f1de2c2f27 regulator: act8865: fix incorrect devm_kzalloc for act8865
Which cause to allocate more needless memory.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-30 12:06:55 +00:00
Axel Lin 7da98aafa2 regulator: act8865: Remove set_suspend_[en|dis]able implementation
There is no suspend enable/disable settings mentioned in datasheet,
so just don't implement .set_suspend_[en|dis]able callbacks.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-30 12:01:33 +00:00
Axel Lin d5e17e2634 regulator: act8865: Remove unneeded regulator_unregister() calls
This is not required because current code use devm_regulator_register() to
register regulators.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-30 11:59:12 +00:00
Sachin Kamat 699b36973d regulator: s2mps11: Clean up redundant code
BUCK 3 and 4 share the same ramp delay. Hence make it a fall through
case instead of duplicating the code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-30 11:56:32 +00:00
Axel Lin b8903eb983 regulator: tps65910: Simplify setting enable_mask for regulators
BBCH_BBCHEN_MASK is equivalent to TPS65910_SUPPLY_STATE_ENABLED.
So all regulators have the same enable_mask setting.

BBCH_BBCHEN_MASK and BBCH_BBCHEN_SHIFT are not used now, remove them.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-30 11:48:43 +00:00
Wenyou Yang 33036f48d1 regulator: act8865: add PMIC act8865 driver
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-24 13:47:40 +00:00
Axel Lin 52f48bf33d regulator: max77693: Add missing .owner field in regulator_desc
Add missing .owner field in regulator_desc, which is used for refcounting.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-24 13:44:50 +00:00
Fabio Estevam 1eb72f0b98 regulator: pfuze100: Improve PFUZE100 entry text
Make PFUZE100 entry consistent with other Freescale PMIC entries, so that now
we can have:

	<*>   Freescale MC13783 regulator driver
	<*>   Freescale MC13892 regulator driver
	<*>   Freescale PFUZE100 regulator driver

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Robin Gong <yibin.gong@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-24 12:47:59 +00:00
Axel Lin 9f45a3dd93 regulator: max14577: Add module alias to support module auto-loading
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-23 11:58:37 +00:00
Markus Pargmann 03746dcbde regulator: tps65910: Add backup battery regulator
tps65910 has a backup battery charger with a configurable voltage. This
patch adds a regulator for the backup battery.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-21 14:49:19 +00:00
Fabio Estevam 9d9339d3a6 regulator: tps51632-regulator: Fix spelling
Fix the 'VOLATGE' spell error.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-21 14:19:33 +00:00
Axel Lin bc2571f4ba regulator: as3722: Don't set min_uV/uV_step/linear_min_sel for linear_ranges
These settings are not used when using linear_ranges and it makes the code
looks confusing. Thus remove them.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-20 18:31:42 +00:00
Krzysztof Kozlowski b0902bbeb7 regulator: max14577: Add regulator driver for Maxim 14577
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>
2013-12-18 19:23:28 +00:00
Mark Brown d1c8b1bd09 regulator/clk: Fix s2mps11 build
This patch fixes a build failure that appeared in v3.13-rc4 due to an
 RTC/MFD update merged via -mm.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQIcBAABAgAGBQJSr0jGAAoJELSic+t+oim9bWsP/26SiYoI/ulG76GyJQuPVuWj
 21fRM0TEZaSVxZf4lzZahdak9kDg5wDFX15ii9PnIPJ8m5Nz5lHKLaKMXUEY8saA
 9vUZBsZNVbyQ9i7uH1/3mPC1fA+3XqwXKPrp4roIv5kFYCRFD+NDyBoCwl/FNvTE
 u72A9nmojJv6C0UuExFtyXRiJnAn2goXYQ0JvlFKrezv7yStNGNXakIH1za1gEOq
 hdMIkJ9r5/jZFIGKr7SHZjsGYqwngKfVfaSdBeWZqp6Z0FHf7MRI6aJ/TcwpkLFH
 HNezPznw1/CzAHmHAyszbcIMIh/GHxJzDldUr4g+kwForjJGaYIcrimxFPtcmW9P
 MhJ5DdO765aqp24cImo1aNJXMnJYTFDguMWSCWLwxNSmlpQYg2iEiKF2astcCb+p
 3v4cj9EYnEiPdKwSmA/kCb7fiEnefHm8vLMgRZwXIXiDfDSub4JPya+L4SxHFMAZ
 OxZyk/ZGPNkDAsyKUx3KQMw4Gmvbro/TJMLn73CgdrW++39/CbSzl5hM8oRMpeMn
 LTvBQOViAODlODQDI9B1gOqd4c/9zE1wGgY64rE7MtzlhlcPNhXYjL/Cb7+JNZ49
 Mp6nxt/yH7rlFMdpIC0GgsgBP4ilh3GeLDZDi+AhnbD1773Yn/mCA4cohfpUug6j
 Yme3Jd3/zWHrUkUPjkfO
 =t/v5
 -----END PGP SIGNATURE-----

Merge tag 's2mps11-build' into regulator-s5m8767 since a following patch
depend on it.

regulator/clk: Fix s2mps11 build

This patch fixes a build failure that appeared in v3.13-rc4 due to an
RTC/MFD update merged via -mm.
2013-12-18 17:24:41 +00:00
Krzysztof Kozlowski d13733f4a2 regulator: s5m8767: Do not use sec_reg* regmap helpers
Replace calls to sec_reg* helpers with direct usage of regmap API. The
sec_reg* helpers are error-prone as they mix u8 with unsigned int and
order of some of parameters (val and mask in sec_reg_update()).

Also the helpers do not give any way of useful abstraction as they just
call corresponding regmap function.

This patch replaces:
 - sec_reg_read() with regmap_read(),
 - sec_reg_write() with regmap_write(),
 - sec_reg_update() with regmap_update_bits().

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-18 13:27:50 +00:00
Krzysztof Kozlowski f37ff6b6ab regulator: s5m8767: Add symbols for hard-coded DVS_RAMP register
Add symbols for hard-coded values of BUCK_RAMP field in DVS_RAMP
register. This simplifies a little the code as register update is called
only once.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-18 13:27:40 +00:00
Hans de Goede 0781719bd6 regulator: core: don't print an error when no regulator is found
Only print an error when _regulator_get() is expected to return a valid
regulator, that is when _regulator_get() is called from regulator_get() and
we're not using the dummy because we don't have full-constraints, or when
_regulator_get() is called from regulator_get_exclusive() in which case
returning a dummy is not allowed.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-17 22:59:15 +00:00
Krzysztof Kozlowski 1b1ccee1e8 mfd: s2mps11: Fix build after regmap field rename in sec-core.c
Fix building of s2mps11 regulator and clock drivers after renaming
regmap field in struct sec_pmic_dev in commit:
 - "mfd/rtc: s5m: Fix register updating by adding regmap for RTC"

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-16 11:30:39 +00:00
Linus Torvalds ca3367518b regulator: Fixes for v3.13
A small set of driver fixes plus one larger core change which changes
 the way we check to see if we're using DT so that there aren't any races
 between deciding we're using DT and the regulator subsystem noticing.
 This makes the new support for substituting a dummy regulator and
 optional regulators work a lot better on DT systems since it ensures
 that we don't trigger probe deferral when we shouldn't which was causing
 bugs in clients.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQIcBAABAgAGBQJSqxI9AAoJELSic+t+oim9nuMQAJd2MqTivDav+1dAJgWT7chT
 GUb61Ks3HjmsRz/76YV+CQBO7puFxR9100U/keb3Xmg8oHJSVP6xCroA5JILqhwZ
 6rDsRXOKgbqlVruundkceWZJHQEbszUpdbnU8GXiNyNI8EiVoVZCgXSnPM2wyD6o
 EdxjqaXi/GUodaGFBfMyMpj387QwWgCi+DocUf622fTUHLEOKjjjndsKssTW2jyf
 NrRQiTnQ6Yecf8lI2rHN5C6p8MyJ8IF3i2d4pi1eBAfWF0OfeYRrm694IrbZ8Idl
 vAH4BxMf111JC7apuOTHNUSpL1DV4mjYQEeXUvd3wfnWEMRkFaEgwmTRmZZAfl/i
 KM+5Yob1IdStfNwayKAVsPbIqYeyV0zDkN4CteY5XtWYLUqKJon6wuSGzYRABID2
 uRa82dlSWMaX89+nHPCf22F7op8qRPLgr11yg7Nvo5qB+0Snij341libjrJGY09y
 wFx6fdxL4OMkyRpwyB6tkWyAjUPbMJDAvrOnA2x7nU+AS1ytGAJeJMUpzYhUEly/
 31kVJBi+mPRRmBsG+Fe9ALp+4k/UpMajCYWXa4/q+Bs7r3FCzWU98NeRxMurUKfO
 cco6diDSLTVaQKHcUqPW0g0BWGrggro4H5CHe5MBBi2mHK3IMuqnSYjTDiJpEh7I
 Tlad7Or4kd41FCk3Wpfi
 =WqDN
 -----END PGP SIGNATURE-----

Merge tag 'regulator-v3.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fixes from Mark Brown:
 "A small set of driver fixes plus one larger core change which changes
  the way we check to see if we're using DT so that there aren't any
  races between deciding we're using DT and the regulator subsystem
  noticing.

  This makes the new support for substituting a dummy regulator and
  optional regulators work a lot better on DT systems since it ensures
  that we don't trigger probe deferral when we shouldn't which was
  causing bugs in clients"

* tag 'regulator-v3.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: pfuze100: allow misprogrammed ID
  regulator: pfuze100: Fix address of FABID
  regulator: as3722: set the correct current limit
  regulator: core: Check for DT every time we check full constraints
  regulator: core: Replace checks of have_full_constraints with a function
2013-12-13 11:39:54 -08:00
Mark Brown 334a82086d Merge remote-tracking branch 'regulator/topic/constraints' into regulator-linus 2013-12-13 13:44:57 +00:00
Krzysztof Kozlowski 3e1e4a5f3a mfd/rtc: s5m: fix register updating by adding regmap for RTC
Rename old regmap field of "struct sec_pmic_dev" to "regmap_pmic" and
add new regmap for RTC.

On S5M8767A registers were not properly updated and read due to usage of
the same regmap as the PMIC.  This could be observed in various hangs,
e.g.  in infinite loop during waiting for UDR field change.

On this chip family the RTC has different I2C address than PMIC so
additional regmap is needed.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Mark Brown <broonie@linaro.org>
Acked-by: Sangbeom Kim <sbkim73@samsung.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-12-12 18:19:26 -08:00