Re: [PATCH 4/9] pinctrl: meson: allow gpio to request irq
From: Linus Walleij <hidden>
Date: 2016-10-25 18:10:04
Also in:
linux-amlogic, linux-arm-kernel, linux-gpio, lkml
From: Linus Walleij <hidden>
Date: 2016-10-25 18:10:04
Also in:
linux-amlogic, linux-arm-kernel, linux-gpio, lkml
On Tue, Oct 25, 2016 at 4:47 PM, Marc Zyngier [off-list ref] wrote:
On 25/10/16 15:22, Jerome Brunet wrote:
quoted
There is a few problems to guarantee that gpio == hwirq. 1. We have 2 instances of pinctrl, to guarantee that the linux gpio number == hwirq, we would have to guarantee the order in which they are probed. At least this my understandingMaybe I wasn't clear enough, and my use of gpio is probably wrong. So Linux has a gpio number, which is obviously an abstract number (just like the Linux irq number). But the pad number, in the context of given SoC, is constant. So we have: pad->gpio hwirq->irq Why can't you have pad == hwirq, always? This is already what you have in the irqchip driver. This would simplify a lot of things.
My thought as well. We usually refer to the local numberspace on the GPIO controller as "offsets", so line offsets 0...31 on a gpiochip with 31 lines. The ngpio in struct gpio_chip is the number of lines on that controller, and should nominally map 1:1 to hwirq sources. Yours, Linus Walleij