[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4DA8C3FC.5010102@codeaurora.org>
Date: Fri, 15 Apr 2011 15:17:32 -0700
From: Abhijeet Dharmapurikar <adharmap@...eaurora.org>
To: David Daney <ddaney@...iumnetworks.com>
CC: tglx@...utronix.de, mathieu.desnoyers@...icios.com,
Ingo Molnar <mingo@...e.hu>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
linux-kernel@...r.kernel.org, dwalker@...o99.com,
linux-arm-msm-owner@...r.kernel.org, linux-arm-msm@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
Greg Kroah-Hartman <gregkh@...e.de>
Subject: Re: [RFC PATCH] genirq: implement read_irq_line for interrupt lines
David Daney wrote:
> On 04/15/2011 11:42 AM, Abhijeet Dharmapurikar wrote:
> [...]
>>
>> +/**
>> + * irq_read_line - read the value on an irq line
>> + * @irq: Interrupt number representing a hardware line
>> + *
>> + * This function may be called from IRQ context only when
>> + * desc->chip->bus_lock and desc->chip->bus_sync_unlock are NULL !
>
> What does it return? I can see that -EINVAL is returned if it isn't
> applicable to this irq. But what if chip->irq_read_line is implemented?
It returns the logical state of that line (0 when it is low or 1 when it
is high). Will add the return type in the comment.
>
>
>
>
>> + */
>> +int irq_read_line(unsigned int irq)
>> +{
>> + struct irq_desc *desc = irq_to_desc(irq);
>> + unsigned long flags;
>> + int val;
>> +
>> + if (!desc || !desc->irq_data.chip->irq_read_line)
>> + return -EINVAL;
It returns -EINVAL is irq_read_line is not implemented.
>> +
>> + chip_bus_lock(desc);
>> + raw_spin_lock_irqsave(&desc->lock, flags);
--
Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm
Innovation Center, Inc. is a member of the Code Aurora Forum.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists