Input: imx6ul_tsc - add support for sample averaging

The i.MX6UL internal touchscreen controller contains an option to
average upon samples. This feature reduces noise from the produced
touch locations.

This patch adds sample averaging support to the imx6ul_tsc device
driver.

Signed-off-by: Guy Shapiro <guy.shapiro@mobi-wize.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
Guy Shapiro
2016-11-27 20:40:39 -08:00
committed by Dmitry Torokhov
parent ae3b4469db
commit 031bfed2ab
2 changed files with 26 additions and 0 deletions

View File

@@ -17,6 +17,13 @@ Optional properties:
This value depends on the touch screen.
- pre-charge-time: the touch screen need some time to precharge.
This value depends on the touch screen.
- average-samples: Number of data samples which are averaged for each read.
Valid values 0-4
0 = 1 sample
1 = 4 samples
2 = 8 samples
3 = 16 samples
4 = 32 samples
Example:
tsc: tsc@02040000 {
@@ -32,5 +39,6 @@ Example:
xnur-gpio = <&gpio1 3 GPIO_ACTIVE_LOW>;
measure-delay-time = <0xfff>;
pre-charge-time = <0xffff>;
average-samples = <4>;
status = "okay";
};