From: Ajit Pal Singh <ajitpal.singh@st.com>
To: Eduardo Valentin <eduardo.valentin@ti.com>
Cc: "rui.zhang@intel.com" <rui.zhang@intel.com>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"grant.likely@linaro.org" <grant.likely@linaro.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"rob@landley.net" <rob@landley.net>,
Stephen GALLIMORE <stephen.gallimore@st.com>,
Srinivas KANDAGATLA <srinivas.kandagatla@st.com>
Subject: Re: [PATCH] thermal: st: Add support for STiH41x thermal sensors
Date: Mon, 23 Sep 2013 13:56:20 +0530 [thread overview]
Message-ID: <523FFB2C.1090400@st.com> (raw)
In-Reply-To: <523A06EE.9090801@ti.com>
On Thursday 19 September 2013 01:32 AM, Eduardo Valentin wrote:
> On 18-09-2013 05:38, Ajit Pal Singh wrote:
>> Adds support for thermal sensors on STiH41x series SOCs.
>> Single trip point 'THERMAL_TRIP_CRITICAL' is supported.
>> STIH416 MPE sensor supports interrupt reporting when a preset
>> threshold temperature is crossed.
>> For rest of the thermal sensors a polling delay of 10000ms is
>> set.
>>
>> CC: Stephen Gallimore <stephen.gallimore@st.com>
>> CC: Srinivas Kandagatla <srinivas.kandagatla@st.com>
>> Signed-off-by: Ajit Pal Singh <ajitpal.singh@st.com>
[snip]
>> +static irqreturn_t st_thermal_thresh_int(int irq, void *data)
>> +{
>> + struct st_thermal_sensor *sensor = data;
>> + struct device *dev = sensor_to_dev(sensor);
>> +
>> + dev_dbg(dev, "%s,called\n", __func__);
>> + thermal_zone_device_update(sensor->th_dev);
>
> Are you sure you want to do this here? The above call might sleep.
Have used devm_request_threaded_irq() to register the above threaded irq
handler. Calling sleep-able calls from the threaded interrupt handler
should be OK ?
>
>> + return IRQ_HANDLED;
>> +}
[snip]
>> +static int st_thermal_notify(struct thermal_zone_device *th,
>> + int trip, enum thermal_trip_type type)
>> +{
>> + struct st_thermal_sensor *sensor = thzone_to_sensor(th);
>> + struct device *dev = sensor_to_dev(sensor);
>> +
>> + switch (type) {
>> + case THERMAL_TRIP_CRITICAL:
>> + /* TODO: Send event to user space */
>
> It depends on what you mean by that. The core code will attempt to call
> the shutdown command, in user space.
Will remove the comment in the next version of the patch.
>
>> + dev_err(dev, "Critical temp reached:Going for shutdown\n");
>> + break;
>> + default:
>> + return -EINVAL;
>> + }
>> + return 0;
>> +}
>> +
[snip]
>> +module_platform_driver(st_thermal_driver);
>> +MODULE_AUTHOR("STMicroelectronics (R&D) Limited");
>> +MODULE_DESCRIPTION("STMicroelectronics STIH41x SOC thermal sensor driver");
>> +MODULE_LICENSE("GPL");
>
> GPL v2?
OK.Will make it GPLv2
>
Thanks
Ajit Pal Singh
prev parent reply other threads:[~2013-09-23 8:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-18 9:38 [PATCH] thermal: st: Add support for STiH41x thermal sensors Ajit Pal Singh
2013-09-18 20:02 ` Eduardo Valentin
2013-09-23 8:26 ` Ajit Pal Singh [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=523FFB2C.1090400@st.com \
--to=ajitpal.singh@st.com \
--cc=devicetree@vger.kernel.org \
--cc=eduardo.valentin@ti.com \
--cc=grant.likely@linaro.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rob@landley.net \
--cc=rui.zhang@intel.com \
--cc=srinivas.kandagatla@st.com \
--cc=stephen.gallimore@st.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).