diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-04-04 11:04:42 +0900 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-05-26 19:45:18 +0200 |
commit | 0b14c22ea1e0226d894df76176971d06e8886aa7 (patch) | |
tree | 1d7ee5b2bc74607c4d328e14c30692114fafe5f4 /include/linux/mfd/wm831x | |
parent | 8997619a045bef5d138f0f45141a398557f809e6 (diff) | |
download | op-kernel-dev-0b14c22ea1e0226d894df76176971d06e8886aa7.zip op-kernel-dev-0b14c22ea1e0226d894df76176971d06e8886aa7.tar.gz |
mfd: Provide platform data for WM831x GPIO configuration
Allow the GPIO mode of WM831x devices to be configured using platform data.
Users may provide a table of GPIO register values in gpio_defaults[]. In
order to allow 0 to be set explicitly out of range values are accepted and
masked off, with a WM831X_GPIO_CONFIGURE define provided to set an out of
range value.
This can be used to configure higher numbered GPIOs or override values set
in OTP for GPIOs configured using OTP.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/linux/mfd/wm831x')
-rw-r--r-- | include/linux/mfd/wm831x/pdata.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/mfd/wm831x/pdata.h b/include/linux/mfd/wm831x/pdata.h index 632d156..ff42d70 100644 --- a/include/linux/mfd/wm831x/pdata.h +++ b/include/linux/mfd/wm831x/pdata.h @@ -105,6 +105,9 @@ struct wm831x_watchdog_pdata { #define WM831X_MAX_LDO 11 #define WM831X_MAX_ISINK 2 +#define WM831X_GPIO_CONFIGURE 0x10000 +#define WM831X_GPIO_NUM 16 + struct wm831x_pdata { /** Used to distinguish multiple WM831x chips */ int wm831x_num; @@ -119,6 +122,7 @@ struct wm831x_pdata { int irq_base; int gpio_base; + int gpio_defaults[WM831X_GPIO_NUM]; struct wm831x_backlight_pdata *backlight; struct wm831x_backup_pdata *backup; struct wm831x_battery_pdata *battery; |