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.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/mfd/mc13xxx.h b/include/linux/mfd/mc13xxx.h
index c064beaaccb7..6e7c0ac36d09 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
@@ -150,4 +153,20 @@ struct mc13xxx_platform_data {
150 struct mc13xxx_leds_platform_data *leds; 153 struct mc13xxx_leds_platform_data *leds;
151}; 154};
152 155
156#define MC13XXX_ADC_MODE_TS 1
157#define MC13XXX_ADC_MODE_SINGLE_CHAN 2
158#define MC13XXX_ADC_MODE_MULT_CHAN 3
159
160#define MC13XXX_ADC0 43
161#define MC13XXX_ADC0_ADREFEN (1 << 10)
162#define MC13XXX_ADC0_TSMOD0 (1 << 12)
163#define MC13XXX_ADC0_TSMOD1 (1 << 13)
164#define MC13XXX_ADC0_TSMOD2 (1 << 14)
165#define MC13XXX_ADC0_ADINC1 (1 << 16)
166#define MC13XXX_ADC0_ADINC2 (1 << 17)
167
168#define MC13XXX_ADC0_TSMOD_MASK (MC13XXX_ADC0_TSMOD0 | \
169 MC13XXX_ADC0_TSMOD1 | \
170 MC13XXX_ADC0_TSMOD2)
171
153#endif /* ifndef __LINUX_MFD_MC13XXX_H */ 172#endif /* ifndef __LINUX_MFD_MC13XXX_H */