Re: [PATCHv3 4/5] Input: EXC3000: Add support to query model and fw_version
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2020-05-20 17:49:59
Also in:
lkml
Hi Sebastian, On Wed, May 20, 2020 at 05:39:35PM +0200, Sebastian Reichel wrote:
quoted hunk ↗ jump to hunk
Expose model and fw_version via sysfs. Also query the model in probe to make sure, that the I2C communication with the device works before successfully probing the driver. This is a bit complicated, since EETI devices do not have a sync interface. Sending the commands and directly reading does not work. Sending the command and waiting for some time is also not an option, since there might be touch events in the mean time. Last but not least we do not cache the results, since this interface can be used to check the I2C communication is still working as expected. Signed-off-by: Sebastian Reichel <redacted> --- .../ABI/testing/sysfs-driver-input-exc3000 | 15 ++ drivers/input/touchscreen/exc3000.c | 145 +++++++++++++++++- 2 files changed, 159 insertions(+), 1 deletion(-) create mode 100644 Documentation/ABI/testing/sysfs-driver-input-exc3000diff --git a/Documentation/ABI/testing/sysfs-driver-input-exc3000 b/Documentation/ABI/testing/sysfs-driver-input-exc3000 new file mode 100644 index 000000000000..d79da4f869af --- /dev/null +++ b/Documentation/ABI/testing/sysfs-driver-input-exc3000@@ -0,0 +1,15 @@ +What: /sys/class/input/inputX/fw_version +Date: May 2020 +Contact: linux-input@vger.kernel.org +Description: Reports the firmware version provided by the touchscreen, for example "00_T6" on a EXC80H60 + + Access: Read + Valid values: Represented as string + +What: /sys/class/input/inputX/model +Date: May 2020 +Contact: linux-input@vger.kernel.org +Description: Reports the model identification provided by the touchscreen, for example "Orion_1320" on a EXC80H60 + + Access: Read + Valid values: Represented as string
These are properties of the controller (i2c device), not input abstraction class on top of it, so the attributes should be attached to i2c_client instance. Please use devm_device_add_group() in probe to instantiate them at the proper level. Thanks. -- Dmitry