regulator: Handle regulators without suspend mode configuration
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 22 Oct 2009 15:31:33 +0000 (16:31 +0100)
committerLiam Girdwood <lrg@slimlogic.co.uk>
Thu, 17 Dec 2009 10:27:25 +0000 (10:27 +0000)
commit638f85c54f4fed0f8f1fbc23745a8f334112e892
tree6d54bc8861cba1f74213e52df74815cf72246897
parent1083c39346d482b9001944d05c09191027892226
regulator: Handle regulators without suspend mode configuration

Since some regulators in the system may not support suspend mode
configuration we need to allow some regulators to have a missing
suspend mode configuration. Do this by requiring that disabled
regulators are explicitly flagged and then skip over regulators
that have no state specified.

Try to avoid surprises by warning the if we could set the state
but no configuration is provided.  This also ensures that an all
zeros configuration generates a warning rather than silently
disabling the regulator.

Reported-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
drivers/regulator/core.c
include/linux/regulator/machine.h