i2c: nomadik: adopt pinctrl support
authorPatrice Chotard <patrice.chotard@stericsson.com>
Thu, 24 Jan 2013 08:47:22 +0000 (09:47 +0100)
committerWolfram Sang <w.sang@pengutronix.de>
Mon, 28 Jan 2013 04:26:43 +0000 (05:26 +0100)
commit24e9e157d5197e469a414d0f52ce04e8b539a715
treeb69ab7d12fa3a118c84e696c8ba4cc29ae43bade
parent631056c399d2bdf34ee147c99401fee093ee4bfe
i2c: nomadik: adopt pinctrl support

Amend the I2C nomadik pin controller to optionally take a pin control
handle and set the state of the pins to:

- "default" on boot, resume and before performing an i2c transfer
- "idle" after initial default, after resume default, and after each
   i2c xfer
- "sleep" on suspend()

This should make it possible to optimize energy usage for the pins
both for the suspend/resume cycle, and for runtime cases inbetween
I2C transfers.

Signed-off-by: Patrice Chotard <patrice.chotard@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
[wsa: fixed braces on one else-branch]
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
drivers/i2c/busses/i2c-nomadik.c