lkml.org 
[lkml]   [2011]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH] genirq: implement read_irq_line for interrupt lines
Thomas Gleixner wrote:
> On Fri, 15 Apr 2011, Abhijeet Dharmapurikar wrote:
>
>> Some drivers need to know what the status of the interrupt line is.
>> This is especially true for drivers that register a handler with
>> IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING and in the handler they
>> need to know which edge transition it was invoked for.
>
> What's the purpose of this? How is that going to be used?

The main purpose is to know in the handler if it was invoked becuase of
a rising edge or the falling edge.

Now one could say that the driver should maintain some state and toggle
it upon each invocation of this handler. That scheme quickly goes out of
sync because we might ignore interrupts while suspended.

>
>>
>> #ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT
>
> That hunk does not apply.

Will rebase and resend it again, my bad.

>> +int irq_read_line(unsigned int irq)
>> +{
>> + struct irq_desc *desc = irq_to_desc(irq);
>> + unsigned long flags;
>> + int val;
>
> Please use irq_get_desc_buslock()

yes will fix this in the next revision of this patch.


>> +EXPORT_SYMBOL(irq_read_line);
>
> EXPORT_SYMBOL_GPL() please.

yes will do


--
Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm
Innovation Center, Inc. is a member of the Code Aurora Forum.


\
 
 \ /
  Last update: 2011-04-16 00:11    [W:0.485 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site