diff options
author | Chanwoo Choi <cw00.choi@samsung.com> | 2012-05-05 09:26:47 -0400 |
---|---|---|
committer | Anton Vorontsov <anton.vorontsov@linaro.org> | 2012-05-05 22:51:58 -0400 |
commit | dfeccb12b4614befc49a92eb121c2211294ca669 (patch) | |
tree | 90098ac099d9915af3e941a4d6012507dc10a8df /Documentation/power | |
parent | d829dc75bafb10754f35fb8895e5143d20267b04 (diff) |
charger-manager: Provide cm_notify_event function for in-kernel use
By using cm_notify_event function, charger driver can report several
charger events (e.g. battery full and external power in/out, etc) to
Charger-Manager. Charger-Manager can properly and immediately control
chargers by the reported event.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Donggeun Kim <dg77.kim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Diffstat (limited to 'Documentation/power')
-rw-r--r-- | Documentation/power/charger-manager.txt | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/Documentation/power/charger-manager.txt b/Documentation/power/charger-manager.txt index 9b3863386e54..b4f7f4b23f64 100644 --- a/Documentation/power/charger-manager.txt +++ b/Documentation/power/charger-manager.txt | |||
@@ -50,6 +50,10 @@ Charger Manager supports the following: | |||
50 | restarts charging. This check is also performed while suspended by | 50 | restarts charging. This check is also performed while suspended by |
51 | setting wakeup time accordingly and using suspend_again. | 51 | setting wakeup time accordingly and using suspend_again. |
52 | 52 | ||
53 | * Support for uevent-notify | ||
54 | With the charger-related events, the device sends | ||
55 | notification to users with UEVENT. | ||
56 | |||
53 | 2. Global Charger-Manager Data related with suspend_again | 57 | 2. Global Charger-Manager Data related with suspend_again |
54 | ======================================================== | 58 | ======================================================== |
55 | In order to setup Charger Manager with suspend-again feature | 59 | In order to setup Charger Manager with suspend-again feature |
@@ -174,7 +178,17 @@ bool measure_battery_temp; | |||
174 | the value of measure_battery_temp. | 178 | the value of measure_battery_temp. |
175 | }; | 179 | }; |
176 | 180 | ||
177 | 5. Other Considerations | 181 | 5. Notify Charger-Manager of charger events: cm_notify_event() |
182 | ========================================================= | ||
183 | If there is an charger event is required to notify | ||
184 | Charger Manager, a charger device driver that triggers the event can call | ||
185 | cm_notify_event(psy, type, msg) to notify the corresponding Charger Manager. | ||
186 | In the function, psy is the charger driver's power_supply pointer, which is | ||
187 | associated with Charger-Manager. The parameter "type" | ||
188 | is the same as irq's type (enum cm_event_types). The event message "msg" is | ||
189 | optional and is effective only if the event type is "UNDESCRIBED" or "OTHERS". | ||
190 | |||
191 | 6. Other Considerations | ||
178 | ======================= | 192 | ======================= |
179 | 193 | ||
180 | At the charger/battery-related events such as battery-pulled-out, | 194 | At the charger/battery-related events such as battery-pulled-out, |