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