public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: jonghwa3.lee@samsung.com
To: "Zhang, Rui" <rui.zhang@intel.com>
Cc: "linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Eduardo Valentin <eduardo.valentin@ti.com>,
	Amit Dinel Kachhap <amit.kachhap@linaro.org>,
	MyungJoo Ham <myungjoo.ham@samsung.com>
Subject: Re: [PATCH 2/3] Thermal: core: Modify temp_crit_show() to use proper callback function.
Date: Tue, 21 May 2013 10:31:52 +0900	[thread overview]
Message-ID: <519ACE88.3090503@samsung.com> (raw)
In-Reply-To: <744357E9AAD1214791ACBA4B0B9092630110240D@SHSMSX101.ccr.corp.intel.com>

On 2013년 05월 21일 00:57, Zhang, Rui wrote:

> 
> 
>> -----Original Message-----
>> From: Jonghwa Lee [mailto:jonghwa3.lee@samsung.com]
>> Sent: Saturday, May 18, 2013 5:51 PM
>> To: linux-pm@vger.kernel.org
>> Cc: linux-kernel@vger.kernel.org; Zhang, Rui; Eduardo Valentin; Amit
>> Dinel Kachhap; Jonghwa Lee; MyungJoo Ham
>> Subject: [PATCH 2/3] Thermal: core: Modify temp_crit_show() to use
>> proper callback function.
>> Importance: High
>>
>> This patch modifies temp_crit_show() which is used to create hwmon's
>> sysfs node to use .get_crit_temp callback function of thermal zone
>> device rather than .get_trip_temp.
>>
>> Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
>> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
> 
> The problem is that .get_crit_temp is optional for thermal drivers
> that has a critical trip point.


Actually, this is a interface for hwmon not generic thermal framework. And when
we create this node through the thermal_add_hwmon_sysfs(), we've already checked
whether call back function is available. So the problem won't happen.

Thanks
Jonghwa

> At least we do not have such kind of check in thermal core.
> Take rcar_thermal driver for example,
> It supports critical trip point but it does not have .get_crit_type.
> 
> So I'd like to see a fix in rcar thermal driver and thermal core
> for this issue, together with this patch.
> 
> Thanks,
> rui
>> ---
>>  drivers/thermal/thermal_core.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/thermal/thermal_core.c
>> b/drivers/thermal/thermal_core.c index f753f48..ce4384a 100644
>> --- a/drivers/thermal/thermal_core.c
>> +++ b/drivers/thermal/thermal_core.c
>> @@ -924,7 +924,7 @@ temp_crit_show(struct device *dev, struct
>> device_attribute *attr,
>>  	long temperature;
>>  	int ret;
>>
>> -	ret = tz->ops->get_trip_temp(tz, 0, &temperature);
>> +	ret = tz->ops->get_crit_temp(tz, &temperature);
>>  	if (ret)
>>  		return ret;
>>
>> --
>> 1.7.9.5
> 
> 



  reply	other threads:[~2013-05-21  1:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-18  9:50 [PATCH 2/3] Thermal: core: Modify temp_crit_show() to use proper callback function Jonghwa Lee
2013-05-20 15:57 ` Zhang, Rui
2013-05-21  1:31   ` jonghwa3.lee [this message]
2013-05-23  2:19     ` Zhang Rui

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=519ACE88.3090503@samsung.com \
    --to=jonghwa3.lee@samsung.com \
    --cc=amit.kachhap@linaro.org \
    --cc=eduardo.valentin@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=rui.zhang@intel.com \
    /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