From patchwork Wed Jul 25 03:41:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 1234621 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id F0930DFFD0 for ; Wed, 25 Jul 2012 03:45:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933052Ab2GYDov (ORCPT ); Tue, 24 Jul 2012 23:44:51 -0400 Received: from mail-qc0-f174.google.com ([209.85.216.174]:51542 "EHLO mail-qc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933074Ab2GYDno (ORCPT ); Tue, 24 Jul 2012 23:43:44 -0400 Received: by qcro28 with SMTP id o28so169481qcr.19 for ; Tue, 24 Jul 2012 20:43:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:in-reply-to:references:reply-to:organization; bh=ZhfS7AHXH+fEk3MK91IQNyviay3zBF2gwspGMQNKhA0=; b=q8ubfDtTtBrUD8Ihu3KPXO4FLG0k6eEV9U1869nh7SWPVJeQW4U0NyYJnhp7xlQ0h0 KG9KEicTHs+OMg5d3fPDjpEHvFrjIhZKtGvmLU7+pZx8uZWfemWypLPXtNPOIAONB1Kp H+pvWPqXo7ToCF8pKOvcLVYjDgoPayGF/WIXuYpE9vgVGrW2DtYMSv+YMDksK3+NnT3N 6BlpHM5yuyw9DCzIxq8W3ygARikN4lo4l2r6l/bPjCwAohLD64idjSLRW83aC/U24Zzc n4tciT1xsUcWkzjYsRzm6V4YxrAeRhjB8DoBCEZKjVuGHzv8lMKy8h7nUoBYPDE89/1Z hWpg== Received: by 10.224.191.65 with SMTP id dl1mr35720607qab.72.1343187823090; Tue, 24 Jul 2012 20:43:43 -0700 (PDT) Received: from x980.localdomain6 (h184-61-125-197.altnnh.dsl.dynamic.tds.net. [184.61.125.197]) by mx.google.com with ESMTPS id et6sm15489186qab.8.2012.07.24.20.43.40 (version=SSLv3 cipher=OTHER); Tue, 24 Jul 2012 20:43:41 -0700 (PDT) From: Len Brown To: linux-acpi@vger.kernel.org, linux-pm@lists.linux-foundation.org Cc: linux-kernel@vger.kernel.org, Zhang Rui , Len Brown Subject: [PATCH 52/52] Thermal: Documentation update Date: Tue, 24 Jul 2012 23:41:48 -0400 Message-Id: <8eaa8d6ca27788aa23659082362a608c1fabcdfe.1343187618.git.len.brown@intel.com> X-Mailer: git-send-email 1.7.12.rc0 In-Reply-To: <1343187708-19532-1-git-send-email-lenb@kernel.org> References: <1343187708-19532-1-git-send-email-lenb@kernel.org> In-Reply-To: <6af1c4fc5227af65092ebc848989693562bfa3e8.1343187617.git.len.brown@intel.com> References: <6af1c4fc5227af65092ebc848989693562bfa3e8.1343187617.git.len.brown@intel.com> Reply-To: Len Brown Organization: Intel Open Source Technology Center Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Zhang Rui With commit 6503e5df08008b9a47022b5e9ebba658c8fa69af, the value of /sys/class/thermal/thermal_zoneX/mode has been changed from user/kernel to enabled/disabled. Update the documentation so that users won't be confused. Signed-off-by: Zhang Rui Signed-off-by: Len Brown --- Documentation/thermal/sysfs-api.txt | 20 ++++++++++---------- drivers/acpi/thermal.c | 6 ++---- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/Documentation/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt index 2ba4c9b..c087dbc 100644 --- a/Documentation/thermal/sysfs-api.txt +++ b/Documentation/thermal/sysfs-api.txt @@ -47,11 +47,11 @@ temperature) and throttle appropriate devices. .bind: bind the thermal zone device with a thermal cooling device. .unbind: unbind the thermal zone device with a thermal cooling device. .get_temp: get the current temperature of the thermal zone. - .get_mode: get the current mode (user/kernel) of the thermal zone. - - "kernel" means thermal management is done in kernel. - - "user" will prevent kernel thermal driver actions upon trip points + .get_mode: get the current mode (enabled/disabled) of the thermal zone. + - "enabled" means the kernel thermal management is enabled. + - "disabled" will prevent kernel thermal driver action upon trip points so that user applications can take charge of thermal management. - .set_mode: set the mode (user/kernel) of the thermal zone. + .set_mode: set the mode (enabled/disabled) of the thermal zone. .get_trip_type: get the type of certain trip point. .get_trip_temp: get the temperature above which the certain trip point will be fired. @@ -170,14 +170,14 @@ temp RO, Required mode - One of the predefined values in [kernel, user]. + One of the predefined values in [enabled, disabled]. This file gives information about the algorithm that is currently managing the thermal zone. It can be either default kernel based algorithm or user space application. - kernel = Thermal management in kernel thermal zone driver. - user = Preventing kernel thermal zone driver actions upon - trip points so that user application can take full - charge of the thermal management. + enabled = enable Kernel Thermal management. + disabled = Preventing kernel thermal zone driver actions upon + trip points so that user application can take full + charge of the thermal management. RW, Optional trip_point_[0-*]_temp @@ -256,7 +256,7 @@ method, the sys I/F structure will be built like this: |thermal_zone1: |---type: acpitz |---temp: 37000 - |---mode: kernel + |---mode: enabled |---trip_point_0_temp: 100000 |---trip_point_0_type: critical |---trip_point_1_temp: 80000 diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 2107d1b..8275e7b 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c @@ -550,8 +550,6 @@ static int thermal_get_temp(struct thermal_zone_device *thermal, return 0; } -static const char enabled[] = "kernel"; -static const char disabled[] = "user"; static int thermal_get_mode(struct thermal_zone_device *thermal, enum thermal_device_mode *mode) { @@ -588,8 +586,8 @@ static int thermal_set_mode(struct thermal_zone_device *thermal, if (enable != tz->tz_enabled) { tz->tz_enabled = enable; ACPI_DEBUG_PRINT((ACPI_DB_INFO, - "%s ACPI thermal control\n", - tz->tz_enabled ? enabled : disabled)); + "%s kernel ACPI thermal control\n", + tz->tz_enabled ? "Enable" : "Disable")); acpi_thermal_check(tz); } return 0;