aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd/mc13xxx.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mfd/mc13xxx.h')
-rw-r--r--include/linux/mfd/mc13xxx.h38
1 files changed, 36 insertions, 2 deletions
diff --git a/include/linux/mfd/mc13xxx.h b/include/linux/mfd/mc13xxx.h
index c064beaaccb..3816c2fac0a 100644
--- a/include/linux/mfd/mc13xxx.h
+++ b/include/linux/mfd/mc13xxx.h
@@ -37,6 +37,9 @@ int mc13xxx_irq_ack(struct mc13xxx *mc13xxx, int irq);
37 37
38int mc13xxx_get_flags(struct mc13xxx *mc13xxx); 38int mc13xxx_get_flags(struct mc13xxx *mc13xxx);
39 39
40int mc13xxx_adc_do_conversion(struct mc13xxx *mc13xxx,
41 unsigned int mode, unsigned int channel, unsigned int *sample);
42
40#define MC13XXX_IRQ_ADCDONE 0 43#define MC13XXX_IRQ_ADCDONE 0
41#define MC13XXX_IRQ_ADCBISDONE 1 44#define MC13XXX_IRQ_ADCBISDONE 1
42#define MC13XXX_IRQ_TS 2 45#define MC13XXX_IRQ_TS 2
@@ -137,17 +140,48 @@ struct mc13xxx_leds_platform_data {
137 char tc3_period; 140 char tc3_period;
138}; 141};
139 142
143struct mc13xxx_buttons_platform_data {
144#define MC13783_BUTTON_DBNC_0MS 0
145#define MC13783_BUTTON_DBNC_30MS 1
146#define MC13783_BUTTON_DBNC_150MS 2
147#define MC13783_BUTTON_DBNC_750MS 3
148#define MC13783_BUTTON_ENABLE (1 << 2)
149#define MC13783_BUTTON_POL_INVERT (1 << 3)
150#define MC13783_BUTTON_RESET_EN (1 << 4)
151 int b1on_flags;
152 unsigned short b1on_key;
153 int b2on_flags;
154 unsigned short b2on_key;
155 int b3on_flags;
156 unsigned short b3on_key;
157};
158
140struct mc13xxx_platform_data { 159struct mc13xxx_platform_data {
141#define MC13XXX_USE_TOUCHSCREEN (1 << 0) 160#define MC13XXX_USE_TOUCHSCREEN (1 << 0)
142#define MC13XXX_USE_CODEC (1 << 1) 161#define MC13XXX_USE_CODEC (1 << 1)
143#define MC13XXX_USE_ADC (1 << 2) 162#define MC13XXX_USE_ADC (1 << 2)
144#define MC13XXX_USE_RTC (1 << 3) 163#define MC13XXX_USE_RTC (1 << 3)
145#define MC13XXX_USE_REGULATOR (1 << 4)
146#define MC13XXX_USE_LED (1 << 5)
147 unsigned int flags; 164 unsigned int flags;
148 165
149 struct mc13xxx_regulator_platform_data regulators; 166 struct mc13xxx_regulator_platform_data regulators;
150 struct mc13xxx_leds_platform_data *leds; 167 struct mc13xxx_leds_platform_data *leds;
168 struct mc13xxx_buttons_platform_data *buttons;
151}; 169};
152 170
171#define MC13XXX_ADC_MODE_TS 1
172#define MC13XXX_ADC_MODE_SINGLE_CHAN 2
173#define MC13XXX_ADC_MODE_MULT_CHAN 3
174
175#define MC13XXX_ADC0 43
176#define MC13XXX_ADC0_ADREFEN (1 << 10)
177#define MC13XXX_ADC0_TSMOD0 (1 << 12)
178#define MC13XXX_ADC0_TSMOD1 (1 << 13)
179#define MC13XXX_ADC0_TSMOD2 (1 << 14)
180#define MC13XXX_ADC0_ADINC1 (1 << 16)
181#define MC13XXX_ADC0_ADINC2 (1 << 17)
182
183#define MC13XXX_ADC0_TSMOD_MASK (MC13XXX_ADC0_TSMOD0 | \
184 MC13XXX_ADC0_TSMOD1 | \
185 MC13XXX_ADC0_TSMOD2)
186
153#endif /* ifndef __LINUX_MFD_MC13XXX_H */ 187#endif /* ifndef __LINUX_MFD_MC13XXX_H */