Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: core: Add new notification for enabling of regulator

This is useful for devices, which need some time to start up, to help
the drivers track how long the supply has been up already. Ie whether
it can safely talk to the HW or needs to wait.

Signed-off-by: Harald Geyer <harald@ccbib.org>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Harald Geyer and committed by
Mark Brown
264b88c9 d00b7461

+3
+2
drivers/regulator/core.c
··· 2162 2162 if (ret < 0) 2163 2163 return ret; 2164 2164 2165 + _notifier_call_chain(rdev, REGULATOR_EVENT_ENABLE, 2166 + NULL); 2165 2167 } else if (ret < 0) { 2166 2168 rdev_err(rdev, "is_enabled() failed: %d\n", ret); 2167 2169 return ret;
+1
include/linux/regulator/consumer.h
··· 119 119 #define REGULATOR_EVENT_ABORT_VOLTAGE_CHANGE 0x200 120 120 #define REGULATOR_EVENT_PRE_DISABLE 0x400 121 121 #define REGULATOR_EVENT_ABORT_DISABLE 0x800 122 + #define REGULATOR_EVENT_ENABLE 0x1000 122 123 123 124 /* 124 125 * Regulator errors that can be queried using regulator_get_error_flags