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


Groups > linux.kernel > #1508010

Re: [PATCH v3] pinctrl: Add SX150X GPIO Extender Pinctrl Driver

From Neil Armstrong <narmstrong@baylibre.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3] pinctrl: Add SX150X GPIO Extender Pinctrl Driver
Date 2016-10-25 09:00 +0200
Message-ID <sw3Si-239-7@gated-at.bofh.it> (permalink)
References <suE9C-3xe-97@gated-at.bofh.it> <svhb0-3wE-5@gated-at.bofh.it> <svovL-8f6-1@gated-at.bofh.it> <svFwC-2Mn-11@gated-at.bofh.it> <svOzU-lR-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Linus,

Le 24/10/2016 16:39, Linus Walleij a écrit :
> On Mon, Oct 24, 2016 at 6:51 AM, Andrey Smirnov
> <andrew.smirnov@gmail.com> wrote:
> 
>> It seem strange to me that the driver uses "handle_edge_irq", given
>> how none of the individual interrupts seem to require any ACKing,
>> since it is all handled in sx150x_irq_thread_fn(), line 533. More so,
>> I had trouble finding who/where sets .irq_ack() callback, which AFAIU
>> is mandatory for handle_edge_irq().
> 
> Yes that looks strange.
> 
> Neil have you tested IRQs with this code?

To be frank, I took the IRQ code from the GPIO driver verbatim, and only tested
a simple use case on beagle bone black.
The interrupt code is very complex and sincerely I was not able to understand
clearly how it worked.

The IRQ_TYPE_EDGE_BOTH did work for me since the BBB irq controller dealt with it.

I will dig in the datasheet and run more uses cases next week, but since the
code hasn't changed since the GPIO driver, so this is a nice to have !

> 
> If there is trouble, please follow up with a fix for the edge handler.
> Maybe it should just be handle_simple_irq().
> 
> Yours,
> Linus Walleij
> 

Andrey, can we talk over irc somehow ? I'm idling as narmstrong on freenode.

Neil

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH v3] pinctrl: Add SX150X GPIO Extender Pinctrl Driver Linus Walleij <linus.walleij@linaro.org> - 2016-10-23 12:50 +0200
  Re: [PATCH v3] pinctrl: Add SX150X GPIO Extender Pinctrl Driver Andrey Smirnov <andrew.smirnov@gmail.com> - 2016-10-24 07:00 +0200
    Re: [PATCH v3] pinctrl: Add SX150X GPIO Extender Pinctrl Driver Linus Walleij <linus.walleij@linaro.org> - 2016-10-24 16:40 +0200
      Re: [PATCH v3] pinctrl: Add SX150X GPIO Extender Pinctrl Driver Neil Armstrong <narmstrong@baylibre.com> - 2016-10-25 09:00 +0200

csiph-web