summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen/elants_i2c.c
AgeCommit message (Collapse)Author
2015-12-19Input: elants_i2c - fix wake-on-touchJames Chen
When sending "SLEEP" command to the controller it ceases scanning completely and is unable to wake the system up from sleep, so if it is configured as a wakeup source we should simply configure interrupt for wakeup and rely on idle logic within the controller to reduce power consumption while it is not used. Signed-off-by: James Chen <james.chen@emc.com.tw> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-09-04Input: elants_i2c - extend the calibration timeout to 12 secondsJames Chen
The 23 inch device found in Chrome project buddy requires 9.2~10.5 seconds to complete calibration. Let's increase calibration timeout to 12 seconds to give the device enough time. Signed-off-by: James Chen <james.chen@emc.com.tw> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-13Input: elants_i2c - fix for devm_gpiod_get API changeStephen Rothwell
Flags are now mandatory for devm_gpiod_get(). So let's use proper flag to configure gpio for output instead of doing this by hand. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> [Dmitry: GPIOD_ASIS -> GPIOD_OUT_LOW] Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-07Input: elants_i2c - enable asynchronous probingDmitry Torokhov
It takes a bit of time to go through controller power up sequence and initialization. To not stall the overall boot progress let's probe the controller asynchronously, given that userspace is usually prepared for hot-plugging of input devices and thus does not rely on particular ordering. Signed-off-by: Dmitry Torokhov <dtor@chromium.org> Reviewed-by: Benson Leung <bleung@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-07Input: elants_i2c - wire up regulator supportDmitry Torokhov
Elan touchscreen controllers use two power supplies, vcc33 and vccio, and we need to enable them before trying to access the device. On X86 firmware usually does this, but on ARM it is usually left to the kernel. Signed-off-by: Dmitry Torokhov <dtor@chromium.org> Reviewed-by: Benson Leung <bleung@chromium.org> Reviewed-by: Scott Liu <scott.liu@emc.com.tw> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-05Input: elants_i2c - disable idle mode before updating firmwareJames Chen
If the device is in idle mode and is in the middle of a scan it may not have a chance to react to the reset and then IAP commands within required time interval and firmware update may fail. Let's bring the device out of idle mode before attempting to reset it so that the scan period is smaller and thus it can react to the command quicker. Signed-off-by: James Chen <james.chen@emc.com.tw> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-17Input: drop owner assignment from i2c_driverKrzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-04-20Input: elants_i2c - zero-extend hardware ID in firmware nameDmitry Torokhov
Let's zero-extend hardware id number when forming firmware file name, to avoid kernel requesting firmware like "elants_i2c_ 0.bin", which is quite unexpected. Acked-by: Charlie Mooney<charliemooney@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-03-11Input: elants_i2c - append hw_version to FW fileCharlie Mooney
Currently the elants_i2c driver simply requests a static filename /lib/firmware/elants_i2c.bin when it gets firmware updates. This is a problem if you have two Elan touchscreens using the same driver. If both touchscreens have different firmwares, you would need to move the files around in your filesystem when you're updating them so that they don't get updated with the other's FW. If you have a read-only filesystem then this is impossible, even. This patch changes the elants_i2c driver to automatically append the four-hex-digit hw_version of the device onto the name of the FW file it's requesting for update. Since different touchscreens should have a different hw_version's this means the user needs to append the hw version of the touchscreen he or she intends to update onto the end of the firmware filename and then the driver will do the rest. The firmware filenames it looks for now are of the form: elants_i2c_${HW_VERSION}.bin eg: elants_i2c_2a44.bin Signed-off-by: Charlie Mooney <charliemooney@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-12-29Input: elants_i2c - remove unnecessary version.h inclusionFabian Frederick
Based on versioncheck. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-12-08Input: add support for Elan eKTH I2C touchscreensScott Liu
This driver supports Elan eKTH I2C touchscreen controllers. Note that these are using custom protocol, as opposed to other Elan parts that use HID-over-I2C and are supported by the standard HID-multitouch driver. Signed-off-by: Scott Liu <scott.liu@emc.com.tw> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>