From dfeccb12b4614befc49a92eb121c2211294ca669 Mon Sep 17 00:00:00 2001 From: Chanwoo Choi Date: Sat, 5 May 2012 06:26:47 -0700 Subject: 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 Signed-off-by: Donggeun Kim Signed-off-by: Kyungmin Park Signed-off-by: Anton Vorontsov --- Documentation/power/charger-manager.txt | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/power/charger-manager.txt b/Documentation/power/charger-manager.txt index 9b3863386e5..b4f7f4b23f6 100644 --- a/Documentation/power/charger-manager.txt +++ b/Documentation/power/charger-manager.txt @@ -50,6 +50,10 @@ Charger Manager supports the following: restarts charging. This check is also performed while suspended by setting wakeup time accordingly and using suspend_again. +* Support for uevent-notify + With the charger-related events, the device sends + notification to users with UEVENT. + 2. Global Charger-Manager Data related with suspend_again ======================================================== In order to setup Charger Manager with suspend-again feature @@ -174,7 +178,17 @@ bool measure_battery_temp; the value of measure_battery_temp. }; -5. Other Considerations +5. Notify Charger-Manager of charger events: cm_notify_event() +========================================================= +If there is an charger event is required to notify +Charger Manager, a charger device driver that triggers the event can call +cm_notify_event(psy, type, msg) to notify the corresponding Charger Manager. +In the function, psy is the charger driver's power_supply pointer, which is +associated with Charger-Manager. The parameter "type" +is the same as irq's type (enum cm_event_types). The event message "msg" is +optional and is effective only if the event type is "UNDESCRIBED" or "OTHERS". + +6. Other Considerations ======================= At the charger/battery-related events such as battery-pulled-out, -- cgit v1.2.3