regulator: core: Add REGULATOR_EVENT_PRE_VOLTAGE_CHANGE (and ABORT)
authorHeiko Stübner <heiko@sntech.de>
Thu, 28 Aug 2014 19:36:04 +0000 (12:36 -0700)
committer黄涛 <huangtao@rock-chips.com>
Wed, 29 Oct 2014 09:30:34 +0000 (17:30 +0800)
commit589e9d2dfa84f9de6c4ae2c3dff2a786d5e3b1b2
tree82916e83e63c0d79dbb097f6dbb1beea5d891d4a
parentfe3316aacf4967d38fce79640098e8b4b3c341aa
regulator: core: Add REGULATOR_EVENT_PRE_VOLTAGE_CHANGE (and ABORT)

In some cases we need to know when a regulator is about to be changed.
Add a way for clients to be notified.  Note that for set_voltage() we
don't necessarily know what voltage we'll end up with, so we tell the
client what the range will be so they can prepare.

Signed-off-by: Heiko Stübner <heiko@sntech.de>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Mark Brown <broonie+linaro@kernel.org>
(cherry picked from commit 7179569aeb52197fd2a9909ba226c4c9cc0e2e2a)
drivers/regulator/core.c
include/linux/regulator/consumer.h