From patchwork Tue Aug 18 23:48:04 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 42449 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7INcmLF009432 for ; Tue, 18 Aug 2009 23:38:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751488AbZHRXhj (ORCPT ); Tue, 18 Aug 2009 19:37:39 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752099AbZHRXhj (ORCPT ); Tue, 18 Aug 2009 19:37:39 -0400 Received: from e8.ny.us.ibm.com ([32.97.182.138]:47546 "EHLO e8.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752072AbZHRXhg (ORCPT ); Tue, 18 Aug 2009 19:37:36 -0400 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e8.ny.us.ibm.com (8.14.3/8.13.1) with ESMTP id n7INbKIx014251; Tue, 18 Aug 2009 19:37:20 -0400 Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id n7INbbcq248616; Tue, 18 Aug 2009 19:37:37 -0400 Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n7INba9Z014270; Tue, 18 Aug 2009 19:37:37 -0400 Received: from elm3a70.beaverton.ibm.com (elm3a70.beaverton.ibm.com [9.47.66.70]) by d01av01.pok.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id n7INbZnm014254; Tue, 18 Aug 2009 19:37:36 -0400 From: "Darrick J. Wong" Subject: [PATCH 1/2] hwmon: Enhance the sysfs API for power meters. To: "Darrick J. Wong" , Len Brown , Andrew Morton Cc: linux-kernel , lm-sensors , linux-acpi , Zhang Rui , Pavel Machek Date: Tue, 18 Aug 2009 16:48:04 -0700 Message-ID: <20090818234803.2004.28814.stgit@elm3a70.beaverton.ibm.com> In-Reply-To: <20090818234757.2004.88017.stgit@elm3a70.beaverton.ibm.com> References: <20090818234757.2004.88017.stgit@elm3a70.beaverton.ibm.com> User-Agent: StGIT/0.14.2 MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Augment the documentation of the hwmon sysfs API to accomodate ACPI power meters. Signed-off-by: Darrick J. Wong --- Documentation/hwmon/sysfs-interface | 60 ++++++++++++++++++++++++++++++++++- 1 files changed, 59 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Documentation/hwmon/sysfs-interface b/Documentation/hwmon/sysfs-interface index dcbd502..8b5a654 100644 --- a/Documentation/hwmon/sysfs-interface +++ b/Documentation/hwmon/sysfs-interface @@ -353,10 +353,20 @@ power[1-*]_average Average power use Unit: microWatt RO -power[1-*]_average_interval Power use averaging interval +power[1-*]_average_interval Power use averaging interval. A poll + notification is sent to this file if the + hardware changes the averaging interval. Unit: milliseconds RW +power[1-*]_average_interval_max Maximum power use averaging interval + Unit: milliseconds + RO + +power[1-*]_average_interval_min Minimum power use averaging interval + Unit: milliseconds + RO + power[1-*]_average_highest Historical average maximum power use Unit: microWatt RO @@ -365,6 +375,18 @@ power[1-*]_average_lowest Historical average minimum power use Unit: microWatt RO +power[1-*]_average_max A poll notification is sent to + power[1-*]_average when power use + rises above this value. + Unit: microWatt + RW + +power[1-*]_average_min A poll notification is sent to + power[1-*]_average when power use + sinks below this value. + Unit: microWatt + RW + power[1-*]_input Instantaneous power use Unit: microWatt RO @@ -381,6 +403,42 @@ power[1-*]_reset_history Reset input_highest, input_lowest, average_highest and average_lowest. WO +power[1-*]_accuracy Accuracy of the power meter. + Unit: Percent + RO + +power[1-*]_alarm 1 if the system is drawing more power than the + cap allows; 0 otherwise. A poll notification is + sent to this file if the power use exceeds the + cap. The action that is taken when this event + happens is undefined--it is possible that the + hardware will reduce performance to cut the + power use, but it is also possible that the + system designer expects the OS to try to + reduce power consumption. Contact your + machine's vendor to find out which. + RO + +power[1-*]_cap If power use rises above this limit, the + system should take action to reduce power use. + A poll notification is sent to this file if the + cap is changed by the hardware. + Unit: microWatt + RW + +power[1-*]_cap_hyst Margin of hysteresis built around capping and + notification. + Unit: microWatt + RW + +power[1-*]_cap_max Maximum cap that can be set. + Unit: microWatt + RO + +power[1-*]_cap_min Minimum cap that can be set. + Unit: microWatt + RO + ********** * Energy * **********