Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: edt-ft5x06 - increase allowed data range for threshold parameter

The datasheet and application note does not mention an allowed range for
the M09_REGISTER_THRESHOLD parameter. One of our customers needs to set
lower values than 20 and they seem to work just fine on EDT EP0xx0M09 with
T5x06 touch.

So, lacking a known lower limit, we increase the range for thresholds,
and set the lower limit to 0. The documentation is updated accordingly.

Signed-off-by: Schoefegger Stefan <stefan.schoefegger@ginzinger.com>
Signed-off-by: Manfred Schlaegl <manfred.schlaegl@ginzinger.com>
Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Martin Kepplinger and committed by
Dmitry Torokhov
aa3d4409 3af92561

+3 -3
+1 -1
Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt
··· 36 36 control gpios 37 37 38 38 - threshold: allows setting the "click"-threshold in the range 39 - from 20 to 80. 39 + from 0 to 80. 40 40 41 41 - gain: allows setting the sensitivity in the range from 0 to 42 42 31. Note that lower values indicate higher
+1 -1
Documentation/input/devices/edt-ft5x06.rst
··· 15 15 The driver allows configuration of the touch screen via a set of sysfs files: 16 16 17 17 /sys/class/input/eventX/device/device/threshold: 18 - allows setting the "click"-threshold in the range from 20 to 80. 18 + allows setting the "click"-threshold in the range from 0 to 80. 19 19 20 20 /sys/class/input/eventX/device/device/gain: 21 21 allows setting the sensitivity in the range from 0 to 31. Note that
+1 -1
drivers/input/touchscreen/edt-ft5x06.c
··· 471 471 static EDT_ATTR(offset, S_IWUSR | S_IRUGO, WORK_REGISTER_OFFSET, 472 472 M09_REGISTER_OFFSET, 0, 31); 473 473 static EDT_ATTR(threshold, S_IWUSR | S_IRUGO, WORK_REGISTER_THRESHOLD, 474 - M09_REGISTER_THRESHOLD, 20, 80); 474 + M09_REGISTER_THRESHOLD, 0, 80); 475 475 static EDT_ATTR(report_rate, S_IWUSR | S_IRUGO, WORK_REGISTER_REPORT_RATE, 476 476 NO_REGISTER, 3, 14); 477 477