Thread (1 message) 1 message, 1 author, 2013-02-20

Re: [RFC PATCH 3/9] hwmon: (lm90) add support to handle irq

From: Wei Ni <hidden>
Date: 2013-02-20 10:27:29
Also in: linux-arm-kernel, linux-devicetree, linux-pm

Possibly related (same subject, not in this thread)

On 02/20/2013 11:27 AM, Alex Courbot wrote:
On 02/20/2013 08:00 AM, Stephen Warren wrote:
quoted
On 02/18/2013 04:30 AM, Wei Ni wrote:
quoted
Add support to handle irq. When the temperature touch the limit value, the
driver can handle the interrupt.
quoted
diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
quoted
+static void lm90_irq_work(struct work_struct *work)
...
quoted
+	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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help