diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2008-10-10 10:58:12 -0400 |
---|---|---|
committer | Liam Girdwood <lrg@slimlogic.co.uk> | 2008-10-13 16:51:55 -0400 |
commit | 0e7203933224cbe09b5a9125f55b177b8dd5b1bd (patch) | |
tree | a0353af32d8a45163885df722baa96c9090ec7a3 /include | |
parent | c661a0b92d487ac20cc9cddbb8f4d40e4dcdbec1 (diff) |
mfd: Add GPIO pin configuration support for WM8350
The WM8350 provides a number of user-configurable pins providing access
to various signals generated by the functions on the chip. These are
referred to as GPIO pins in the device documentation but in Linux terms
they are more general than that, providing configuration of alternate
functions.
This patch implements support for selecting the alternate functions for
these pins. They can also be used as GPIOs in the normal Linux sense -
a subsequent patch will add support for doing so.
This code was all written by Liam Girdwood and has had minor updates
and rearrangements by Mark Brown.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Ortiz <sameo@openedhand.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mfd/wm8350/gpio.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/mfd/wm8350/gpio.h b/include/linux/mfd/wm8350/gpio.h index 928aa6e91e36..c6cd2ca8854a 100644 --- a/include/linux/mfd/wm8350/gpio.h +++ b/include/linux/mfd/wm8350/gpio.h | |||
@@ -323,4 +323,14 @@ | |||
323 | #define WM8350_GP1_LVL 0x0002 | 323 | #define WM8350_GP1_LVL 0x0002 |
324 | #define WM8350_GP0_LVL 0x0001 | 324 | #define WM8350_GP0_LVL 0x0001 |
325 | 325 | ||
326 | struct wm8350; | ||
327 | |||
328 | int wm8350_gpio_config(struct wm8350 *wm8350, int gpio, int dir, int func, | ||
329 | int pol, int pull, int invert, int debounce); | ||
330 | |||
331 | /* | ||
332 | * GPIO Interrupts | ||
333 | */ | ||
334 | #define WM8350_IRQ_GPIO(x) (50 + x) | ||
335 | |||
326 | #endif | 336 | #endif |