pinctrl/nomadik: implement pin configuration
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 3 May 2012 13:58:12 +0000 (15:58 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 11 May 2012 09:14:16 +0000 (11:14 +0200)
commitd41af627638a0e1e964d546e385b20650e769ce5
tree8d720bf186fe6db5574016a108c1adada1b38751
parentdbfe8ca259e1f899ca02ea33d903fa21bbea67c5
pinctrl/nomadik: implement pin configuration

This implements the pin configuration interface for the
Nomadik pin controller.

As part of the exercise we add a bit in the pin_cfg_t for
the Nomadik pinctrl driver that indicates if the pin should
be forced into GPIO mode. This is not done to go behind the
back of the GPIO subsystem, but to ensure that default modes
can be set by hogs on boot and system suspend/resume states.
It was used implicitly by the old code defining all config
settings and modes in a single config word but we now have
a split between pinmux and pinconf leading to the need to
have this.

We also add a bit for explicitly setting sleepmode of the
pin. This was previously handled by custom calls with the
_sleep() suffix, but we now have one single interface into
the configuration so we replace this with a bit indicating
that the pin shall be configured into sleep mode.

Some of the configuration can be refactored later to use
less custom fields on the pin_cfg_t but we are currently
leaving the old function calls in place so we stay
compatible.

ChangeLog v1->v2:
- Drop a hunk changing pinmuxing for GPIO and move it
  over to the preceding pinmux patch.

Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
arch/arm/plat-nomadik/include/plat/pincfg.h
drivers/pinctrl/Kconfig
drivers/pinctrl/pinctrl-nomadik.c