Kernel driver power_meter

This driver talks to ACPI 4.0 power meters.

Supported systems:

Author: Darrick J. Wong

Description

This driver implements sensor reading support for the power meters exposed inthe ACPI 4.0 spec (Chapter 10.4). These devices have a simple set offeatures–a power meter that returns average power use over a configurableinterval, an optional capping mechanism, and a couple of trip points. Thesysfs interface conforms with the specification outlined in the “Power” sectionof Documentation/hwmon/sysfs-interface.rst.

Special Features

Thepower[1-*]_is_battery knob indicates if the power supply is a battery.Bothpower[1-*]_average_{min,max} must be set before the trip points will work.When both of them are set, an ACPI event will be broadcast on the ACPI netlinksocket and a poll notification will be sent to the appropriatepower[1-*]_average sysfs file.

Thepower[1-*]_{model_number, serial_number, oem_info} fields displayarbitrary strings that ACPI provides with the meter. The measures/ directorycontains symlinks to the devices that this meter measures.

Some computers have the ability to enforce a power cap in hardware. If this isthe case, thepower[1-*]_cap and related sysfs files will appear. When theaverage power consumption exceeds the cap, an ACPI event will be broadcast onthe netlink event socket and a poll notification will be sent to theappropriatepower[1-*]_alarm file to indicate that capping has begun, and thehardware has taken action to reduce power consumption. Most likely this willresult in reduced performance.

There are a few other ACPI notifications that can be sent by the firmware. Inall cases the ACPI event will be broadcast on the ACPI netlink event socket aswell as sent as a poll notification to a sysfs file. The events are asfollows:

power[1-*]_cap will be notified if the firmware changes the power cap.power[1-*]_interval will be notified if the firmware changes the averaginginterval.