mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-08-27 06:50:37 +00:00

The I2C core now provides a debugfs entry for each client. Let this driver use it instead of the custom directory in debugfs root. Further improvements by this change: support of multiple instances. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://lore.kernel.org/r/20250318091904.22468-1-wsa+renesas@sang-engineering.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
72 lines
2.5 KiB
ReStructuredText
72 lines
2.5 KiB
ReStructuredText
EDT ft5x06 based Polytouch devices
|
|
----------------------------------
|
|
|
|
The edt-ft5x06 driver is useful for the EDT "Polytouch" family of capacitive
|
|
touch screens. Note that it is *not* suitable for other devices based on the
|
|
focaltec ft5x06 devices, since they contain vendor-specific firmware. In
|
|
particular this driver is not suitable for the Nook tablet.
|
|
|
|
It has been tested with the following devices:
|
|
* EP0350M06
|
|
* EP0430M06
|
|
* EP0570M06
|
|
* EP0700M06
|
|
|
|
The driver allows configuration of the touch screen via a set of sysfs files:
|
|
|
|
/sys/class/input/eventX/device/device/threshold:
|
|
allows setting the "click"-threshold in the range from 0 to 80.
|
|
|
|
/sys/class/input/eventX/device/device/gain:
|
|
allows setting the sensitivity in the range from 0 to 31. Note that
|
|
lower values indicate higher sensitivity.
|
|
|
|
/sys/class/input/eventX/device/device/offset:
|
|
allows setting the edge compensation in the range from 0 to 31.
|
|
|
|
/sys/class/input/eventX/device/device/report_rate:
|
|
allows setting the report rate in the range from 3 to 14.
|
|
|
|
|
|
For debugging purposes the driver provides a few files in the debug
|
|
filesystem (if available in the kernel). They are located in:
|
|
|
|
/sys/kernel/debug/i2c/<i2c-bus>/<i2c-device>/
|
|
|
|
If you don't know the bus and device numbers, you can look them up with this
|
|
command:
|
|
|
|
$ ls -l /sys/bus/i2c/drivers/edt_ft5x06
|
|
|
|
The dereference of the symlink will contain the needed information. You will
|
|
need the last two elements of its path:
|
|
|
|
0-0038 -> ../../../../devices/platform/soc/fcfee800.i2c/i2c-0/0-0038
|
|
|
|
So in this case, the location for the debug files is:
|
|
|
|
/sys/kernel/debug/i2c/i2c-0/0-0038/
|
|
|
|
There, you'll find the following files:
|
|
|
|
num_x, num_y:
|
|
(readonly) contains the number of sensor fields in X- and
|
|
Y-direction.
|
|
|
|
mode:
|
|
allows switching the sensor between "factory mode" and "operation
|
|
mode" by writing "1" or "0" to it. In factory mode (1) it is
|
|
possible to get the raw data from the sensor. Note that in factory
|
|
mode regular events don't get delivered and the options described
|
|
above are unavailable.
|
|
|
|
raw_data:
|
|
contains num_x * num_y big endian 16 bit values describing the raw
|
|
values for each sensor field. Note that each read() call on this
|
|
files triggers a new readout. It is recommended to provide a buffer
|
|
big enough to contain num_x * num_y * 2 bytes.
|
|
|
|
Note that reading raw_data gives a I/O error when the device is not in factory
|
|
mode. The same happens when reading/writing to the parameter files when the
|
|
device is not in regular operation mode.
|