summaryrefslogtreecommitdiff
path: root/drivers/acpi/power_meter.c
AgeCommit message (Collapse)Author
2009-11-05acpi-power-meter: Don't leak ACPI error codes to userspaceDarrick J. Wong
If the ACPI methods return an error code, we must return -EINVAL to userspace to flag the error. Right now we pass the (positive) number right through, which causes echo to keep writing bogus values. Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
2009-09-19hwmon driver for ACPI 4.0 power metersDarrick J. Wong
This driver exposes ACPI 4.0 compliant power meters as hardware monitoring devices. This second revision of the driver also exports the ACPI string info as sysfs attributes, a list of the devices that the meter measures, and will send ACPI notifications over the ACPI netlink socket. This latest revision only enables the power capping controls if it can be confirmed that the power cap can be enforced by the hardware and explains how the notification interfaces work. [akpm@linux-foundation.org: remove default-y] [akpm@linux-foundation.org: build fix] Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>