blob: 4a0941ade0cafaca9b57811f117d97e9a1f48ec6 [file] [log] [blame]
Darrick J. Wongde584af2009-09-18 12:41:09 -07001Kernel driver power_meter
2=========================
3
4This driver talks to ACPI 4.0 power meters.
5
6Supported systems:
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -03007
Darrick J. Wongde584af2009-09-18 12:41:09 -07008 * Any recent system with ACPI 4.0.
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -03009
Darrick J. Wongde584af2009-09-18 12:41:09 -070010 Prefix: 'power_meter'
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030011
Darrick J. Wongde584af2009-09-18 12:41:09 -070012 Datasheet: http://acpi.info/, section 10.4.
13
14Author: Darrick J. Wong
15
16Description
17-----------
18
19This driver implements sensor reading support for the power meters exposed in
20the ACPI 4.0 spec (Chapter 10.4). These devices have a simple set of
21features--a power meter that returns average power use over a configurable
22interval, an optional capping mechanism, and a couple of trip points. The
23sysfs interface conforms with the specification outlined in the "Power" section
Mauro Carvalho Chehab7ebd8b662019-04-17 06:46:29 -030024of Documentation/hwmon/sysfs-interface.rst.
Darrick J. Wongde584af2009-09-18 12:41:09 -070025
26Special Features
27----------------
28
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030029The `power[1-*]_is_battery` knob indicates if the power supply is a battery.
30Both `power[1-*]_average_{min,max}` must be set before the trip points will work.
Darrick J. Wongde584af2009-09-18 12:41:09 -070031When both of them are set, an ACPI event will be broadcast on the ACPI netlink
32socket and a poll notification will be sent to the appropriate
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030033`power[1-*]_average` sysfs file.
Darrick J. Wongde584af2009-09-18 12:41:09 -070034
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030035The `power[1-*]_{model_number, serial_number, oem_info}` fields display
36arbitrary strings that ACPI provides with the meter. The measures/ directory
37contains symlinks to the devices that this meter measures.
Darrick J. Wongde584af2009-09-18 12:41:09 -070038
39Some computers have the ability to enforce a power cap in hardware. If this is
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030040the case, the `power[1-*]_cap` and related sysfs files will appear. When the
Darrick J. Wongde584af2009-09-18 12:41:09 -070041average power consumption exceeds the cap, an ACPI event will be broadcast on
42the netlink event socket and a poll notification will be sent to the
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030043appropriate `power[1-*]_alarm` file to indicate that capping has begun, and the
Darrick J. Wongde584af2009-09-18 12:41:09 -070044hardware has taken action to reduce power consumption. Most likely this will
45result in reduced performance.
46
47There are a few other ACPI notifications that can be sent by the firmware. In
48all cases the ACPI event will be broadcast on the ACPI netlink event socket as
49well as sent as a poll notification to a sysfs file. The events are as
50follows:
51
Mauro Carvalho Chehabb04f2f72019-04-17 06:46:28 -030052`power[1-*]_cap` will be notified if the firmware changes the power cap.
53`power[1-*]_interval` will be notified if the firmware changes the averaging
Darrick J. Wongde584af2009-09-18 12:41:09 -070054interval.