aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-31 15:10:15 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-31 15:10:15 -0400
commit76f901eb4659779ecacd0e4eba49f55442daef53 (patch)
tree0761f03211ffdfc06216eabeb61b02ef6d598d3c /Documentation
parentbd0e162d0312aa95e8b85ba883efddebf27be121 (diff)
parent96facd23e45e6d5020be135c8ab392ba9e044fa4 (diff)
Merge tag 'for-v3.5' of git://git.infradead.org/battery-2.6
Pull battery updates from Anton Vorontsov: "A bunch of fixes for v3.5, nothing extraordinary." * tag 'for-v3.5' of git://git.infradead.org/battery-2.6: (27 commits) smb347-charger: Include missing <linux/err.h> smb347-charger: Clean up battery attributes max17042_battery: Add support for max17047/50 chip sbs-battery.c: Capacity attr = remaining relative capacity isp1704_charger: Use after free on probe error ds2781_battery: Use DS2781_PARAM_EEPROM_SIZE and DS2781_USER_EEPROM_SIZE power_supply: Fix a typo in BATTERY_DS2781 Kconfig entry charger-manager: Provide cm_notify_event function for in-kernel use charger-manager: Poll battery health in normal state smb347-charger: Convert to regmap API smb347-charger: Move IRQ enabling to the end of probe smb347-charger: Rename few functions to match better what they are doing smb347-charger: Convert to use module_i2c_driver() smb347_charger: Cleanup power supply registration code in probe ab8500: Clean up probe routines ab8500_fg: Harden platform data check ab8500_btemp: Harden platform data check ab8500_charger: Harden platform data check MAINTAINERS: Fix 'F' entry for the power supply class max17042_battery: Handle irq request failure case ...
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/power/charger-manager.txt41
-rw-r--r--Documentation/power/power_supply_class.txt2
2 files changed, 41 insertions, 2 deletions
diff --git a/Documentation/power/charger-manager.txt b/Documentation/power/charger-manager.txt
index fdcca991df30..b4f7f4b23f64 100644
--- a/Documentation/power/charger-manager.txt
+++ b/Documentation/power/charger-manager.txt
@@ -44,6 +44,16 @@ Charger Manager supports the following:
44 Normally, the platform will need to resume and suspend some devices 44 Normally, the platform will need to resume and suspend some devices
45 that are used by Charger Manager. 45 that are used by Charger Manager.
46 46
47* Support for premature full-battery event handling
48 If the battery voltage drops by "fullbatt_vchkdrop_uV" after
49 "fullbatt_vchkdrop_ms" from the full-battery event, the framework
50 restarts charging. This check is also performed while suspended by
51 setting wakeup time accordingly and using suspend_again.
52
53* Support for uevent-notify
54 With the charger-related events, the device sends
55 notification to users with UEVENT.
56
472. Global Charger-Manager Data related with suspend_again 572. Global Charger-Manager Data related with suspend_again
48======================================================== 58========================================================
49In order to setup Charger Manager with suspend-again feature 59In order to setup Charger Manager with suspend-again feature
@@ -55,7 +65,7 @@ if there are multiple batteries. If there are multiple batteries, the
55multiple instances of Charger Manager share the same charger_global_desc 65multiple instances of Charger Manager share the same charger_global_desc
56and it will manage in-suspend monitoring for all instances of Charger Manager. 66and it will manage in-suspend monitoring for all instances of Charger Manager.
57 67
58The user needs to provide all the two entries properly in order to activate 68The user needs to provide all the three entries properly in order to activate
59in-suspend monitoring: 69in-suspend monitoring:
60 70
61struct charger_global_desc { 71struct charger_global_desc {
@@ -74,6 +84,11 @@ bool (*rtc_only_wakeup)(void);
74 same struct. If there is any other wakeup source triggered the 84 same struct. If there is any other wakeup source triggered the
75 wakeup, it should return false. If the "rtc" is the only wakeup 85 wakeup, it should return false. If the "rtc" is the only wakeup
76 reason, it should return true. 86 reason, it should return true.
87
88bool assume_timer_stops_in_suspend;
89 : if true, Charger Manager assumes that
90 the timer (CM uses jiffies as timer) stops during suspend. Then, CM
91 assumes that the suspend-duration is same as the alarm length.
77}; 92};
78 93
793. How to setup suspend_again 943. How to setup suspend_again
@@ -111,6 +126,16 @@ enum polling_modes polling_mode;
111 CM_POLL_CHARGING_ONLY: poll this battery if and only if the 126 CM_POLL_CHARGING_ONLY: poll this battery if and only if the
112 battery is being charged. 127 battery is being charged.
113 128
129unsigned int fullbatt_vchkdrop_ms;
130unsigned int fullbatt_vchkdrop_uV;
131 : If both have non-zero values, Charger Manager will check the
132 battery voltage drop fullbatt_vchkdrop_ms after the battery is fully
133 charged. If the voltage drop is over fullbatt_vchkdrop_uV, Charger
134 Manager will try to recharge the battery by disabling and enabling
135 chargers. Recharge with voltage drop condition only (without delay
136 condition) is needed to be implemented with hardware interrupts from
137 fuel gauges or charger devices/chips.
138
114unsigned int fullbatt_uV; 139unsigned int fullbatt_uV;
115 : If specified with a non-zero value, Charger Manager assumes 140 : If specified with a non-zero value, Charger Manager assumes
116 that the battery is full (capacity = 100) if the battery is not being 141 that the battery is full (capacity = 100) if the battery is not being
@@ -122,6 +147,8 @@ unsigned int polling_interval_ms;
122 this battery every polling_interval_ms or more frequently. 147 this battery every polling_interval_ms or more frequently.
123 148
124enum data_source battery_present; 149enum data_source battery_present;
150 : CM_BATTERY_PRESENT: assume that the battery exists.
151 CM_NO_BATTERY: assume that the battery does not exists.
125 CM_FUEL_GAUGE: get battery presence information from fuel gauge. 152 CM_FUEL_GAUGE: get battery presence information from fuel gauge.
126 CM_CHARGER_STAT: get battery presence from chargers. 153 CM_CHARGER_STAT: get battery presence from chargers.
127 154
@@ -151,7 +178,17 @@ bool measure_battery_temp;
151 the value of measure_battery_temp. 178 the value of measure_battery_temp.
152}; 179};
153 180
1545. Other Considerations 1815. Notify Charger-Manager of charger events: cm_notify_event()
182=========================================================
183If there is an charger event is required to notify
184Charger Manager, a charger device driver that triggers the event can call
185cm_notify_event(psy, type, msg) to notify the corresponding Charger Manager.
186In the function, psy is the charger driver's power_supply pointer, which is
187associated with Charger-Manager. The parameter "type"
188is the same as irq's type (enum cm_event_types). The event message "msg" is
189optional and is effective only if the event type is "UNDESCRIBED" or "OTHERS".
190
1916. Other Considerations
155======================= 192=======================
156 193
157At the charger/battery-related events such as battery-pulled-out, 194At the charger/battery-related events such as battery-pulled-out,
diff --git a/Documentation/power/power_supply_class.txt b/Documentation/power/power_supply_class.txt
index 9f16c5178b66..211831d4095f 100644
--- a/Documentation/power/power_supply_class.txt
+++ b/Documentation/power/power_supply_class.txt
@@ -84,6 +84,8 @@ are already charged or discharging, 'n/a' can be displayed (or
84HEALTH - represents health of the battery, values corresponds to 84HEALTH - represents health of the battery, values corresponds to
85POWER_SUPPLY_HEALTH_*, defined in battery.h. 85POWER_SUPPLY_HEALTH_*, defined in battery.h.
86 86
87VOLTAGE_OCV - open circuit voltage of the battery.
88
87VOLTAGE_MAX_DESIGN, VOLTAGE_MIN_DESIGN - design values for maximal and 89VOLTAGE_MAX_DESIGN, VOLTAGE_MIN_DESIGN - design values for maximal and
88minimal power supply voltages. Maximal/minimal means values of voltages 90minimal power supply voltages. Maximal/minimal means values of voltages
89when battery considered "full"/"empty" at normal conditions. Yes, there is 91when battery considered "full"/"empty" at normal conditions. Yes, there is