Re: [PATCH] pinmux: 1 pin is not allowed to be configured for both GPIO and peripheral funtion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 26, 2015 at 8:41 AM, Sonic Zhang <sonic.adi@xxxxxxxxx> wrote:

> From: Sonic Zhang <sonic.zhang@xxxxxxxxxx>
>
> The blackfin pinmux and gpio controller doesn't allow user to set up 1 pin
> for both GPIO and peripheral function. So, check both gpio_owner and
> mux_owner before approving the pin request.
>
> Signed-off-by: Sonic Zhang <sonic.zhang@xxxxxxxxxx>

So since there are pin controllers that can do this even though your
pin controller can't, you cannot forbit it for everyone like this.

We have discussed adding a field to struct pinctrl_desc,
bool strict, that would make the core disallow GPIOs and
functions to be used on a pin at the same time.

So if this behaviour is desired for a certain pin controller then
implement it like so: add bool strict to the struct pinctrl_desc,
and only do the above strict check for pin controllers that set
it, and set it for your pin controller.

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




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux