From: Zhang Rui <rui.zhang@intel.com>
To: Durgadoss R <durgadoss.r@intel.com>
Cc: lenb@kernel.org, linux-acpi@vger.kernel.org
Subject: Re: [PATCHv3] ACPI-Thermal: Make Thermal trip points writeable
Date: Mon, 09 Apr 2012 13:59:55 +0800 [thread overview]
Message-ID: <1333951195.2387.192.camel@rui.sh.intel.com> (raw)
In-Reply-To: <1333710717-24691-1-git-send-email-durgadoss.r@intel.com>
Hi, Durga,
On 五, 2012-04-06 at 16:41 +0530, Durgadoss R wrote:
> Some of the thermal drivers using the Generic Thermal Framework
> require (all/some) trip points to be writeable. This patch makes
> the trip point temperatures writeable on a per-trip point basis,
> and modifies the required function call in thermal.c. This patch
> also updates the Documentation to reflect the new change.
>
I'm okay with this patch, except some minor comments.
> Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Acked-by: Zhang Rui <rui.zhang@intel.com>
> ---
> v1
> * patch1/2: Code for making trip points writeable
> * patch2/2: Change the callee in thermal.c
> v2
> * Make both the changes in a single patch
> * Update Documentation/thermal/sysfs-api.txt
> v3
> * Re-submitting, on top of the latest mainline kernel
> ---
> Documentation/thermal/sysfs-api.txt | 4 +-
> drivers/acpi/thermal.c | 4 +-
> drivers/thermal/thermal_sys.c | 112 +++++++++++++++++++++++------------
> include/linux/thermal.h | 10 ++-
> 4 files changed, 87 insertions(+), 43 deletions(-)
>
> +/**
> * thermal_zone_device_register - register a new thermal zone device
> * @type: the thermal zone device type
> * @trips: the number of trip points the thermal zone support
> + * @flag: a bit string indicating the writeablility of trip points
> * @devdata: private device data
> * @ops: standard thermal zone device callbacks
> * @tc1: thermal coefficient 1 for passive calculations
> @@ -1107,7 +1147,7 @@ EXPORT_SYMBOL(thermal_zone_device_update);
> * section 11.1.5.1 of the ACPI specification 3.0.
> */
> struct thermal_zone_device *thermal_zone_device_register(char *type,
> - int trips, void *devdata,
> + int trips, int flag, void *devdata,
> const struct thermal_zone_device_ops *ops,
> int tc1, int tc2, int passive_delay, int polling_delay)
> {
Do we need a simple check of the "flag" parameter?
e.g,
if (flag >> trips)
return -EINVAL;
BTW, should we introduce some helper function like this
THERMAL_SET_TRIP_WRITABLE (trip, flag) flag |= 1 << trip;
thanks,
rui
--
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
next prev parent reply other threads:[~2012-04-09 5:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-06 11:11 [PATCHv3] ACPI-Thermal: Make Thermal trip points writeable Durgadoss R
2012-04-09 5:59 ` Zhang Rui [this message]
2012-04-09 9:10 ` R, Durgadoss
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1333951195.2387.192.camel@rui.sh.intel.com \
--to=rui.zhang@intel.com \
--cc=durgadoss.r@intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox