diff options
| author | Marek Vasut <marex@denx.de> | 2013-04-14 14:35:48 -0400 |
|---|---|---|
| committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-04-18 18:40:07 -0400 |
| commit | 360e64d8bbe7c78784d769a60d152804f5079577 (patch) | |
| tree | 44a1e15f1551d348a6492d997c310a114d78e943 /include/linux | |
| parent | 20fb277250816d6c3ff326552be0fea4173fd8ca (diff) | |
mfd: ucb1400: Pass ucb1400-gpio data through ac97 bus
Cc: Jean Delvare <jdelvare@suse.de>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/ucb1400.h | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/include/linux/ucb1400.h b/include/linux/ucb1400.h index d21b33c4c6ca..2e9ee4d1c676 100644 --- a/include/linux/ucb1400.h +++ b/include/linux/ucb1400.h | |||
| @@ -83,15 +83,12 @@ | |||
| 83 | #define UCB_ID 0x7e | 83 | #define UCB_ID 0x7e |
| 84 | #define UCB_ID_1400 0x4304 | 84 | #define UCB_ID_1400 0x4304 |
| 85 | 85 | ||
| 86 | struct ucb1400_gpio_data { | ||
| 87 | int gpio_offset; | ||
| 88 | int (*gpio_setup)(struct device *dev, int ngpio); | ||
| 89 | int (*gpio_teardown)(struct device *dev, int ngpio); | ||
| 90 | }; | ||
| 91 | |||
| 92 | struct ucb1400_gpio { | 86 | struct ucb1400_gpio { |
| 93 | struct gpio_chip gc; | 87 | struct gpio_chip gc; |
| 94 | struct snd_ac97 *ac97; | 88 | struct snd_ac97 *ac97; |
| 89 | int gpio_offset; | ||
| 90 | int (*gpio_setup)(struct device *dev, int ngpio); | ||
| 91 | int (*gpio_teardown)(struct device *dev, int ngpio); | ||
| 95 | }; | 92 | }; |
| 96 | 93 | ||
| 97 | struct ucb1400_ts { | 94 | struct ucb1400_ts { |
| @@ -110,6 +107,9 @@ struct ucb1400 { | |||
| 110 | 107 | ||
| 111 | struct ucb1400_pdata { | 108 | struct ucb1400_pdata { |
| 112 | int irq; | 109 | int irq; |
| 110 | int gpio_offset; | ||
| 111 | int (*gpio_setup)(struct device *dev, int ngpio); | ||
| 112 | int (*gpio_teardown)(struct device *dev, int ngpio); | ||
| 113 | }; | 113 | }; |
| 114 | 114 | ||
| 115 | static inline u16 ucb1400_reg_read(struct snd_ac97 *ac97, u16 reg) | 115 | static inline u16 ucb1400_reg_read(struct snd_ac97 *ac97, u16 reg) |
| @@ -162,10 +162,4 @@ static inline void ucb1400_adc_disable(struct snd_ac97 *ac97) | |||
| 162 | unsigned int ucb1400_adc_read(struct snd_ac97 *ac97, u16 adc_channel, | 162 | unsigned int ucb1400_adc_read(struct snd_ac97 *ac97, u16 adc_channel, |
| 163 | int adcsync); | 163 | int adcsync); |
| 164 | 164 | ||
| 165 | #ifdef CONFIG_GPIO_UCB1400 | ||
| 166 | void __init ucb1400_gpio_set_data(struct ucb1400_gpio_data *data); | ||
| 167 | #else | ||
| 168 | static inline void ucb1400_gpio_set_data(struct ucb1400_gpio_data *data) {} | ||
| 169 | #endif | ||
| 170 | |||
| 171 | #endif | 165 | #endif |
