Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
44396a26
Commit
44396a26
authored
Sep 19, 2009
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'power-meter' into release
parents
89ae400e
de584afa
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1081 additions
and
0 deletions
+1081
-0
Documentation/hwmon/acpi_power_meter
Documentation/hwmon/acpi_power_meter
+51
-0
drivers/acpi/Kconfig
drivers/acpi/Kconfig
+11
-0
drivers/acpi/Makefile
drivers/acpi/Makefile
+1
-0
drivers/acpi/power_meter.c
drivers/acpi/power_meter.c
+1018
-0
No files found.
Documentation/hwmon/acpi_power_meter
0 → 100644
View file @
44396a26
Kernel driver power_meter
=========================
This driver talks to ACPI 4.0 power meters.
Supported systems:
* Any recent system with ACPI 4.0.
Prefix: 'power_meter'
Datasheet: http://acpi.info/, section 10.4.
Author: Darrick J. Wong
Description
-----------
This driver implements sensor reading support for the power meters exposed in
the ACPI 4.0 spec (Chapter 10.4). These devices have a simple set of
features--a power meter that returns average power use over a configurable
interval, an optional capping mechanism, and a couple of trip points. The
sysfs interface conforms with the specification outlined in the "Power" section
of Documentation/hwmon/sysfs-interface.
Special Features
----------------
The power[1-*]_is_battery knob indicates if the power supply is a battery.
Both power[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 netlink
socket and a poll notification will be sent to the appropriate
power[1-*]_average sysfs file.
The power[1-*]_{model_number, serial_number, oem_info} fields display arbitrary
strings that ACPI provides with the meter. The measures/ directory contains
symlinks to the devices that this meter measures.
Some computers have the ability to enforce a power cap in hardware. If this is
the case, the power[1-*]_cap and related sysfs files will appear. When the
average power consumption exceeds the cap, an ACPI event will be broadcast on
the netlink event socket and a poll notification will be sent to the
appropriate power[1-*]_alarm file to indicate that capping has begun, and the
hardware has taken action to reduce power consumption. Most likely this will
result in reduced performance.
There are a few other ACPI notifications that can be sent by the firmware. In
all cases the ACPI event will be broadcast on the ACPI netlink event socket as
well as sent as a poll notification to a sysfs file. The events are as
follows:
power[1-*]_cap will be notified if the firmware changes the power cap.
power[1-*]_interval will be notified if the firmware changes the averaging
interval.
drivers/acpi/Kconfig
View file @
44396a26
...
...
@@ -82,6 +82,17 @@ config ACPI_PROCFS_POWER
Say N to delete power /proc/acpi/ directories that have moved to /sys/
config ACPI_POWER_METER
tristate "ACPI 4.0 power meter"
depends on HWMON
help
This driver exposes ACPI 4.0 power meters as hardware monitoring
devices. Say Y (or M) if you have a computer with ACPI 4.0 firmware
and a power meter.
To compile this driver as a module, choose M here:
the module will be called power-meter.
config ACPI_SYSFS_POWER
bool "Future power /sys interface"
select POWER_SUPPLY
...
...
drivers/acpi/Makefile
View file @
44396a26
...
...
@@ -56,6 +56,7 @@ obj-$(CONFIG_ACPI_HOTPLUG_MEMORY) += acpi_memhotplug.o
obj-$(CONFIG_ACPI_BATTERY)
+=
battery.o
obj-$(CONFIG_ACPI_SBS)
+=
sbshc.o
obj-$(CONFIG_ACPI_SBS)
+=
sbs.o
obj-$(CONFIG_ACPI_POWER_METER)
+=
power_meter.o
# processor has its own "processor." module_param namespace
processor-y
:=
processor_core.o processor_throttling.o
...
...
drivers/acpi/power_meter.c
0 → 100644
View file @
44396a26
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment