From: Keerthy <a0393675@ti.com>
To: Keerthy <j-keerthy@ti.com>, edubezval@gmail.com, rui.zhang@intel.com
Cc: linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org,
linux-pm@vger.kernel.org, nm@ti.com
Subject: Re: [PATCH] thermal: ti-soc-thermal: Add set_emul_temp hook
Date: Fri, 20 May 2016 11:28:40 +0530 [thread overview]
Message-ID: <573EA790.8020006@ti.com> (raw)
In-Reply-To: <1462880530-13935-1-git-send-email-j-keerthy@ti.com>
On Tuesday 10 May 2016 05:12 PM, Keerthy wrote:
> Setting the emulation temperature helps reproduce critical
> temperature scenarios without risking the actual hardware at
> extreme temperatures. Adding __ti_thermal_set_emul_temp as
> the set_emul_temp hook.
A gentle ping on this.
>
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> ---
>
> Tested the emulation temperature feature on DRA72-EVM.
>
> drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
> index b213a12..e6f7025 100644
> --- a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
> +++ b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
> @@ -278,6 +278,20 @@ static int ti_thermal_get_trend(struct thermal_zone_device *thermal,
> return 0;
> }
>
> +static int __ti_thermal_set_emul_temp(void *p, int temp)
> +{
> + struct ti_thermal_data *data = p;
> + struct thermal_zone_device *tz;
> +
> + tz = data->ti_thermal;
> +
> + mutex_lock(&tz->lock);
> + tz->emul_temperature = temp;
> + mutex_unlock(&tz->lock);
> +
> + return 0;
> +}
> +
> /* Get critical temperature callback functions for thermal zone */
> static int ti_thermal_get_crit_temp(struct thermal_zone_device *thermal,
> int *temp)
> @@ -289,6 +303,7 @@ static int ti_thermal_get_crit_temp(struct thermal_zone_device *thermal,
> static const struct thermal_zone_of_device_ops ti_of_thermal_ops = {
> .get_temp = __ti_thermal_get_temp,
> .get_trend = __ti_thermal_get_trend,
> + .set_emul_temp = __ti_thermal_set_emul_temp,
> };
>
> static struct thermal_zone_device_ops ti_thermal_ops = {
>
prev parent reply other threads:[~2016-05-20 5:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-10 11:42 [PATCH] thermal: ti-soc-thermal: Add set_emul_temp hook Keerthy
2016-05-20 5:58 ` Keerthy [this message]
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=573EA790.8020006@ti.com \
--to=a0393675@ti.com \
--cc=edubezval@gmail.com \
--cc=j-keerthy@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=nm@ti.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;
as well as URLs for NNTP newsgroup(s).