d01acaca4677614db55a957a605e8f229b2e7140
[openwrt.git] / target / linux / s3c24xx / patches-2.6.31 / 052-touchscreen_filter.patch
1 From 2709e2e76025aa69d768a80d66ef1852dde7abc8 Mon Sep 17 00:00:00 2001
2 From: Lars-Peter Clausen <lars@metafoo.de>
3 Date: Tue, 21 Jul 2009 12:44:57 +0200
4 Subject: [PATCH] 052-touchscreen_filter.patch
5
6 ---
7  drivers/input/touchscreen/Kconfig  |   48 ++++++++++++++++++++++++++++++++++++
8  drivers/input/touchscreen/Makefile |    5 +++
9  2 files changed, 53 insertions(+), 0 deletions(-)
10
11 diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
12 index 2bb711f..2b78885 100644
13 --- a/drivers/input/touchscreen/Kconfig
14 +++ b/drivers/input/touchscreen/Kconfig
15 @@ -11,6 +11,54 @@ menuconfig INPUT_TOUCHSCREEN
16  
17  if INPUT_TOUCHSCREEN
18  
19 +menuconfig TOUCHSCREEN_FILTER
20 +       boolean "Touchscreen Filtering"
21 +       depends on INPUT_TOUCHSCREEN
22 +       select TOUCHSCREEN_FILTER_GROUP
23 +       select TOUCHSCREEN_FILTER_MEDIAN
24 +       select TOUCHSCREEN_FILTER_MEAN
25 +       select TOUCHSCREEN_FILTER_LINEAR
26 +       help
27 +         Select this to include kernel touchscreen filter support.  The filters
28 +         can be combined in any order in your machine init and the parameters
29 +         for them can also be set there.
30 +
31 +if TOUCHSCREEN_FILTER
32 +
33 +config TOUCHSCREEN_FILTER_GROUP
34 +       bool "Group Touchscreen Filter"
35 +       depends on INPUT_TOUCHSCREEN && TOUCHSCREEN_FILTER
36 +       default Y
37 +       help
38 +         Say Y here if you want to use the Group touchscreen filter, it
39 +         avoids using atypical samples.
40 +
41 +config TOUCHSCREEN_FILTER_MEDIAN
42 +       bool "Median Average Touchscreen Filter"
43 +       depends on INPUT_TOUCHSCREEN && TOUCHSCREEN_FILTER
44 +       default Y
45 +       help
46 +         Say Y here if you want to use the Median touchscreen filter, it's
47 +         highly effective if you data is noisy with occasional excursions.
48 +
49 +config TOUCHSCREEN_FILTER_MEAN
50 +       bool "Mean Average Touchscreen Filter"
51 +       depends on INPUT_TOUCHSCREEN && TOUCHSCREEN_FILTER
52 +       default Y
53 +       help
54 +         Say Y here if you want to use the Mean touchscreen filter, it
55 +         can further improve decent quality data by removing jitter
56 +
57 +config TOUCHSCREEN_FILTER_LINEAR
58 +       bool "Linear Touchscreen Filter"
59 +       depends on INPUT_TOUCHSCREEN && TOUCHSCREEN_FILTER
60 +       default Y
61 +       help
62 +         Say Y here if you want to use the Linear touchscreen filter, it
63 +         enables the use of calibration data for the touchscreen.
64 +
65 +endif
66 +
67  config TOUCHSCREEN_ADS7846
68         tristate "ADS7846/TSC2046 and ADS7843 based touchscreens"
69         depends on SPI_MASTER
70 diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile
71 index 269814c..538e035 100644
72 --- a/drivers/input/touchscreen/Makefile
73 +++ b/drivers/input/touchscreen/Makefile
74 @@ -41,3 +41,8 @@ obj-$(CONFIG_TOUCHSCREEN_WM97XX_MAINSTONE)    += mainstone-wm97xx.o
75  obj-$(CONFIG_TOUCHSCREEN_WM97XX_ZYLONITE)      += zylonite-wm97xx.o
76  obj-$(CONFIG_TOUCHSCREEN_W90X900)      += w90p910_ts.o
77  obj-$(CONFIG_TOUCHSCREEN_S3C2410)      += s3c2410_ts.o
78 +obj-$(CONFIG_TOUCHSCREEN_FILTER)       += ts_filter_chain.o
79 +obj-$(CONFIG_TOUCHSCREEN_FILTER_GROUP) += ts_filter_group.o
80 +obj-$(CONFIG_TOUCHSCREEN_FILTER_LINEAR)        += ts_filter_linear.o
81 +obj-$(CONFIG_TOUCHSCREEN_FILTER_MEDIAN)        += ts_filter_median.o
82 +obj-$(CONFIG_TOUCHSCREEN_FILTER_MEAN)  += ts_filter_mean.o
83 -- 
84 1.5.6.5
85