Re: [PATCH v2] pinctrl: queue GPIO operations instead of defering

From: Linus Walleij
Date: Wed Aug 21 2013 - 19:07:35 EST


On Mon, Aug 19, 2013 at 9:15 PM, Stephen Warren <swarren@xxxxxxxxxxxxx> wrote:
> On 08/17/2013 08:56 AM, Linus Walleij wrote:

>> and the pin controller need the GPIO driver to be ready.
>
> Why does that happen?

The pin controller call back into the GPIO-side controller
functions by utilizing the GPIO ranges.
(Maybe the code is silly, I dunno, check drivers/pinctrl/pinctrl-nomadik.c)

>> This also happens if
>> pin controllers and GPIO controllers compiled as modules
>> are inserted in a certain order.
>
> Shouldn't deferred probe resolve that just fine, assuming there are no
> circular dependencies?

The above leads to circular dependencies so that is what I'm
trying to fix with this.

>> On the Nomadik we get this situation with the pinctrl
>> driver when moving to requesting GPIOs off the gpiochip
>> right after it has been added,
>
> So, the pinctrl driver calls gpio_request()? Surely the solution is
> simply not to do that?

This is what the other patch we're discussing is doing.
The one that harvests and requests interrupt GPIO's when
a gpiochip is added...

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