aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/rmi4 (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-04-14Input: synaptics-rmi4 - enable IRQ operation in F34 V7Nick Dyer3-68/+83
The polled firmware update proved unreliable when testing on S7817. Use attention to signal commands are complete. Signed-off-by: Nick Dyer <nick@shmanahar.org> Tested-by: Chris Healy <cphealy@gmail.com> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-04-14Input: synaptics-rmi4 - change F12 clip to inactive border debugNick Dyer1-11/+7
The data in F12_2D_Ctrl8 corresponds to the inactive border width used by the RMI device. It is not in pixel units and should not be treated as a clip value. Signed-off-by: Nick Dyer <nick@shmanahar.org> Tested-by: Chris Healy <cphealy@gmail.com> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-04-14Input: synaptics-rmi4 - use dev_driver_string when registering interruptNick Dyer1-1/+1
When IRQ handling was moved to rmi_driver in 3aeed5b the naming of the interrupt changed from "rmi4_i2c" to "2-0020" (or similar). This patch restores the previous behaviour and makes the interrupt easier to identify in /proc/interrupts. Signed-off-by: Nick Dyer <nick@shmanahar.org> Tested-by: Chris Healy <cphealy@gmail.com> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-04-03Input: synaptics-rmi4 - when registering sensors do not call them "drivers"Dmitry Torokhov3-69/+69
We are not registering drivers, but transport devices (AKA sensors), so let's call them that. Also let's rename "retval" to "error" in probe() functions as the variables are used to store error codes. Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-04-03Input: synaptics-rmi4 - cleanup SMbus mapping handlingDmitry Torokhov1-25/+18
There is no reason to copy structures field-by-filed when we can copy elements at once. Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-04-03Input: synaptics-rmi4 - fix endianness issue in SMBus transportDmitry Torokhov1-5/+5
The mapping table holds address in LE form, so we should convert it to CPU when comparing it. Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-04-03Input: synaptics-rmi4 - fix handling failures from rmi_enable_sensorDmitry Torokhov1-3/+8
If rmi_enable_sensor() fails in rmi_driver_probe(), we should not return immediately, but disable IRQs and tear down function list. Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-03-23Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/inputLinus Torvalds1-0/+4
Pull input fixes from Dmitry Torokhov: "Fixes to various USB drivers to validate existence of endpoints before trying to use them, fixes to APLS v8 protocol, and a couple of i8042 quirks" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: ALPS - fix trackstick button handling on V8 devices Input: ALPS - fix V8+ protocol handling (73 03 28) Input: sur40 - validate number of endpoints before using them Input: kbtab - validate number of endpoints before using them Input: hanwang - validate number of endpoints before using them Input: yealink - validate number of endpoints before using them Input: ims-pcu - validate number of endpoints before using them Input: cm109 - validate number of endpoints before using them Input: iforce - validate number of endpoints before using them Input: elan_i2c - add ASUS EeeBook X205TA special touchpad fw Input: i8042 - add TUXEDO BU1406 (N24_25BU) to the nomux list Input: synaptics-rmi4 - prevent null pointer dereference in f30 Input: i8042 - add noloop quirk for Dell Embedded Box PC 3000
2017-03-10Input: synaptics-rmi4 - prevent null pointer dereference in f30Benjamin Tissoires1-0/+4
If the platform data has f30_data.disable set, f30 in rmi_f30_config() might be null. Prevent a kernel oops by checking for non-null f30. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-03-01Input: rmi4 - f30: detect INPUT_PROP_BUTTONPAD from the button countBenjamin Tissoires1-2/+3
INPUT_PROP_BUTTONPAD is currently only set through the platform data. The RMI4 header doc says that this property is there to force the buttonpad property, so we also need to detect it by looking at the exported buttons count. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reported-and-tested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-02-20Merge branch 'next' into for-linusDmitry Torokhov11-240/+493
Prepare input updates for 4.11 merge window.
2017-02-09Input: synaptics-rmi4 - forward upper mechanical buttons to PS/2 guestBenjamin Tissoires3-16/+95
On the latest series of ThinkPads, the button events for the TrackPoint are reported through the touchpad itself as opposed to the TrackPoint device. In order to report these buttons properly, we need to forward them to the TrackPoint device and notify psmouse to send the button presses/releases. Signed-off-by: Lyude Paul <thatslyude@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-02-09Input: synaptics-rmi4 - clean up F30 implementationDmitry Torokhov1-182/+144
This patch does several cleanup changes to F30 code - switch to using BIT() macro - use DIV_ROUND_UP() where appropriate - factor out code setting up and reporting buttons - use single loop when reporting buttons: arithmetic is cheap compared to conditionals and associated branch misprediction. Tested-By: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-02-07Input: synaptics-rmi4 - select 'SERIO' when neededArnd Bergmann1-1/+7
With CONFIG_SERIO=m, we get a build error for the rmi4-f03 driver, added in linux-4.10: warning: (HID_RMI) selects RMI4_F03 which has unmet direct dependencies (!UML && INPUT && RMI4_CORE && (SERIO=y || RMI4_CORE=SERIO)) drivers/input/built-in.o: In function `rmi_f03_attention': rmi_f03.c:(.text+0xcfe0): undefined reference to `serio_interrupt' rmi_f03.c:(.text+0xd055): undefined reference to `serio_interrupt' drivers/input/built-in.o: In function `rmi_f03_remove': rmi_f03.c:(.text+0xd115): undefined reference to `serio_unregister_port' drivers/input/built-in.o: In function `rmi_f03_probe': rmi_f03.c:(.text+0xd209): undefined reference to `__serio_register_port' An earlier patch tried to fix this, but missed the HID_RMI driver that does a 'select' on the F03 backend. This adds a hidden Kconfig symbol that enforces 'serio' to be enabled when RMI4-F03 is, which covers all cases. Fixes: d7ddad0acc4a ("Input: synaptics-rmi4 - fix F03 build error when serio is module") Fixes: c5e8848fc98e ("Input: synaptics-rmi4 - add support for F03") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-02-07Input: synaptics-rmi4 - fix error return code in rmi_probe_interrupts()Wei Yongjun1-1/+1
Fix to return error code -ENOMEM from the devm_kzalloc() error handling case instead of 0, as done elsewhere in this function. Fixes: 6bd0dcfacf28 ("Input: synaptics-rmi4 - factor out functions from probe") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-02-06Merge branch 'synaptics-rmi4' into nextDmitry Torokhov10-57/+268
Bring in latest RMI4 support in preparation to the merge window.
2017-02-06Input: synaptics-rmi4 - add rmi_find_function()Benjamin Tissoires2-0/+14
If a function needs to communicate with an other, it's better to have a way to retrieve this other. Reviewed-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-01-31Input: synaptics-rmi4 - add sysfs interfaces for hardware IDsNick Dyer4-4/+152
These attributes provide various bits of information which may be enumerated under the RMI4 protocol to user space. This may be useful for displaying the particular version which is in use, or selecting the correct firmware to flash. Signed-off-by: Nick Dyer <nick@shmanahar.org> Tested-by: Chris Healy <cphealy@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-01-31Input: synaptics-rmi4 - add sysfs attribute update_fw_statusNick Dyer3-27/+80
The attribute returns the percentage complete. If the firmware update fails, it reports a negative error code. Signed-off-by: Nick Dyer <nick@shmanahar.org> Tested-by: Chris Healy <cphealy@gmail.com> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-01-31Input: synaptics-rmi4 - fix reversed conditions in enable/disable_irq_wakeChristophe JAILLET1-2/+2
These tests are reversed. A warning should be displayed if an error is returned, not on success. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-01-24Input: constify device_type structuresBhumika Goyal1-2/+2
Declare device_type structures as const as they are only stored in the type field of a device structure. This field is of type const, so add const to declaration of device_type structures. File size before: text data bss dec hex filename 17184 1344 80 18608 48b0 drivers/input/input.o File size after: text data bss dec hex filename 17248 1280 80 18608 48b0 drivers/input/input.o File size before: text data bss dec hex filename 2355 384 8 2747 abb drivers/input/rmi4/rmi_bus.o File size after: text data bss dec hex filename 2483 264 8 2755 ac3 drivers/input/rmi4/rmi_bus.o Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-01-21Input: synaptics-rmi4 - use local variables consistentlyGuenter Roeck2-4/+4
If a function declares a variable to access a structure element, use it conssistently. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-01-15Input: synaptics-rmi4 - correctly swap clip values if axes are swappedLucas Stach1-1/+6
The clip values need the same swapping as the maximum values if the sensor axes are swapped. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-01-13Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/inputLinus Torvalds1-1/+2
Pull input updates from Dmitry Torokhov: "Small driver fixups" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: elants_i2c - avoid divide by 0 errors on bad touchscreen data Input: adxl34x - make it enumerable in ACPI environment Input: ALPS - fix TrackStick Y axis handling for SS5 hardware Input: synaptics-rmi4 - fix F03 build error when serio is module Input: xpad - use correct product id for x360w controllers Input: synaptics_i2c - change msleep to usleep_range for small msecs Input: i8042 - add Pegatron touchpad to noloop table Input: joydev - remove unused linux/miscdevice.h include
2016-12-29Input: synaptics-rmi4 - remove redundant null check on rmi_devColin Ian King1-3/+0
rmi_dev is currently being dereferenced before it null checked, however, after deeper inspecting, rmi_dev can never be null, so just remove this redundant check. Fixes CoverityScan CID 1391218 ("Dereference before null check") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-12-29Input: synaptics-rmi4 - check for non zero version logically dead codeColin Ian King1-2/+0
version is a u8, the check for version > 0 means that version can only be zero, so the subsequent check for version != 0 is never true and hence is redudant code and can be removed. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-12-29Input: synaptics-rmi4 - use Kconfig "if" to express dependencyDmitry Torokhov1-16/+12
There is no need to repeat "depends on RMI4_CORE" on every bit of RMI4 support, we can guard all of them at once with "if RMI4_CORE". Also use tabs for F03 indentation. Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-12-29Merge branch 'synaptics-rmi4' into for-linusDmitry Torokhov1-1/+2
This brings in fix for F03 build error when serio is module.
2016-12-27Input: synaptics-rmi4 - fix F03 build error when serio is moduleDmitry Torokhov1-1/+2
Since F03 is a boolean, "depends" on symbols that can be modules do not work quite right. We can enable F03 if SERIO is built-in or if both RMI core and SERIO core are modules. If SERIO core is module, but RMI is built-in, we'll get: drivers/built-in.o: In function `rmi_f03_attention': rmi_f03.c:(.text+0xf8ef8): undefined reference to `serio_interrupt' rmi_f03.c:(.text+0xf8fbd): undefined reference to `serio_interrupt' drivers/built-in.o: In function `rmi_f03_remove': rmi_f03.c:(.text+0xf9082): undefined reference to `serio_unregister_port' drivers/built-in.o: In function `rmi_f03_probe': rmi_f03.c:(.text+0xf9260): undefined reference to `__serio_register_port' Reported-by: Randy Dunlap <rdunlap@infradead.org> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-12-17Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/inputLinus Torvalds21-320/+3686
Pull input subsystem updates from Dmitry Torokhov: - updated support for Synaptics RMI4 devices, including support for SMBus controllers, firmware update support, sensor tuning, and PS/2 guest support - ALPS driver now supports tracksticks on SS5 controllers - i8042 now uses chassis info to skip selftest on Asus laptops as list of individual models became too unwieldy - miscellaneous fixes to other drivers * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (67 commits) Input: imx6ul_tsc - generalize the averaging property Input: drv260x - use generic device properties Input: drv260x - use temporary for &client->dev Input: drv260x - fix input device's parent assignment Input: synaptics-rmi4 - add support for F34 V7 bootloader Input: drv260x - fix initializing overdrive voltage Input: ALPS - fix protcol -> protocol Input: i8042 - comment #else/#endif of CONFIG_PNP Input: lpc32xx-keys - fix invalid error handling of a requested irq Input: synaptics-rmi4 - fix debug for sensor clip Input: synaptics-rmi4 - store the attn data in the driver Input: synaptics-rmi4 - allow to add attention data Input: synaptics-rmi4 - f03 - grab data passed by transport device Input: synaptics-rmi4 - add support for F03 Input: imx6ul_tsc - convert int to u32 Input: imx6ul_tsc - add mask when set REG_ADC_CFG Input: synaptics-rmi4 - have only one struct platform data Input: synaptics-rmi4 - remove EXPORT_SYMBOL_GPL for internal functions Input: synaptics-rmi4 - remove mutex calls while updating the firmware Input: drv2667 - fix misuse of regmap_update_bits ...
2016-12-15Merge branch 'synaptics-rmi4' into nextDmitry Torokhov21-314/+4453
Merge updated Synaptics RMI4 support, including support for SMBus controllers and flashing firmware.
2016-12-12Input: synaptics-rmi4 - add support for F34 V7 bootloaderNick Dyer5-33/+1687
Port firmware update code from Samsung Galaxy S7 driver into mainline framework. This patch has been tested on Synaptics S7813. Signed-off-by: Nick Dyer <nick@shmanahar.org> Tested-by: Chris Healy <cphealy@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-12-07Input: synaptics-rmi4 - fix debug for sensor clipNick Dyer1-5/+3
The debug would only ever output zero for the clip information. Signed-off-by: Nick Dyer <nick@shmanahar.org> Reviewed-by: Andrew Duggan <aduggan@synaptics.com> Tested-by: Chris Healy <cphealy@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-12-02Input: synaptics-rmi4 - store the attn data in the driverBenjamin Tissoires5-41/+43
Now that we have a proper API to set the attention data, there is no point in keeping it in the transport driver. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-12-02Input: synaptics-rmi4 - allow to add attention dataBenjamin Tissoires1-2/+47
The HID implementation of RMI4 provides the data during the interrupt (in the input report). We need to provide a way for this transport driver to provide the attention data while calling an IRQ. We use a fifo in rmi_core to not lose any incoming event. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-12-02Input: synaptics-rmi4 - f03 - grab data passed by transport deviceDennis Wassenberg1-9/+26
First check if there are data available passed by the transport device. If data available use these data. If there are no data available try to read the rmi block if dsata are passed this way. This is the way the other rmi function handlers will do this. This patch is needed on HID devices because the firmware reads F03 data registers and adds them to the HID attention report. Reading those registers from the driver after the firmware read them will result in invalid data. Reviewed-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Dennis Wassenberg <dennis.wassenberg@secunet.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-12-02Input: synaptics-rmi4 - add support for F03Lyude Paul5-0/+246
This adds basic functionality for PS/2 passthrough on Synaptics Touchpads using RMI4 through smbus. Reviewed-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Lyude Paul <thatslyude@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-11-30Input: synaptics-rmi4 - have only one struct platform dataBenjamin Tissoires3-9/+8
If struct rmi_device_platform_data contains pointers to other struct, it gets difficult to allocate a fixed size struct and copy it over between drivers. Change the pointers into a struct and change the code in rmi4 accordingly. Reviewed-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-11-30Input: synaptics-rmi4 - remove EXPORT_SYMBOL_GPL for internal functionsBenjamin Tissoires2-16/+2
those functions should not be used outside of rmi_core.ko. There is no point in exporting them to the world. It looks like rmi_read_pdt_entry() should be static too. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-11-30Input: synaptics-rmi4 - remove mutex calls while updating the firmwareBenjamin Tissoires2-37/+22
This partially reverts commit 29fd0ec2bdbe ("Input: synaptics-rmi4 - add support for F34 device reflash") irq_mutex should be used only to protect data->current_irq_mask, not preventing incoming input to be processed while the upgrade of the firmware is happening. We can simply disable the irqs when we don't want them to interfere with the upgrade process. Tested on S7300 and S7800 (with F34 v7 patch added) Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Nick Dyer <nick@shmanahar.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-11-30Input: synaptics-rmi4 - add rmi_enable/disable_irqBenjamin Tissoires2-19/+66
Set the .enabled boolean and trigger an event processing when enabling for edge-triggered systems. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-11-22Input: synaptics-rmi4 - propagate correct number of rx and tx electrodes to F54Guenter Roeck3-4/+18
F54 diagnostics report functions provide data based on the number of enabled rx and tx electrodes, which is not identical to the number of electrodes reported with F54:Query0 and F54:Query1. Those values report the number of supported electrodes, not the number of enabled electrodes. The number of enabled electrodes can be determined by analyzing F55:Ctrl1 (sensor receiver assignment) and F55:Ctrl2 (sensor transmitter assignment). Propagate the number of enabled electrodes from F55 to F54 to avoid corrupted output if not all electrodes are enabled. Fixes: 3a762dbd5347 ("[media] Input: synaptics-rmi4 - add support for F54 ...") Signed-off-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Nick Dyer <nick@shmanahar.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-11-22Input: synaptics-rmi4 - add support for F55 sensor tuningGuenter Roeck5-0/+138
Sensor tuning support is needed to determine the number of enabled tx and rx electrodes for use in F54 functions. The number of enabled electrodes is not identical to the total number of electrodes as reported with F55:Query0 and F55:Query1. It has to be calculated by analyzing F55:Ctrl1 (sensor receiver assignment) and F55:Ctrl2 (sensor transmitter assignment). Support for additional sensor tuning functions may be added later. Fixes: 3a762dbd5347 ("[media] Input: synaptics-rmi4 - add support for F54 ...") Signed-off-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Nick Dyer <nick@shmanahar.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-11-22Input: synaptics-rmi4 - add support for F34 device reflashNick Dyer8-31/+668
Add support for updating firmware, triggered by a sysfs attribute. This patch has been tested on Synaptics S7300. Signed-off-by: Nick Dyer <nick@shmanahar.org> Tested-by: Chris Healy <cphealy@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-11-16Input: synaptics-rmi4 - unlock on errorDan Carpenter1-2/+3
We should unlock before returning on this error path. Fixes: 3a762dbd5347 ('[media] Input: synaptics-rmi4 - add support for F54 diagnostics') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-11-08Input: synaptics-rmi4 - add SMBus supportBenjamin Tissoires4-0/+472
Code obtained from https://raw.githubusercontent.com/mightybigcar/synaptics-rmi4/jf/drivers/input/rmi4/rmi_smbus.c and updated to match upstream. And fixed to make it work. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-11-08Input: synaptics-rmi4 - set the ABS_MT_TOOL_TYPE bit to report tool typeAndrew Duggan1-4/+6
The rmi4 2D sensor functions report the tool type via input_mt_report_slot_state(), but the abs parameter bit has not been set so the tool type is not reported to userspace. This patch set the ABS_MT_TOOL_TYPE bit. Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-11-08Input: synaptics-rmi4 - add support for controlling dribble packets in F12Andrew Duggan1-1/+69
Implements reading and setting the dribble bit in F12's control registers. Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-11-08Input: synaptics-rmi4 - add parameters for dribble packets and palm detect gestureAndrew Duggan3-7/+33
The rmi_f11 driver currently disables dribble packets and the palm detect gesture for all devices. This patch creates a parameter in the 2d sensor platform data for controlling this functionality on a per device basis. For more information on dribble packets: Commit 05ba999fcabb ("HID: rmi: disable dribble packets on Synaptics touchpads") For more information on the palm detect gesture: Commit f097deef59a6 ("HID: rmi: disable palm detect gesture when present") Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-11-08Input: synaptics-rmi4 - handle incomplete input dataAndrew Duggan3-20/+61
Commit 5b65c2a02966 ("HID: rmi: check sanity of the incoming report") added support for handling incomplete HID reports do to the input data being corrupted in transit. This patch reimplements this functionality in the function drivers so they can handle getting less valid data then they expect. Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>