Issue with gpio and pinmux
Linus Walleij
linus.walleij at linaro.org
Thu Jul 25 05:37:52 EDT 2013
On Sun, Jul 21, 2013 at 5:44 AM, Stephen Warren <swarren at wwwdotorg.org> wrote:
> Actually, a better way to do (c) might be to just add an extra "op" to
> struct pinmux_ops; something like validate_gpio_mux(), passing in
> information such as whether a mux function is in effect on that pin,
> whether the pin is already claimed as a GPIO, and whether the function
> is being called to check a GPIO-claim or mux-claim operation . If the op
> is missing, no "dual claim" is allowed. If the op is present, the code
> in the op validates whether the particular GPIO is allowed to be claimed
> while the particular mux function is active.
>
> That way, I think any driver that doesn't want to allow dual-claim
> doesn't have to do anything, but the few drivers that do can code up
> whatever algorithm they want; for Tegra, I'd just allow everything for
> simplicity, but we could always enhance that later if we want.
You are right, this would be an elegant solution.
Christian, are you interested in coding this up?
Yours,
Linus Walleij
More information about the linux-arm-kernel
mailing list