summaryrefslogtreecommitdiffstats
path: root/include/linux/mfd/mc13xxx.h
diff options
context:
space:
mode:
authorMichael Thalmeier <michael.thalmeier@hale.at>2012-02-20 12:18:13 +0100
committerSamuel Ortiz <sameo@linux.intel.com>2012-03-06 18:46:30 +0100
commit1039d762d03b573de4d46603c8583051c6d79094 (patch)
tree4de96496e62cb391cc824d7dbe328d0818f213d8 /include/linux/mfd/mc13xxx.h
parent4d75dd61dfb53eaa286c54fb121e5b51b106c272 (diff)
downloadtalos-obmc-linux-1039d762d03b573de4d46603c8583051c6d79094.tar.gz
talos-obmc-linux-1039d762d03b573de4d46603c8583051c6d79094.zip
mfd: Add pdata to set mc13783-ts conversion delay
MC13783 can be programmed to wait some clock cycles between the touchscreen polarization and the resistance conversion. This is needed to adjust for touchscreens with high capacitance between plates. Signed-off-by: Michael Thalmeier <michael.thalmeier@hale.at> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/linux/mfd/mc13xxx.h')
-rw-r--r--include/linux/mfd/mc13xxx.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/linux/mfd/mc13xxx.h b/include/linux/mfd/mc13xxx.h
index b86ee45c8b03..10e038bac8dd 100644
--- a/include/linux/mfd/mc13xxx.h
+++ b/include/linux/mfd/mc13xxx.h
@@ -38,7 +38,8 @@ int mc13xxx_irq_ack(struct mc13xxx *mc13xxx, int irq);
int mc13xxx_get_flags(struct mc13xxx *mc13xxx);
int mc13xxx_adc_do_conversion(struct mc13xxx *mc13xxx,
- unsigned int mode, unsigned int channel, unsigned int *sample);
+ unsigned int mode, unsigned int channel,
+ u8 ato, bool atox, unsigned int *sample);
#define MC13XXX_IRQ_ADCDONE 0
#define MC13XXX_IRQ_ADCBISDONE 1
@@ -157,6 +158,18 @@ struct mc13xxx_buttons_platform_data {
unsigned short b3on_key;
};
+struct mc13xxx_ts_platform_data {
+ /* Delay between Touchscreen polarization and ADC Conversion.
+ * Given in clock ticks of a 32 kHz clock which gives a granularity of
+ * about 30.5ms */
+ u8 ato;
+
+#define MC13783_TS_ATO_FIRST false
+#define MC13783_TS_ATO_EACH true
+ /* Use the ATO delay only for the first conversion or for each one */
+ bool atox;
+};
+
struct mc13xxx_platform_data {
#define MC13XXX_USE_TOUCHSCREEN (1 << 0)
#define MC13XXX_USE_CODEC (1 << 1)
@@ -167,6 +180,7 @@ struct mc13xxx_platform_data {
struct mc13xxx_regulator_platform_data regulators;
struct mc13xxx_leds_platform_data *leds;
struct mc13xxx_buttons_platform_data *buttons;
+ struct mc13xxx_ts_platform_data touch;
};
#define MC13XXX_ADC_MODE_TS 1
OpenPOWER on IntegriCloud