spi/pl022: adopt pinctrl support
authorPatrice Chotard <patrice.chotard@stericsson.com>
Wed, 19 Sep 2012 12:23:46 +0000 (14:23 +0200)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 20 Sep 2012 13:02:53 +0000 (09:02 -0400)
commit4f5e1b370845a0a5789ff7271004ca49e5baa46f
tree9af15a890152ad9970c5a24d1aa135d4828a19c8
parentd7b4394e780b02511c8a7a499380cdd56316c770
spi/pl022: adopt pinctrl support

Amend the PL022 pin controller to optionally take a pin control
handle and set the state of the pins to "default" on boot and
runtime resume, and to "sleep" at runtime suspend. This way we
will dynamically save power on the SPI busses, for example some
electronic designs may be able to ground the pins when unused
instead of pull-up. Some pin controllers may want to set the
pins as wake-up sources when sleeping.

Effect on platforms using the PL022 driver:

- If the platform does not use pin control - no semantic effect,
  the pinctrl stubs will kick in and resolve the situation.

- Platforms using this driver and have pin control but no
  function defined for the PL022 need to either supply a
  "default" function in their map or enable pinctrl dummies
  so the driver is satisfied.

- Platforms using this driver with hogs for setting up the PL022
  pin control - stop using hogs to take the pl022 pin control
  handle, let the driver handle this.

I'be looked at some platforms that may be affected:

- SPEAr: appears to define the proper functions in their device
  trees and not hogging them, so things should be smooth, the
  driver will simply start to take its pins.

- Ux500: the proper function is defined and will be taken properly
  by the driver. New sleep states introduced by a separate patch to
  ux500 but no regression, since the default state is sufficient.

- U300: old hog deleted as part of this patch.

- LPC32xx: does not appear to be using pinctrl.

- ARM Integrator IMPD1, RealView & Versatile: does not use pinctrl.

Tested-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: Patrice Chotard <patrice.chotard@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
arch/arm/mach-u300/core.c
drivers/spi/spi-pl022.c
This page took 0.026401 seconds and 5 git commands to generate.