diff options
Diffstat (limited to 'include/linux/ucb1400.h')
-rw-r--r-- | include/linux/ucb1400.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/ucb1400.h b/include/linux/ucb1400.h index ae779bb8cc0f..adb44066680c 100644 --- a/include/linux/ucb1400.h +++ b/include/linux/ucb1400.h | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <sound/ac97_codec.h> | 26 | #include <sound/ac97_codec.h> |
27 | #include <linux/mutex.h> | 27 | #include <linux/mutex.h> |
28 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
29 | #include <linux/gpio.h> | ||
29 | 30 | ||
30 | /* | 31 | /* |
31 | * UCB1400 AC-link registers | 32 | * UCB1400 AC-link registers |
@@ -82,6 +83,17 @@ | |||
82 | #define UCB_ID 0x7e | 83 | #define UCB_ID 0x7e |
83 | #define UCB_ID_1400 0x4304 | 84 | #define UCB_ID_1400 0x4304 |
84 | 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 { | ||
93 | struct gpio_chip gc; | ||
94 | struct snd_ac97 *ac97; | ||
95 | }; | ||
96 | |||
85 | struct ucb1400_ts { | 97 | struct ucb1400_ts { |
86 | struct input_dev *ts_idev; | 98 | struct input_dev *ts_idev; |
87 | struct task_struct *ts_task; | 99 | struct task_struct *ts_task; |
@@ -95,6 +107,7 @@ struct ucb1400_ts { | |||
95 | 107 | ||
96 | struct ucb1400 { | 108 | struct ucb1400 { |
97 | struct platform_device *ucb1400_ts; | 109 | struct platform_device *ucb1400_ts; |
110 | struct platform_device *ucb1400_gpio; | ||
98 | }; | 111 | }; |
99 | 112 | ||
100 | static inline u16 ucb1400_reg_read(struct snd_ac97 *ac97, u16 reg) | 113 | static inline u16 ucb1400_reg_read(struct snd_ac97 *ac97, u16 reg) |
@@ -147,4 +160,10 @@ static inline void ucb1400_adc_disable(struct snd_ac97 *ac97) | |||
147 | unsigned int ucb1400_adc_read(struct snd_ac97 *ac97, u16 adc_channel, | 160 | unsigned int ucb1400_adc_read(struct snd_ac97 *ac97, u16 adc_channel, |
148 | int adcsync); | 161 | int adcsync); |
149 | 162 | ||
163 | #ifdef CONFIG_GPIO_UCB1400 | ||
164 | void __init ucb1400_gpio_set_data(struct ucb1400_gpio_data *data); | ||
165 | #else | ||
166 | static inline void ucb1400_gpio_set_data(struct ucb1400_gpio_data *data) {} | ||
167 | #endif | ||
168 | |||
150 | #endif | 169 | #endif |