diff options
-rw-r--r-- | drivers/regulator/core.c | 7 | ||||
-rw-r--r-- | include/linux/regulator/consumer.h | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index b60a4c9f8f16..6d2ce8a05331 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c | |||
@@ -1341,6 +1341,9 @@ static int _regulator_disable(struct regulator_dev *rdev) | |||
1341 | __func__, rdev_get_name(rdev)); | 1341 | __func__, rdev_get_name(rdev)); |
1342 | return ret; | 1342 | return ret; |
1343 | } | 1343 | } |
1344 | |||
1345 | _notifier_call_chain(rdev, REGULATOR_EVENT_DISABLE, | ||
1346 | NULL); | ||
1344 | } | 1347 | } |
1345 | 1348 | ||
1346 | /* decrease our supplies ref count and disable if required */ | 1349 | /* decrease our supplies ref count and disable if required */ |
@@ -1399,8 +1402,8 @@ static int _regulator_force_disable(struct regulator_dev *rdev) | |||
1399 | return ret; | 1402 | return ret; |
1400 | } | 1403 | } |
1401 | /* notify other consumers that power has been forced off */ | 1404 | /* notify other consumers that power has been forced off */ |
1402 | _notifier_call_chain(rdev, REGULATOR_EVENT_FORCE_DISABLE, | 1405 | _notifier_call_chain(rdev, REGULATOR_EVENT_FORCE_DISABLE | |
1403 | NULL); | 1406 | REGULATOR_EVENT_DISABLE, NULL); |
1404 | } | 1407 | } |
1405 | 1408 | ||
1406 | /* decrease our supplies ref count and disable if required */ | 1409 | /* decrease our supplies ref count and disable if required */ |
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index 030d92255c7a..28c9fd020d39 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h | |||
@@ -89,8 +89,9 @@ | |||
89 | * REGULATION_OUT Regulator output is out of regulation. | 89 | * REGULATION_OUT Regulator output is out of regulation. |
90 | * FAIL Regulator output has failed. | 90 | * FAIL Regulator output has failed. |
91 | * OVER_TEMP Regulator over temp. | 91 | * OVER_TEMP Regulator over temp. |
92 | * FORCE_DISABLE Regulator shut down by software. | 92 | * FORCE_DISABLE Regulator forcibly shut down by software. |
93 | * VOLTAGE_CHANGE Regulator voltage changed. | 93 | * VOLTAGE_CHANGE Regulator voltage changed. |
94 | * DISABLE Regulator was disabled. | ||
94 | * | 95 | * |
95 | * NOTE: These events can be OR'ed together when passed into handler. | 96 | * NOTE: These events can be OR'ed together when passed into handler. |
96 | */ | 97 | */ |
@@ -102,6 +103,7 @@ | |||
102 | #define REGULATOR_EVENT_OVER_TEMP 0x10 | 103 | #define REGULATOR_EVENT_OVER_TEMP 0x10 |
103 | #define REGULATOR_EVENT_FORCE_DISABLE 0x20 | 104 | #define REGULATOR_EVENT_FORCE_DISABLE 0x20 |
104 | #define REGULATOR_EVENT_VOLTAGE_CHANGE 0x40 | 105 | #define REGULATOR_EVENT_VOLTAGE_CHANGE 0x40 |
106 | #define REGULATOR_EVENT_DISABLE 0x80 | ||
105 | 107 | ||
106 | struct regulator; | 108 | struct regulator; |
107 | 109 | ||