power: supply: core: Add Standard, Adaptive, and Custom charge types
[sfrench/cifs-2.6.git] / Documentation / ABI / testing / sysfs-class-power
1 ===== General Properties =====
2
3 What:           /sys/class/power_supply/<supply_name>/manufacturer
4 Date:           May 2007
5 Contact:        linux-pm@vger.kernel.org
6 Description:
7                 Reports the name of the device manufacturer.
8
9                 Access: Read
10                 Valid values: Represented as string
11
12 What:           /sys/class/power_supply/<supply_name>/model_name
13 Date:           May 2007
14 Contact:        linux-pm@vger.kernel.org
15 Description:
16                 Reports the name of the device model.
17
18                 Access: Read
19                 Valid values: Represented as string
20
21 What:           /sys/class/power_supply/<supply_name>/serial_number
22 Date:           January 2008
23 Contact:        linux-pm@vger.kernel.org
24 Description:
25                 Reports the serial number of the device.
26
27                 Access: Read
28                 Valid values: Represented as string
29
30 What:           /sys/class/power_supply/<supply_name>/type
31 Date:           May 2010
32 Contact:        linux-pm@vger.kernel.org
33 Description:
34                 Describes the main type of the supply.
35
36                 Access: Read
37                 Valid values: "Battery", "UPS", "Mains", "USB"
38
39 ===== Battery Properties =====
40
41 What:           /sys/class/power_supply/<supply_name>/capacity
42 Date:           May 2007
43 Contact:        linux-pm@vger.kernel.org
44 Description:
45                 Fine grain representation of battery capacity.
46                 Access: Read
47                 Valid values: 0 - 100 (percent)
48
49 What:           /sys/class/power_supply/<supply_name>/capacity_alert_max
50 Date:           July 2012
51 Contact:        linux-pm@vger.kernel.org
52 Description:
53                 Maximum battery capacity trip-wire value where the supply will
54                 notify user-space of the event. This is normally used for the
55                 battery discharging scenario where user-space needs to know the
56                 battery has dropped to an upper level so it can take
57                 appropriate action (e.g. warning user that battery level is
58                 low).
59
60                 Access: Read, Write
61                 Valid values: 0 - 100 (percent)
62
63 What:           /sys/class/power_supply/<supply_name>/capacity_alert_min
64 Date:           July 2012
65 Contact:        linux-pm@vger.kernel.org
66 Description:
67                 Minimum battery capacity trip-wire value where the supply will
68                 notify user-space of the event. This is normally used for the
69                 battery discharging scenario where user-space needs to know the
70                 battery has dropped to a lower level so it can take
71                 appropriate action (e.g. warning user that battery level is
72                 critically low).
73
74                 Access: Read, Write
75                 Valid values: 0 - 100 (percent)
76
77 What:           /sys/class/power_supply/<supply_name>/capacity_level
78 Date:           June 2009
79 Contact:        linux-pm@vger.kernel.org
80 Description:
81                 Coarse representation of battery capacity.
82
83                 Access: Read
84                 Valid values: "Unknown", "Critical", "Low", "Normal", "High",
85                               "Full"
86
87 What:           /sys/class/power_supply/<supply_name>/current_avg
88 Date:           May 2007
89 Contact:        linux-pm@vger.kernel.org
90 Description:
91                 Reports an average IBAT current reading for the battery, over a
92                 fixed period. Normally devices will provide a fixed interval in
93                 which they average readings to smooth out the reported value.
94
95                 Access: Read
96                 Valid values: Represented in microamps
97
98 What:           /sys/class/power_supply/<supply_name>/current_max
99 Date:           October 2010
100 Contact:        linux-pm@vger.kernel.org
101 Description:
102                 Reports the maximum IBAT current allowed into the battery.
103
104                 Access: Read
105                 Valid values: Represented in microamps
106
107 What:           /sys/class/power_supply/<supply_name>/current_now
108 Date:           May 2007
109 Contact:        linux-pm@vger.kernel.org
110 Description:
111                 Reports an instant, single IBAT current reading for the battery.
112                 This value is not averaged/smoothed.
113
114                 Access: Read
115                 Valid values: Represented in microamps
116
117 What:           /sys/class/power_supply/<supply_name>/charge_type
118 Date:           July 2009
119 Contact:        linux-pm@vger.kernel.org
120 Description:
121                 Represents the type of charging currently being applied to the
122                 battery. "Trickle", "Fast", and "Standard" all mean different
123                 charging speeds. "Adaptive" means that the charger uses some
124                 algorithm to adjust the charge rate dynamically, without
125                 any user configuration required. "Custom" means that the charger
126                 uses the charge_control_* properties as configuration for some
127                 different algorithm.
128
129                 Access: Read, Write
130                 Valid values: "Unknown", "N/A", "Trickle", "Fast", "Standard",
131                               "Adaptive", "Custom"
132
133 What:           /sys/class/power_supply/<supply_name>/charge_term_current
134 Date:           July 2014
135 Contact:        linux-pm@vger.kernel.org
136 Description:
137                 Reports the charging current value which is used to determine
138                 when the battery is considered full and charging should end.
139
140                 Access: Read
141                 Valid values: Represented in microamps
142
143 What:           /sys/class/power_supply/<supply_name>/health
144 Date:           May 2007
145 Contact:        linux-pm@vger.kernel.org
146 Description:
147                 Reports the health of the battery or battery side of charger
148                 functionality.
149
150                 Access: Read
151                 Valid values: "Unknown", "Good", "Overheat", "Dead",
152                               "Over voltage", "Unspecified failure", "Cold",
153                               "Watchdog timer expire", "Safety timer expire"
154
155 What:           /sys/class/power_supply/<supply_name>/precharge_current
156 Date:           June 2017
157 Contact:        linux-pm@vger.kernel.org
158 Description:
159                 Reports the charging current applied during pre-charging phase
160                 for a battery charge cycle.
161
162                 Access: Read
163                 Valid values: Represented in microamps
164
165 What:           /sys/class/power_supply/<supply_name>/present
166 Date:           May 2007
167 Contact:        linux-pm@vger.kernel.org
168 Description:
169                 Reports whether a battery is present or not in the system.
170
171                 Access: Read
172                 Valid values:
173                         0: Absent
174                         1: Present
175
176 What:           /sys/class/power_supply/<supply_name>/status
177 Date:           May 2007
178 Contact:        linux-pm@vger.kernel.org
179 Description:
180                 Represents the charging status of the battery. Normally this
181                 is read-only reporting although for some supplies this can be
182                 used to enable/disable charging to the battery.
183
184                 Access: Read, Write
185                 Valid values: "Unknown", "Charging", "Discharging",
186                               "Not charging", "Full"
187
188 What:           /sys/class/power_supply/<supply_name>/technology
189 Date:           May 2007
190 Contact:        linux-pm@vger.kernel.org
191 Description:
192                 Describes the battery technology supported by the supply.
193
194                 Access: Read
195                 Valid values: "Unknown", "NiMH", "Li-ion", "Li-poly", "LiFe",
196                               "NiCd", "LiMn"
197
198 What:           /sys/class/power_supply/<supply_name>/temp
199 Date:           May 2007
200 Contact:        linux-pm@vger.kernel.org
201 Description:
202                 Reports the current TBAT battery temperature reading.
203
204                 Access: Read
205                 Valid values: Represented in 1/10 Degrees Celsius
206
207 What:           /sys/class/power_supply/<supply_name>/temp_alert_max
208 Date:           July 2012
209 Contact:        linux-pm@vger.kernel.org
210 Description:
211                 Maximum TBAT temperature trip-wire value where the supply will
212                 notify user-space of the event. This is normally used for the
213                 battery charging scenario where user-space needs to know the
214                 battery temperature has crossed an upper threshold so it can
215                 take appropriate action (e.g. warning user that battery level is
216                 critically high, and charging has stopped).
217
218                 Access: Read
219                 Valid values: Represented in 1/10 Degrees Celsius
220
221 What:           /sys/class/power_supply/<supply_name>/temp_alert_min
222 Date:           July 2012
223 Contact:        linux-pm@vger.kernel.org
224 Description:
225                 Minimum TBAT temperature trip-wire value where the supply will
226                 notify user-space of the event. This is normally used for the
227                 battery charging scenario where user-space needs to know the
228                 battery temperature has crossed a lower threshold so it can take
229                 appropriate action (e.g. warning user that battery level is
230                 high, and charging current has been reduced accordingly to
231                 remedy the situation).
232
233                 Access: Read
234                 Valid values: Represented in 1/10 Degrees Celsius
235
236 What:           /sys/class/power_supply/<supply_name>/temp_max
237 Date:           July 2014
238 Contact:        linux-pm@vger.kernel.org
239 Description:
240                 Reports the maximum allowed TBAT battery temperature for
241                 charging.
242
243                 Access: Read
244                 Valid values: Represented in 1/10 Degrees Celsius
245
246 What:           /sys/class/power_supply/<supply_name>/temp_min
247 Date:           July 2014
248 Contact:        linux-pm@vger.kernel.org
249 Description:
250                 Reports the minimum allowed TBAT battery temperature for
251                 charging.
252
253                 Access: Read
254                 Valid values: Represented in 1/10 Degrees Celsius
255
256 What:           /sys/class/power_supply/<supply_name>/voltage_avg,
257 Date:           May 2007
258 Contact:        linux-pm@vger.kernel.org
259 Description:
260                 Reports an average VBAT voltage reading for the battery, over a
261                 fixed period. Normally devices will provide a fixed interval in
262                 which they average readings to smooth out the reported value.
263
264                 Access: Read
265                 Valid values: Represented in microvolts
266
267 What:           /sys/class/power_supply/<supply_name>/voltage_max,
268 Date:           January 2008
269 Contact:        linux-pm@vger.kernel.org
270 Description:
271                 Reports the maximum safe VBAT voltage permitted for the battery,
272                 during charging.
273
274                 Access: Read
275                 Valid values: Represented in microvolts
276
277 What:           /sys/class/power_supply/<supply_name>/voltage_min,
278 Date:           January 2008
279 Contact:        linux-pm@vger.kernel.org
280 Description:
281                 Reports the minimum safe VBAT voltage permitted for the battery,
282                 during discharging.
283
284                 Access: Read
285                 Valid values: Represented in microvolts
286
287 What:           /sys/class/power_supply/<supply_name>/voltage_now,
288 Date:           May 2007
289 Contact:        linux-pm@vger.kernel.org
290 Description:
291                 Reports an instant, single VBAT voltage reading for the battery.
292                 This value is not averaged/smoothed.
293
294                 Access: Read
295                 Valid values: Represented in microvolts
296
297 ===== USB Properties =====
298
299 What:           /sys/class/power_supply/<supply_name>/current_avg
300 Date:           May 2007
301 Contact:        linux-pm@vger.kernel.org
302 Description:
303                 Reports an average IBUS current reading over a fixed period.
304                 Normally devices will provide a fixed interval in which they
305                 average readings to smooth out the reported value.
306
307                 Access: Read
308                 Valid values: Represented in microamps
309
310
311 What:           /sys/class/power_supply/<supply_name>/current_max
312 Date:           October 2010
313 Contact:        linux-pm@vger.kernel.org
314 Description:
315                 Reports the maximum IBUS current the supply can support.
316
317                 Access: Read
318                 Valid values: Represented in microamps
319
320 What:           /sys/class/power_supply/<supply_name>/current_now
321 Date:           May 2007
322 Contact:        linux-pm@vger.kernel.org
323 Description:
324                 Reports the IBUS current supplied now. This value is generally
325                 read-only reporting, unless the 'online' state of the supply
326                 is set to be programmable, in which case this value can be set
327                 within the reported min/max range.
328
329                 Access: Read, Write
330                 Valid values: Represented in microamps
331
332 What:           /sys/class/power_supply/<supply_name>/input_current_limit
333 Date:           July 2014
334 Contact:        linux-pm@vger.kernel.org
335 Description:
336                 Details the incoming IBUS current limit currently set in the
337                 supply. Normally this is configured based on the type of
338                 connection made (e.g. A configured SDP should output a maximum
339                 of 500mA so the input current limit is set to the same value).
340
341                 Access: Read, Write
342                 Valid values: Represented in microamps
343
344 What:           /sys/class/power_supply/<supply_name>/online,
345 Date:           May 2007
346 Contact:        linux-pm@vger.kernel.org
347 Description:
348                 Indicates if VBUS is present for the supply. When the supply is
349                 online, and the supply allows it, then it's possible to switch
350                 between online states (e.g. Fixed -> Programmable for a PD_PPS
351                 USB supply so voltage and current can be controlled).
352
353                 Access: Read, Write
354                 Valid values:
355                         0: Offline
356                         1: Online Fixed - Fixed Voltage Supply
357                         2: Online Programmable - Programmable Voltage Supply
358
359 What:           /sys/class/power_supply/<supply_name>/temp
360 Date:           May 2007
361 Contact:        linux-pm@vger.kernel.org
362 Description:
363                 Reports the current supply temperature reading. This would
364                 normally be the internal temperature of the device itself (e.g
365                 TJUNC temperature of an IC)
366
367                 Access: Read
368                 Valid values: Represented in 1/10 Degrees Celsius
369
370 What:           /sys/class/power_supply/<supply_name>/temp_alert_max
371 Date:           July 2012
372 Contact:        linux-pm@vger.kernel.org
373 Description:
374                 Maximum supply temperature trip-wire value where the supply will
375                 notify user-space of the event. This is normally used for the
376                 charging scenario where user-space needs to know the supply
377                 temperature has crossed an upper threshold so it can take
378                 appropriate action (e.g. warning user that the supply
379                 temperature is critically high, and charging has stopped to
380                 remedy the situation).
381
382                 Access: Read
383                 Valid values: Represented in 1/10 Degrees Celsius
384
385 What:           /sys/class/power_supply/<supply_name>/temp_alert_min
386 Date:           July 2012
387 Contact:        linux-pm@vger.kernel.org
388 Description:
389                 Minimum supply temperature trip-wire value where the supply will
390                 notify user-space of the event. This is normally used for the
391                 charging scenario where user-space needs to know the supply
392                 temperature has crossed a lower threshold so it can take
393                 appropriate action (e.g. warning user that the supply
394                 temperature is high, and charging current has been reduced
395                 accordingly to remedy the situation).
396
397                 Access: Read
398                 Valid values: Represented in 1/10 Degrees Celsius
399
400 What:           /sys/class/power_supply/<supply_name>/temp_max
401 Date:           July 2014
402 Contact:        linux-pm@vger.kernel.org
403 Description:
404                 Reports the maximum allowed supply temperature for operation.
405
406                 Access: Read
407                 Valid values: Represented in 1/10 Degrees Celsius
408
409 What:           /sys/class/power_supply/<supply_name>/temp_min
410 Date:           July 2014
411 Contact:        linux-pm@vger.kernel.org
412 Description:
413                 Reports the mainimum allowed supply temperature for operation.
414
415                 Access: Read
416                 Valid values: Represented in 1/10 Degrees Celsius
417
418 What:           /sys/class/power_supply/<supply_name>/usb_type
419 Date:           March 2018
420 Contact:        linux-pm@vger.kernel.org
421 Description:
422                 Reports what type of USB connection is currently active for
423                 the supply, for example it can show if USB-PD capable source
424                 is attached.
425
426                 Access: Read-Only
427                 Valid values: "Unknown", "SDP", "DCP", "CDP", "ACA", "C", "PD",
428                               "PD_DRP", "PD_PPS", "BrickID"
429
430 What:           /sys/class/power_supply/<supply_name>/voltage_max
431 Date:           January 2008
432 Contact:        linux-pm@vger.kernel.org
433 Description:
434                 Reports the maximum VBUS voltage the supply can support.
435
436                 Access: Read
437                 Valid values: Represented in microvolts
438
439 What:           /sys/class/power_supply/<supply_name>/voltage_min
440 Date:           January 2008
441 Contact:        linux-pm@vger.kernel.org
442 Description:
443                 Reports the minimum VBUS voltage the supply can support.
444
445                 Access: Read
446                 Valid values: Represented in microvolts
447
448 What:           /sys/class/power_supply/<supply_name>/voltage_now
449 Date:           May 2007
450 Contact:        linux-pm@vger.kernel.org
451 Description:
452                 Reports the VBUS voltage supplied now. This value is generally
453                 read-only reporting, unless the 'online' state of the supply
454                 is set to be programmable, in which case this value can be set
455                 within the reported min/max range.
456
457                 Access: Read, Write
458                 Valid values: Represented in microvolts
459
460 ===== Device Specific Properties =====
461
462 What:           /sys/class/power/ds2760-battery.*/charge_now
463 Date:           May 2010
464 KernelVersion:  2.6.35
465 Contact:        Daniel Mack <daniel@caiaq.de>
466 Description:
467                 This file is writeable and can be used to set the current
468                 coloumb counter value inside the battery monitor chip. This
469                 is needed for unavoidable corrections of aging batteries.
470                 A userspace daemon can monitor the battery charging logic
471                 and once the counter drops out of considerable bounds, take
472                 appropriate action.
473
474 What:           /sys/class/power/ds2760-battery.*/charge_full
475 Date:           May 2010
476 KernelVersion:  2.6.35
477 Contact:        Daniel Mack <daniel@caiaq.de>
478 Description:
479                 This file is writeable and can be used to set the assumed
480                 battery 'full level'. As batteries age, this value has to be
481                 amended over time.
482
483 What:           /sys/class/power_supply/max14577-charger/device/fast_charge_timer
484 Date:           October 2014
485 KernelVersion:  3.18.0
486 Contact:        Krzysztof Kozlowski <krzk@kernel.org>
487 Description:
488                 This entry shows and sets the maximum time the max14577
489                 charger operates in fast-charge mode. When the timer expires
490                 the device will terminate fast-charge mode (charging current
491                 will drop to 0 A) and will trigger interrupt.
492
493                 Valid values:
494                 - 5, 6 or 7 (hours),
495                 - 0: disabled.
496
497 What:           /sys/class/power_supply/max77693-charger/device/fast_charge_timer
498 Date:           January 2015
499 KernelVersion:  3.19.0
500 Contact:        Krzysztof Kozlowski <krzk@kernel.org>
501 Description:
502                 This entry shows and sets the maximum time the max77693
503                 charger operates in fast-charge mode. When the timer expires
504                 the device will terminate fast-charge mode (charging current
505                 will drop to 0 A) and will trigger interrupt.
506
507                 Valid values:
508                 - 4 - 16 (hours), step by 2 (rounded down)
509                 - 0: disabled.
510
511 What:           /sys/class/power_supply/max77693-charger/device/top_off_threshold_current
512 Date:           January 2015
513 KernelVersion:  3.19.0
514 Contact:        Krzysztof Kozlowski <krzk@kernel.org>
515 Description:
516                 This entry shows and sets the charging current threshold for
517                 entering top-off charging mode. When charging current in fast
518                 charge mode drops below this value, the charger will trigger
519                 interrupt and start top-off charging mode.
520
521                 Valid values:
522                 - 100000 - 200000 (microamps), step by 25000 (rounded down)
523                 - 200000 - 350000 (microamps), step by 50000 (rounded down)
524                 - 0: disabled.
525
526 What:           /sys/class/power_supply/max77693-charger/device/top_off_timer
527 Date:           January 2015
528 KernelVersion:  3.19.0
529 Contact:        Krzysztof Kozlowski <krzk@kernel.org>
530 Description:
531                 This entry shows and sets the maximum time the max77693
532                 charger operates in top-off charge mode. When the timer expires
533                 the device will terminate top-off charge mode (charging current
534                 will drop to 0 A) and will trigger interrupt.
535
536                 Valid values:
537                 - 0 - 70 (minutes), step by 10 (rounded down)
538
539 What:           /sys/class/power_supply/bq24257-charger/ovp_voltage
540 Date:           October 2015
541 KernelVersion:  4.4.0
542 Contact:        Andreas Dannenberg <dannenberg@ti.com>
543 Description:
544                 This entry configures the overvoltage protection feature of bq24257-
545                 type charger devices. This feature protects the device and other
546                 components against damage from overvoltage on the input supply. See
547                 device datasheet for details.
548
549                 Valid values:
550                 - 6000000, 6500000, 7000000, 8000000, 9000000, 9500000, 10000000,
551                   10500000 (all uV)
552
553 What:           /sys/class/power_supply/bq24257-charger/in_dpm_voltage
554 Date:           October 2015
555 KernelVersion:  4.4.0
556 Contact:        Andreas Dannenberg <dannenberg@ti.com>
557 Description:
558                 This entry configures the input dynamic power path management voltage of
559                 bq24257-type charger devices. Once the supply drops to the configured
560                 voltage, the input current limit is reduced down to prevent the further
561                 drop of the supply. When the IC enters this mode, the charge current is
562                 lower than the set value. See device datasheet for details.
563
564                 Valid values:
565                 - 4200000, 4280000, 4360000, 4440000, 4520000, 4600000, 4680000,
566                   4760000 (all uV)
567
568 What:           /sys/class/power_supply/bq24257-charger/high_impedance_enable
569 Date:           October 2015
570 KernelVersion:  4.4.0
571 Contact:        Andreas Dannenberg <dannenberg@ti.com>
572 Description:
573                 This entry allows enabling the high-impedance mode of bq24257-type
574                 charger devices. If enabled, it places the charger IC into low power
575                 standby mode with the switch mode controller disabled. When disabled,
576                 the charger operates normally. See device datasheet for details.
577
578                 Valid values:
579                 - 1: enabled
580                 - 0: disabled
581
582 What:           /sys/class/power_supply/bq24257-charger/sysoff_enable
583 Date:           October 2015
584 KernelVersion:  4.4.0
585 Contact:        Andreas Dannenberg <dannenberg@ti.com>
586 Description:
587                 This entry allows enabling the sysoff mode of bq24257-type charger
588                 devices. If enabled and the input is removed, the internal battery FET
589                 is turned off in order to reduce the leakage from the BAT pin to less
590                 than 1uA. Note that on some devices/systems this disconnects the battery
591                 from the system. See device datasheet for details.
592
593                 Valid values:
594                 - 1: enabled
595                 - 0: disabled