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