regulator: core: Provide hints to the core about optional supplies
authorMark Brown <broonie@linaro.org>
Mon, 29 Jul 2013 20:42:42 +0000 (21:42 +0100)
committerMark Brown <broonie@linaro.org>
Wed, 31 Jul 2013 08:56:39 +0000 (09:56 +0100)
commitde1dd9fd2156874b45803299b3b27e65d5defdd9
tree031b04b662f93f38aab24fc4273376e07558327e
parent4bdfb2729c3a396fe7400c9332c49aee2b971bd8
regulator: core: Provide hints to the core about optional supplies

While the majority of supplies on devices are mandatory and can't be
physically omitted for electrical reasons some devices do have optional
supplies and need to know if they are missing, MMC being the most common
of these.

Currently the core accurately reports all errors when regulators are
requested since it does not know if the supply is one that must be provided
even if by a regulator software does not know about or if it is one that
may genuinely be disconnected. In order to allow this behaviour to be
changed and stub regulators to be provided in the former case add a new
regulator request function regulator_get_optional() which provides a hint
to the core that the regulator may genuinely not be connected.

Currently the implementation is identical to the current behaviour, future
patches will add support in the core for returning stub regulators in the
case where normal regulator_get() fails and the board has requested it.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Chris Ball <cjb@laptop.org>
drivers/regulator/core.c
include/linux/regulator/consumer.h
This page took 0.025804 seconds and 5 git commands to generate.