All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Ni <wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Alex Courbot <acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
	"durgadoss.r-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org"
	<durgadoss.r-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org"
	<rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Matthew Longnecker
	<MLongnecker-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	"khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org"
	<khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>,
	"devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org"
	<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>,
	"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org"
	<lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org>,
	"linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [RFC PATCH 3/9] hwmon: (lm90) add support to handle irq
Date: Wed, 20 Feb 2013 18:27:29 +0800	[thread overview]
Message-ID: <5124A511.1060508@nvidia.com> (raw)
In-Reply-To: <5124429B.2000404-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

On 02/20/2013 11:27 AM, Alex Courbot wrote:
> On 02/20/2013 08:00 AM, Stephen Warren wrote:
>> On 02/18/2013 04:30 AM, Wei Ni wrote:
>>> Add support to handle irq. When the temperature touch the limit value, the
>>> driver can handle the interrupt.
>>
>>> diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
>>
>>> +static void lm90_irq_work(struct work_struct *work)
>> ...
>>> +	enable_irq(client->irq);
>>> +}
>>> +
>>> +static irqreturn_t lm90_irq(int irq, void *dev_id)
>>> +{
>>> +	struct lm90_data *data = dev_id;
>>> +
>>> +	disable_irq_nosync(irq);
>>
>> I think IRQF_ONESHOT would enable you to remove the manual
>> enable/disable_irq calls.
> 
> Oh, right. Using a threaded IRQ with IRQF_ONESHOT would make that happen 
> transparently. Wasn't aware of that, thanks.

Oh, yes, I will use it in my next version.

Thanks.
Wei.

> 
> Alex.
> 
> 

WARNING: multiple messages have this Message-ID (diff)
From: Wei Ni <wni@nvidia.com>
To: Alex Courbot <acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
	"durgadoss.r-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org"
	<durgadoss.r-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org"
	<rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Matthew Longnecker
	<MLongnecker-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	"khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org"
	<khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>,
	"devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org"
	<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>,
	"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org"
	<lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org>,
	"linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [lm-sensors] [RFC PATCH 3/9] hwmon: (lm90) add support to handle irq
Date: Wed, 20 Feb 2013 10:27:29 +0000	[thread overview]
Message-ID: <5124A511.1060508@nvidia.com> (raw)
In-Reply-To: <5124429B.2000404-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

On 02/20/2013 11:27 AM, Alex Courbot wrote:
> On 02/20/2013 08:00 AM, Stephen Warren wrote:
>> On 02/18/2013 04:30 AM, Wei Ni wrote:
>>> Add support to handle irq. When the temperature touch the limit value, the
>>> driver can handle the interrupt.
>>
>>> diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
>>
>>> +static void lm90_irq_work(struct work_struct *work)
>> ...
>>> +	enable_irq(client->irq);
>>> +}
>>> +
>>> +static irqreturn_t lm90_irq(int irq, void *dev_id)
>>> +{
>>> +	struct lm90_data *data = dev_id;
>>> +
>>> +	disable_irq_nosync(irq);
>>
>> I think IRQF_ONESHOT would enable you to remove the manual
>> enable/disable_irq calls.
> 
> Oh, right. Using a threaded IRQ with IRQF_ONESHOT would make that happen 
> transparently. Wasn't aware of that, thanks.

Oh, yes, I will use it in my next version.

Thanks.
Wei.

> 
> Alex.
> 
> 


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

WARNING: multiple messages have this Message-ID (diff)
From: wni@nvidia.com (Wei Ni)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 3/9] hwmon: (lm90) add support to handle irq
Date: Wed, 20 Feb 2013 18:27:29 +0800	[thread overview]
Message-ID: <5124A511.1060508@nvidia.com> (raw)
In-Reply-To: <5124429B.2000404@nvidia.com>

