Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1198642

Re: [PATCH 1/2] gpio: don't override irq_*_resources() callbacks

From Linus Walleij <linus.walleij@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH 1/2] gpio: don't override irq_*_resources() callbacks
Date 2015-08-03 11:00 +0200
Message-ID <pTjLc-6xC-5@gated-at.bofh.it> (permalink)
References <pShV7-5Ml-1@gated-at.bofh.it> <pSjWW-xJ-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Jul 31, 2015 at 4:54 PM, Grygorii Strashko
<grygorii.strashko@ti.com> wrote:
> On 07/31/2015 03:48 PM, Rabin Vincent wrote:

>> +     if (!irqchip->irq_request_resources &&
>> +         !irqchip->irq_release_resources) {
>> +             irqchip->irq_request_resources = gpiochip_irq_reqres;
>> +             irqchip->irq_release_resources = gpiochip_irq_relres;
>> +     }
>
> I think, it will be better to handle req/rel cases separately.

No, I think that could be dangerous. The semantics of the both
functions are intertwined, if we change something in the core
we may break drivers.

It would be better with a mechanism saying "also do this
on irq_request/release resource" so a secondary vtable
for these two. Where the latter would be optional per-callback.

That way the ETRAXFS does not need to reimplement
irq locking.

I'll see what I can come up with.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH 1/2] gpio: don't override irq_*_resources() callbacks Linus Walleij <linus.walleij@linaro.org> - 2015-08-03 11:00 +0200

csiph-web