summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPatil, Rachna <rachna@ti.com>2013-01-24 03:45:06 +0000
committerSebastian Andrzej Siewior <bigeasy@linutronix.de>2013-06-12 18:36:29 +0200
commitbb76dc09ddfc135c6c5e8eb7d3c583bfa8bdd439 (patch)
tree1cbdb08a710c589beac33bc47a7821a14bacd3ab /include
parentabeccee40320245a2a6a006dc8466a703cbd1d5e (diff)
downloadlinux-bb76dc09ddfc135c6c5e8eb7d3c583bfa8bdd439.tar.gz
linux-bb76dc09ddfc135c6c5e8eb7d3c583bfa8bdd439.tar.bz2
linux-bb76dc09ddfc135c6c5e8eb7d3c583bfa8bdd439.zip
input: ti_am33x_tsc: Order of TSC wires, made configurable
The current driver expected touchscreen input wires(XP,XN,YP,YN) to be connected in a particular order. Making changes to accept this as platform data. Sebastian reworked the original patch and removed a lot of the not required pieces. Signed-off-by: Patil, Rachna <rachna@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/input/ti_am335x_tsc.h12
-rw-r--r--include/linux/mfd/ti_am335x_tscadc.h3
2 files changed, 12 insertions, 3 deletions
diff --git a/include/linux/input/ti_am335x_tsc.h b/include/linux/input/ti_am335x_tsc.h
index 49269a2aa329..6a66b4d1ac2c 100644
--- a/include/linux/input/ti_am335x_tsc.h
+++ b/include/linux/input/ti_am335x_tsc.h
@@ -12,12 +12,24 @@
* A step configured to read a single
* co-ordinate value, can be applied
* more number of times for better results.
+ * @wire_config: Different EVM's could have a different order
+ * for connecting wires on touchscreen.
+ * We need to provide an 8 bit number where in
+ * the 1st four bits represent the analog lines
+ * and the next 4 bits represent positive/
+ * negative terminal on that input line.
+ * Notations to represent the input lines and
+ * terminals resoectively is as follows:
+ * AIN0 = 0, AIN1 = 1 and so on till AIN7 = 7.
+ * XP = 0, XN = 1, YP = 2, YN = 3.
+ *
*/
struct tsc_data {
int wires;
int x_plate_resistance;
int steps_to_configure;
+ int wire_config[10];
};
#endif
diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h
index 4258627d076a..e36ae4184917 100644
--- a/include/linux/mfd/ti_am335x_tscadc.h
+++ b/include/linux/mfd/ti_am335x_tscadc.h
@@ -71,8 +71,6 @@
#define STEPCONFIG_INM_ADCREFM STEPCONFIG_INM(8)
#define STEPCONFIG_INP_MASK (0xF << 19)
#define STEPCONFIG_INP(val) ((val) << 19)
-#define STEPCONFIG_INP_AN2 STEPCONFIG_INP(2)
-#define STEPCONFIG_INP_AN3 STEPCONFIG_INP(3)
#define STEPCONFIG_INP_AN4 STEPCONFIG_INP(4)
#define STEPCONFIG_INP_ADCREFM STEPCONFIG_INP(8)
#define STEPCONFIG_FIFO1 BIT(26)
@@ -94,7 +92,6 @@
#define STEPCHARGE_INM_AN1 STEPCHARGE_INM(1)
#define STEPCHARGE_INP_MASK (0xF << 19)
#define STEPCHARGE_INP(val) ((val) << 19)
-#define STEPCHARGE_INP_AN1 STEPCHARGE_INP(1)
#define STEPCHARGE_RFM_MASK (3 << 23)
#define STEPCHARGE_RFM(val) ((val) << 23)
#define STEPCHARGE_RFM_XNUR STEPCHARGE_RFM(1)