On 02/20/2013 11:27 AM, Alex Courbot wrote:
> On 02/20/2013 08:00 AM, Stephen Warren wrote:
>> On 02/18/2013 04:30 AM, Wei Ni wrote:
>>> Add support to handle irq. When the temperature touch the limit value, the
>>> driver can handle the interrupt.
>>
>>> diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
>>
>>> +static void lm90_irq_work(struct work_struct *work)
>> ...
>>> +	enable_irq(client->irq);
>>> +}
>>> +
>>> +static irqreturn_t lm90_irq(int irq, void *dev_id)
>>> +{
>>> +	struct lm90_data *data = dev_id;
>>> +
>>> +	disable_irq_nosync(irq);
>>
>> I think IRQF_ONESHOT would enable you to remove the manual
>> enable/disable_irq calls.
> 
> Oh, right. Using a threaded IRQ with IRQF_ONESHOT would make that happen 
> transparently. Wasn't aware of that, thanks.

Oh, yes, I will use it in my next version.

Thanks.
Wei.

> 
> Alex.
> 
> 

  parent reply	other threads:[~2013-02-20 10:27 UTC|newest]

Thread overview: 135+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-18 11:30 [RFC PATCH 0/9] Support for tegra30 thermal Wei Ni
2013-02-18 11:30 ` Wei Ni
2013-02-18 11:30 ` [lm-sensors] " Wei Ni
2013-02-18 11:30 ` [RFC PATCH 2/9] hwmon: (lm90) split set&show temp as common codes Wei Ni
2013-02-18 11:30   ` Wei Ni
2013-02-18 11:30   ` [lm-sensors] " Wei Ni
2013-02-18 22:29   ` Matthew Longnecker
2013-02-18 22:29     ` Matthew Longnecker
2013-02-18 22:29     ` [lm-sensors] " Matthew Longnecker
2013-02-19  9:48     ` Wei Ni
2013-02-19  9:48       ` Wei Ni
2013-02-19  9:48       ` [lm-sensors] " Wei Ni
2013-02-19  3:31   ` Guenter Roeck
2013-02-19  3:31     ` Guenter Roeck
2013-02-19  3:31     ` Guenter Roeck
     [not found]     ` <20130219033144.GA25610-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-02-19 10:00       ` Wei Ni
2013-02-19 10:00         ` Wei Ni
2013-02-19 10:00         ` Wei Ni
2013-02-19 22:56   ` Stephen Warren
2013-02-19 22:56     ` Stephen Warren
2013-02-19 22:56     ` [lm-sensors] " Stephen Warren
     [not found]     ` <51240331.7080604-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-02-20 12:31       ` Wei Ni
2013-02-20 12:31         ` Wei Ni
2013-02-20 12:31         ` [lm-sensors] " Wei Ni
2013-02-18 11:30 ` [RFC PATCH 4/9] hwmon: (lm90) use macros for the indexes of temp8 and temp11 Wei Ni
2013-02-18 11:30   ` Wei Ni
2013-02-18 11:30   ` [lm-sensors] " Wei Ni
2013-02-19  5:39   ` Alex Courbot
2013-02-19  5:39     ` Alex Courbot
2013-02-19  5:39     ` [lm-sensors] " Alex Courbot
     [not found]     ` <5123100A.9050604-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-02-19  9:58       ` Wei Ni
2013-02-19  9:58         ` Wei Ni
2013-02-19  9:58         ` [lm-sensors] " Wei Ni
2013-02-19 23:02   ` Stephen Warren
2013-02-19 23:02     ` Stephen Warren
2013-02-19 23:02     ` [lm-sensors] " Stephen Warren
     [not found]     ` <51240497.8010909-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-02-20 10:29       ` Wei Ni
2013-02-20 10:29         ` Wei Ni
2013-02-20 10:29         ` [lm-sensors] " Wei Ni
     [not found] ` <1361187031-3679-1-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-02-18 11:30   ` [RFC PATCH 1/9] ARM: dt: t30 cardhu: add dt entry for lm90 Wei Ni
2013-02-18 11:30     ` Wei Ni
2013-02-18 11:30     ` [lm-sensors] " Wei Ni
     [not found]     ` <1361187031-3679-2-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-02-19  3:28       ` Alex Courbot
2013-02-19  3:28         ` Alex Courbot
2013-02-19  3:28         ` [lm-sensors] " Alex Courbot
2013-02-19  9:52         ` Wei Ni
2013-02-19  9:52           ` Wei Ni
2013-02-19  9:52           ` [lm-sensors] " Wei Ni
     [not found]         ` <5122F162.9030103-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-02-19 22:48           ` Stephen Warren
2013-02-19 22:48             ` Stephen Warren
2013-02-19 22:48             ` [lm-sensors] " Stephen Warren
2013-02-18 11:30   ` [RFC PATCH 3/9] hwmon: (lm90) add support to handle irq Wei Ni
2013-02-18 11:30     ` Wei Ni
2013-02-18 11:30     ` [lm-sensors] " Wei Ni
     [not found]     ` <1361187031-3679-4-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-02-19  3:34       ` Guenter Roeck
2013-02-19  3:34         ` Guenter Roeck
2013-02-19  3:34         ` Guenter Roeck
2013-02-19 10:43         ` Wei Ni
2013-02-19 10:43           ` Wei Ni
2013-02-19 10:43           ` Wei Ni
2013-02-19 23:00     ` Stephen Warren
2013-02-19 23:00       ` Stephen Warren
2013-02-19 23:00       ` [lm-sensors] " Stephen Warren
2013-02-20  3:27       ` Alex Courbot
2013-02-20  3:27         ` Alex Courbot
2013-02-20  3:27         ` [lm-sensors] " Alex Courbot
     [not found]         ` <5124429B.2000404-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-02-20 10:27           ` Wei Ni [this message]
2013-02-20 10:27             ` Wei Ni
2013-02-20 10:27             ` [lm-sensors] " Wei Ni
2013-02-18 11:30   ` [RFC PATCH 5/9] Thermal: Support using dt node to get sensor Wei Ni
2013-02-18 11:30     ` Wei Ni
2013-02-18 11:30     ` [lm-sensors] " Wei Ni
     [not found]     ` <1361187031-3679-6-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-02-19 23:12       ` Stephen Warren
2013-02-19 23:12         ` Stephen Warren
2013-02-19 23:12         ` [lm-sensors] " Stephen Warren
     [not found]         ` <512406F0.4080708-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-02-20 10:36           ` Wei Ni
2013-02-20 10:36             ` Wei Ni
2013-02-20 10:36             ` [lm-sensors] " Wei Ni
2013-02-18 11:30   ` [RFC PATCH 6/9] hwmon: (lm90) Register to the thermal framework Wei Ni
2013-02-18 11:30     ` Wei Ni
2013-02-18 11:30     ` [lm-sensors] " Wei Ni
2013-02-19  3:42     ` Guenter Roeck
2013-02-19  3:42       ` Guenter Roeck
2013-02-19  3:42       ` Guenter Roeck
     [not found]       ` <20130219034205.GC25610-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-02-19 10:47         ` Wei Ni
2013-02-19 10:47           ` Wei Ni
2013-02-19 10:47           ` Wei Ni
2013-02-19  5:22     ` Alex Courbot
2013-02-19  5:22       ` Alex Courbot
2013-02-19  5:22       ` [lm-sensors] " Alex Courbot
2013-02-19 10:58       ` Wei Ni
2013-02-19 10:58         ` Wei Ni
2013-02-19 10:58         ` [lm-sensors] " Wei Ni
     [not found]     ` <1361187031-3679-7-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-02-19 23:18       ` Stephen Warren
2013-02-19 23:18         ` Stephen Warren
2013-02-19 23:18         ` [lm-sensors] " Stephen Warren
2013-02-20 10:40         ` Wei Ni
2013-02-20 10:40           ` Wei Ni
2013-02-20 10:40           ` [lm-sensors] " Wei Ni
2013-02-18 11:30   ` [RFC PATCH 8/9] ARM: dt: t30 cardhu: add dt entry for thermal driver Wei Ni
2013-02-18 11:30     ` Wei Ni
2013-02-18 11:30     ` [lm-sensors] " Wei Ni
2013-02-19  3:42     ` Alex Courbot
2013-02-19  3:42       ` Alex Courbot
2013-02-19  3:42       ` [lm-sensors] " Alex Courbot
2013-02-19  9:56       ` Wei Ni
2013-02-19  9:56         ` Wei Ni
2013-02-19  9:56         ` [lm-sensors] " Wei Ni
     [not found]     ` <1361187031-3679-9-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-02-19 23:28       ` Stephen Warren
2013-02-19 23:28         ` Stephen Warren
2013-02-19 23:28         ` [lm-sensors] " Stephen Warren
2013-02-20 11:53         ` Wei Ni
2013-02-20 11:53           ` Wei Ni
2013-02-20 11:53           ` [lm-sensors] " Wei Ni
     [not found]           ` <5124B934.3020900-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-02-20 17:18             ` Stephen Warren
2013-02-20 17:18               ` Stephen Warren
2013-02-20 17:18               ` [lm-sensors] " Stephen Warren
2013-02-18 11:30   ` [RFC PATCH 9/9] ARM: tegra: defconfig: enable thermal framework Wei Ni
2013-02-18 11:30     ` Wei Ni
2013-02-18 11:30     ` [lm-sensors] " Wei Ni
2013-02-18 11:30 ` [RFC PATCH 7/9] thermal: tegra30: add tegra30 thermal driver Wei Ni
2013-02-18 11:30   ` Wei Ni
2013-02-18 11:30   ` [lm-sensors] " Wei Ni
2013-02-19 23:48   ` Stephen Warren
2013-02-19 23:48     ` Stephen Warren
2013-02-19 23:48     ` [lm-sensors] " Stephen Warren
2013-02-20 12:23     ` Wei Ni
2013-02-20 12:23       ` Wei Ni
2013-02-20 12:23       ` [lm-sensors] " Wei Ni
2013-02-19 23:56   ` Russell King - ARM Linux
2013-02-19 23:56     ` Russell King - ARM Linux
2013-02-19 23:56     ` [lm-sensors] " Russell King - ARM Linux
     [not found]     ` <20130219235629.GU17833-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2013-02-20 12:29       ` Wei Ni
2013-02-20 12:29         ` Wei Ni
2013-02-20 12:29         ` [lm-sensors] " Wei Ni

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=5124A511.1060508@nvidia.com \
    --to=wni-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
    --cc=MLongnecker-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=durgadoss.r-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org \
    --cc=rui.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.