aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/ar1021_i2c.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-05-01Input: ar1021_i2c - use BIT to check for a bitMartin Kepplinger1-1/+2
The MSB for the first byte of touch data transmission is always 1. Make it a little more obvious we're testing this bit by using BIT(7). Signed-off-by: Martin Kepplinger <martink@posteo.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-05-01Input: ar1021_i2c - enable touch mode during openMartin Kepplinger1-0/+15
The device could as well be in command mode, in which this driver cannot handle the device. When opening the device, let's make sure the device will be in the mode we expect it to be for this driver. Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-04-14Input: ar1021_i2c - highlight support for AR1020Martin Kepplinger1-2/+2
ar1021_i2c also supports the ar1020 device I'm using. This is tested. They also share the same datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/40001393C.pdf So let users see that they have a compatible in front of them by adding AR1020 to the driver's description. Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-04-14Input: ar1021_i2c - do not force raising edge IRQ triggerDmitry Torokhov1-1/+1
We should not be forcing edge triggered interrupt, but rather let platform decide the kind of trigger it needs to use. Also, the driver is not quite safe with regard to edge-triggered interrupts as it does not try to kick the controller after requesting/enabling IRQ. Reviewed-By: Christian Gmeiner <christian.gmeiner@gmail.com> Tested-by: Martin Kepplinger <martin.kepplinger@ginzinger.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-04-14Input: ar1021_i2c - fix too long name in driver's device tableDmitry Torokhov1-1/+1
The name field in structure i2c_device_id is 20 characters, and we expect it to be NULL-terminated, however we are trying to stuff it with 21 bytes and thus NULL-terminator is lost. This causes issues when one creates device with name "MICROCHIP_AR1021_I2C" as i2c core cuts off the last "C", and automatic module loading by alias does not work as result. The -I2C suffix in the device name is superfluous, we know what bus we are dealing with, so let's drop it. Also, no other driver uses capitals, and the manufacturer name is normally not included, except in very rare cases of incompatible name collisions. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=116211 Fixes: dd4cae8bf166 ("Input: Add Microchip AR1021 i2c touchscreen") Reviewed-By: Christian Gmeiner <christian.gmeiner@gmail.com> Tested-by: Martin Kepplinger <martin.kepplinger@ginzinger.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-04-12Input: ar1021_i2c - coding style fixesMartin Kepplinger1-2/+2
Use the common kernel coding style and corrently align parameters with open parenthesis. Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-01-18Input: ar1021_i2c - drop unnecessary call to i2c_set_clientdataGuenter Roeck1-1/+0
There is no call to i2c_get_clientdata() or dev_get_drvdata(). Drop the unnecessary call to i2c_set_clientdata(). Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-17Input: drop owner assignment from i2c_driverKrzysztof Kozlowski1-1/+0
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-03-19Input: constify of_device_id arraysFabian Frederick1-1/+1
of_device_id is always used as const argument (See driver.of_match_table and open firmware functions). Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-10-09Input: Add Microchip AR1021 i2c touchscreenChristian Gmeiner1-0/+181
This patch adds support for the ar1021 i2c based touchscreen. The driver is quite simple and only supports the Touch Reporting Protocol. This is the final version for an RFC patch send a while ago. http://www.spinics.net/lists/linux-input/msg29419.html Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>