summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen/exc3000.c
AgeCommit message (Collapse)AuthorFilesLines
2023-11-07Merge branch 'next' into for-linusDmitry Torokhov1-9/+3
Prepare input updates for 6.7 merge window.
2023-09-07Input: exc3000 - use device core to create driver-specific device attributesDmitry Torokhov1-9/+3
Instead of creating driver-specific device attributes with devm_device_add_group() have device core do this by setting up dev_groups pointer in the driver structure. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20230729005133.1095051-10-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-08-31Merge branch 'next' into for-linusDmitry Torokhov1-0/+7
Prepare input updates for 6.6 merge window.
2023-07-08Input: exc3000 - support power supply regulatorsMike Looijmans1-0/+7
Add power supply regulator support to the exc3000 devices. Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Link: https://lore.kernel.org/r/20230707131042.10795-2-mike.looijmans@topic.nl Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-07-05Input: exc3000 - add ACPI support for EXC80H60Andreas Helbech Kleist1-0/+10
EXC80H60 is used in Ambu aBox2 with ACPI _HID "EGA00001". Snippet of from "apcidump -b; iasl ssdt2.dat" on target: Device (TPL2) { Name (HID2, Zero) Name (_HID, "EGA00001") // _HID: Hardware ID Name (_CID, "PNP0C50" /* HID Protocol Device (I2C bus) */) // _CID: Compatible ID Name (_S0W, 0x04) // _S0W: S0 Device Wake State Name (SBFB, ResourceTemplate () Signed-off-by: Andreas Helbech Kleist <andreaskleist@gmail.com> Link: https://lore.kernel.org/r/20230705091817.1300928-1-andreaskleist@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-05-17Input: Switch i2c drivers back to use .probe()Uwe Kleine-König1-1/+1
After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new() call-back type"), all drivers being converted to .probe_new() and then 03c835f498b5 ("i2c: Switch .probe() to not take an id parameter") convert back to (the new) .probe() to be able to eventually drop .probe_new() from struct i2c_driver. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20230517164645.162294-1-u.kleine-koenig@pengutronix.de Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2023-02-04Input: exc3000 - properly stop timer on shutdownDmitry Torokhov1-0/+10
We need to stop the timer on driver unbind or probe failures, otherwise we get UAF/Oops. Fixes: 7e577a17f2ee ("Input: add I2C attached EETI EXC3000 multi touch driver") Reported-by: "Stahl, Michael" <mstahl@moba.de> Link: https://lore.kernel.org/r/Y9dK57BFqtlf8NmN@google.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2022-06-29Input: exc3000 - fix return value check of wait_for_completion_timeoutMiaoqian Lin1-3/+4
wait_for_completion_timeout() returns unsigned long not int. It returns 0 if timed out, and positive if completed. The check for <= 0 is ambiguous and should be == 0 here indicating timeout which is the only error case. Fixes: 102feb1ddfd0 ("Input: exc3000 - factor out vendor data request") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Link: https://lore.kernel.org/r/20220411105828.22140-1-linmq006@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2021-03-08Input: exc3000 - add type sysfs attributeLucas Stach1-0/+17
Add a sysfs attribute to query the type of the touchscreen device. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Link: https://lore.kernel.org/r/20210125182527.1225245-5-l.stach@pengutronix.de Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2021-03-08Input: exc3000 - fix firmware version query for device in bootloaderLucas Stach1-0/+14
If the device is stuck in bootloader (maybe due to blank or corrupted application firmware) it won't answer a query for the firmware version. Fall back to returning the bootloader version in that case. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Link: https://lore.kernel.org/r/20210125182527.1225245-4-l.stach@pengutronix.de Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2021-03-08Input: exc3000 - factor out vendor data requestLucas Stach1-68/+54
Factor out the vendor data i2c request handling to make it reusable for other functions. Also don't cache the model and firmware version string in the device private data as we never use the cached version, but always read from the device. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Link: https://lore.kernel.org/r/20210125182527.1225245-3-l.stach@pengutronix.de Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2021-03-08Input: exc3000 - split MT event handling from IRQ handlerLucas Stach1-53/+61
Split out the multitouch event handling into its own function to allow other events to be handled in the IRQ handler without disturbing the MT handling. Now that things are separated a bit more, stop treating vendor data requests special by cehcking for a locked mutex, but just look at the event ID to figure out if the message is a MT report or a vendor data query reply. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Link: https://lore.kernel.org/r/20210125182527.1225245-2-l.stach@pengutronix.de Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-08-07Input: exc3000 - add support to query model and fw_versionSebastian Reichel1-1/+147
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. Reviewed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Link: https://lore.kernel.org/r/20200805160520.456570-5-sebastian.reichel@collabora.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-08-07Input: exc3000 - add reset gpio supportSebastian Reichel1-0/+17
Add basic support for an optional reset gpio. Reviewed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Acked-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20200805160520.456570-4-sebastian.reichel@collabora.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-08-07Input: exc3000 - add EXC80H60 and EXC80H84 supportSebastian Reichel1-14/+66
This adds support for EXC80H60 and EXCH84 controllers, which use a different event type id and have two extra bits for the resolution (so the maximum is 16K instead of 4K). Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Acked-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20200805160520.456570-3-sebastian.reichel@collabora.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-07-07Input: exc3000 - switch to i2c's probe_new APISebastian Reichel1-3/+2
Switch to the "new" I2C probe API. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Reviewed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Link: https://lore.kernel.org/r/20200520153936.46869-3-sebastian.reichel@collabora.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-06-19treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500Thomas Gleixner1-4/+1
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-26Input: add I2C attached EETI EXC3000 multi touch driverAhmet Inan1-0/+223
The 3000 series have a new protocol which allows to report up to 5 points in a single 66 byte frame. One must always read in 66 byte frames. To support up to 10 points, two consecutive frames need to be read: The first frame says how many points until sync. The second frame must say zero points or both frames must be discarded. To be able to work with the higher 400KHz I2C bus rate, one must successfully send a special package prior _each_ read or the controller will refuse to cooperate. This is a minimal implementation based on egalax_i2c.c (which can be found on the internet) and egalax_ts.c but without the vendor interface and no power management support. Signed-off-by: Ahmet Inan <inan@distec.de> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>