pinctrl discussions @ Linaro Connect, and also requesting GPIOs

From: Stephen Warren
Date: Wed Nov 09 2011 - 15:34:33 EST


Linus,

I'm curious about any pinctrl-related discussions that happened at Linaro
Connect. Are you able to summarize any discussions/decisions, or point me
at some existing summary? Especially anything to do with the new pin config
options, possibly extending the mapping table to control them, etc.

On the topic of pinctrl:

Many drivers currently call gpio_request(). This is defined /not/ to
perform any pinmux manipulation. On Tegra, the pinmux is set up due to
board files calling tegra_gpio_enable() before probing drivers. I'm
wondering:

a) Should drivers explicitly call pinmux_request_gpio() before calling
gpio_request() instead, so that the board files don't have to set this up
first?

b) Shouldn't this be hidden inside the pinctrl's mapping table; if a driver
needs to set up non-GPIO pinmux options, it's all done in pinmux_get() and
pinmux_enable(), whereas for GPIOs they need to use the other API. Can we
unify this?

I think extending the mapping table to be able to represent either the
existing mux configuration, or GPIO allocation, might make sense. In fact,
if we do that, perhaps pinmux_{request,free}_gpio() wouldn't even be needed?

What are your thoughts?

--
nvpublic

--
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/