[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <511CD59A.7080504@nvidia.com>
Date: Thu, 14 Feb 2013 17:46:26 +0530
From: Laxman Dewangan <ldewangan@...dia.com>
To: Mark Brown <broonie@...nsource.wolfsonmicro.com>
CC: "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] regmap: irq: do not write mask register if it is
not supported
On Thursday 14 February 2013 05:27 PM, Mark Brown wrote:
> * PGP Signed by an unknown key
>
> On Thu, Feb 14, 2013 at 05:25:13PM +0530, Laxman Dewangan wrote:
>> On Thursday 14 February 2013 05:05 PM, Mark Brown wrote:
>>> This doesn't sound like something that should be open coded in
>>> individual interrupt controller drivers, obviously it's a bit rubbish
>>> that there's no way to enable or disable the interrupt but presumably
>>> other hardware has the same "feature" and the IRQ subsystem ought to
>>> understand it.
>> To support such case, can we assume that mask is always enabled
>> (interrupt enabled) so that it can be use in irq_thread to mask the
>> interrupt status. So during initialization, if there is no mask_base
>> register then all mask_buf is such that it enabled interrupt.
> ...and have any attempt to mask the interrupt return an error?
>
Yes, we can return error as -EINVAL.
I just looked kernel/irq/chip.c, enable_irq()/disable_irq() do not
check for return value but it does not matter as per regmap-irq
implementation.
void irq_enable(struct irq_desc *desc)
{
irq_state_clr_disabled(desc);
if (desc->irq_data.chip->irq_enable)
desc->irq_data.chip->irq_enable(&desc->irq_data);
else
desc->irq_data.chip->irq_unmask(&desc->irq_data);
irq_state_clr_masked(desc);
}
--
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