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