summaryrefslogtreecommitdiffstats
path: root/drivers/input/rmi4
Commit message (Collapse)AuthorAgeFilesLines
...
| | * Input: synaptics-rmi4 - remove mutex calls while updating the firmwareBenjamin Tissoires2016-12-012-37/+22Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * Input: synaptics-rmi4 - add rmi_enable/disable_irqBenjamin Tissoires2016-11-302-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>
| | * Input: synaptics-rmi4 - propagate correct number of rx and tx electrodes to F54Guenter Roeck2016-11-233-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>
| | * Input: synaptics-rmi4 - add support for F55 sensor tuningGuenter Roeck2016-11-235-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>
| | * Input: synaptics-rmi4 - add support for F34 device reflashNick Dyer2016-11-238-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>
| | * Input: synaptics-rmi4 - unlock on errorDan Carpenter2016-11-171-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>
| | * Input: synaptics-rmi4 - add SMBus supportBenjamin Tissoires2016-11-094-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>
| | * Input: synaptics-rmi4 - set the ABS_MT_TOOL_TYPE bit to report tool typeAndrew Duggan2016-11-091-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>
| | * Input: synaptics-rmi4 - add support for controlling dribble packets in F12Andrew Duggan2016-11-091-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>
| | * Input: synaptics-rmi4 - add parameters for dribble packets and palm detect ↵Andrew Duggan2016-11-093-7/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gesture 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>
| | * Input: synaptics-rmi4 - handle incomplete input dataAndrew Duggan2016-11-093-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>
| | * Input: synaptics-rmi4 - move IRQ handling to rmi_driverBjorn Andersson2016-11-093-140/+79Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The attn IRQ is related to the chip, rather than the transport, so move all handling of interrupts to the core driver. This also makes sure that there are no races between interrupts and availability of the resources used by the core driver. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: synaptics-rmi4 - add a couple of debug linesNick Dyer2016-11-092-0/+4
| | | | | | | | | | | | | | | | | | Signed-off-by: Nick Dyer <nick@shmanahar.org> Tested-by: Chris Healy <cphealy@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: synaptics-rmi4 - factor out functions from probeNick Dyer2016-11-091-53/+86
| | | | | | | | | | | | | | | | | | Signed-off-by: Nick Dyer <nick@shmanahar.org> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Tested-by: Chris Healy <cphealy@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * Input: synaptics-rmi4 - stop scanning PDT after two empty pagesNick Dyer2016-11-091-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have encountered some RMI4 firmwares where there are blank pages in between PDT pages which contain functions. This change makes them correctly enumerate all functions on the device. Tested on S7817 (has empty page 2). Signed-off-by: Nick Dyer <nick@shmanahar.org> [Tested successfully on S7817 and S7300 Synaptics touch controllers] Tested-by: Chris Healy <cphealy@gmail.com> Reviewed-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Merge tag 'v4.8' into nextDmitry Torokhov2016-10-142-5/+7
| |\ \ | | | | | | | | | | | | | | | | Sync up with mainline to bring in I2C host notify changes and other updates.
* | \ \ Merge branch 'for-linus' of ↵Linus Torvalds2016-10-142-22/+38
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull some more input subsystem updates from Dmitry Torokhov: "An update to the ALPS driver to support the V8 protocol with touchstick, a change for i8042 to skip selftest on many Asus laptops which helps to keep their touchpads working after resume, and a couple other driver fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: i8042 - skip selftest on ASUS laptops Input: melfas_mip4 - add ic_name sysfs attribute Input: melfas_mip4 - add maintainer information Input: melfas_mip4 - add devicetree binding documentations Input: elantech - add Fujitsu Lifebook E556 to force crc_enabled Input: synaptics-rmi4 - fix error handling in I2C transport driver Input: synaptics-rmi4 - fix error handling in SPI transport driver Input: ALPS - add V8 protocol documentation Input: ALPS - set DualPoint flag for 74 03 28 devices Input: ALPS - allow touchsticks to report pressure Input: ALPS - handle 0-pressure 1F events Input: ALPS - add touchstick support for SS5 hardware Input: elantech - force needed quirks on Fujitsu H760 Input: elantech - fix Lenovo version typo
| * | | | Merge branch 'next' into for-linusDmitry Torokhov2016-10-142-22/+38
| |\| | | | | |/ / | |/| | | | | | Prepare second round of input updates for 4.9 merge window.
| | * | Input: synaptics-rmi4 - fix error handling in I2C transport driverGuenter Roeck2016-10-041-12/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instantiating the rmi4 I2C transport driver without interrupts assigned (for example using manual i2c instantiation from the command line) caused the driver to fail to load, but it does not clean up its regulator or transport device registrations. Result is a crash at a later time, for example when rebooting the system. Fixes: 946c8432aab0 ("Input: synaptics-rmi4 - support regulator supplies") Cc: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| | * | Input: synaptics-rmi4 - fix error handling in SPI transport driverGuenter Roeck2016-10-041-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instantiating the rmi4 SPI transport driver without an interrupt assigned caused the driver to fail to load, but it does not clean up its transport device registration. Result may be a crash at a later time, for example when rebooting the system. Fixes: 8d99758dee31 ("Input: synaptics-rmi4 - add SPI transport driver") Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | | Merge branch 'akpm' (patches from Andrew)Linus Torvalds2016-10-124-4/+0Star
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge more updates from Andrew Morton: - a few block updates that fell in my lap - lib/ updates - checkpatch - autofs - ipc - a ton of misc other things * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (100 commits) mm: split gfp_mask and mapping flags into separate fields fs: use mapping_set_error instead of opencoded set_bit treewide: remove redundant #include <linux/kconfig.h> hung_task: allow hung_task_panic when hung_task_warnings is 0 kthread: add kerneldoc for kthread_create() kthread: better support freezable kthread workers kthread: allow to modify delayed kthread work kthread: allow to cancel kthread work kthread: initial support for delayed kthread work kthread: detect when a kthread work is used by more workers kthread: add kthread_destroy_worker() kthread: add kthread_create_worker*() kthread: allow to call __kthread_create_on_node() with va_list args kthread/smpboot: do not park in kthread_create_on_cpu() kthread: kthread worker API cleanup kthread: rename probe_kthread_data() to kthread_probe_data() scripts/tags.sh: enable code completion in VIM mm: kmemleak: avoid using __va() on addresses that don't have a lowmem mapping kdump, vmcoreinfo: report memory sections virtual addresses ipc/sem.c: add cond_resched in exit_sme ...
| * | | treewide: remove redundant #include <linux/kconfig.h>Masahiro Yamada2016-10-124-4/+0Star
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Kernel source files need not include <linux/kconfig.h> explicitly because the top Makefile forces to include it with: -include $(srctree)/include/linux/kconfig.h This commit removes explicit includes except the following: * arch/s390/include/asm/facilities_src.h * tools/testing/radix-tree/linux/kernel.h These two are used for host programs. Link: http://lkml.kernel.org/r/1473656164-11929-1-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | Merge tag 'v4.8' into patchworkMauro Carvalho Chehab2016-10-051-1/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux 4.8 * tag 'v4.8': (1761 commits) Linux 4.8 ARM: 8618/1: decompressor: reset ttbcr fields to use TTBR0 on ARMv7 MIPS: CM: Fix mips_cm_max_vp_width for non-MT kernels on MT systems include/linux/property.h: fix typo/compile error ocfs2: fix deadlock on mmapped page in ocfs2_write_begin_nolock() mm: workingset: fix crash in shadow node shrinker caused by replace_page_cache_page() MAINTAINERS: Switch to kernel.org email address for Javi Merino x86/entry/64: Fix context tracking state warning when load_gs_index fails x86/boot: Initialize FPU and X86_FEATURE_ALWAYS even if we don't have CPUID x86/vdso: Fix building on big endian host x86/boot: Fix another __read_cr4() case on 486 sctp: fix the issue sctp_diag uses lock_sock in rcu_read_lock sctp: change to check peer prsctp_capable when using prsctp polices sctp: remove prsctp_param from sctp_chunk sctp: move sent_count to the memory hole in sctp_chunk tg3: Avoid NULL pointer dereference in tg3_io_error_detected() x86/init: Fix cr4_init_shadow() on CR4-less machines MIPS: Fix detection of unsupported highmem with cache aliases MIPS: Malta: Fix IOCU disable switch read for MIPS64 MIPS: Fix BUILD_ROLLBACK_PROLOGUE for microMIPS ...
| * | Input: synaptics-rmi4 - fix register descriptor subpacket map constructionAndrew Duggan2016-08-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The map_offset variable is specific to the register and needs to be reset in the loop. Otherwise, subsequent register's subpacket maps will have their bits set at the wrong index. Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Tested-by: Nitin Chaudhary <nitinchaudhary1289@gmail.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | [media] Input: v4l-touch - add copyright linesNick Dyer2016-09-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Add copyright lines for Zodiac who paid for the V4L touch work. Signed-off-by: Nick Dyer <nick@shmanahar.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | | [media] Input: synaptics-rmi4: disallow impossible configurationArnd Bergmann2016-09-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The newly added debug mode for the synaptics-rmi4 driver relies on the v4l2 interface and vb2_vmalloc, but those might be configured as loadable modules when the driver itself is built-in, resulting in a link failure: drivers/input/rmi4/rmi_core.o: In function `rmi_f54_remove': rmi_f54.c:(.text.rmi_f54_remove+0x14): undefined reference to `video_unregister_device' rmi_f54.c:(.text.rmi_f54_remove+0x20): undefined reference to `v4l2_device_unregister' drivers/input/rmi4/rmi_core.o: In function `rmi_f54_vidioc_s_input': rmi_f54.c:(.text.rmi_f54_vidioc_s_input+0x10): undefined reference to `video_devdata' drivers/input/rmi4/rmi_core.o: In function `rmi_f54_vidioc_g_input': rmi_f54.c:(.text.rmi_f54_vidioc_g_input+0x10): undefined reference to `video_devdata' drivers/input/rmi4/rmi_core.o: In function `rmi_f54_vidioc_fmt': rmi_f54.c:(.text.rmi_f54_vidioc_fmt+0x10): undefined reference to `video_devdata' drivers/input/rmi4/rmi_core.o: In function `rmi_f54_vidioc_enum_input': rmi_f54.c:(.text.rmi_f54_vidioc_enum_input+0x10): undefined reference to `video_devdata' drivers/input/rmi4/rmi_core.o: In function `rmi_f54_vidioc_querycap': ... The best workaround I could come up with is to disallow the debug mode unless it's actually possible to call it. Fixes: 3a762dbd5347 ("[media] Input: synaptics-rmi4 - add support for F54 diagnostics") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Nick Dyer <nick@shmanahar.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | | [media] Input: synaptics-rmi4 - add support for F54 diagnosticsNick Dyer2016-08-235-0/+772
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | Function 54 implements access to various RMI4 diagnostic features. This patch adds support for retrieving this data. It registers a V4L2 device to output the data to user space. Signed-off-by: Nick Dyer <nick@shmanahar.org> Tested-by: Andrew Duggan <aduggan@synaptics.com> Tested-by: Chris Healy <cphealy@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | Merge branch 'next' into for-linusDmitry Torokhov2016-08-041-4/+1Star
|\| | | | | | | Prepare second round of input updates for 4.8 merge window.
| * Input: synaptics-rmi4 - do not check for NULL when calling of_node_put()Markus Elfring2016-07-261-4/+1Star
| | | | | | | | | | | | | | | | | | The of_node_put() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | Merge branch 'next' into for-linusDmitry Torokhov2016-07-264-18/+60
|\| | | | | | | Prepare first round of input updates for 4.8 merge window.
| * Merge branch 'for-linus' into nextDmitry Torokhov2016-07-191-2/+2
| |\ | | | | | | | | | Sync up to bring in wacom_w8001 changes to avoid merge conflicts later.
| * | Input: synaptics-rmi4 - use the RMI_F11_REL_BYTES define in ↵Andrew Duggan2016-07-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rmi_f11_rel_pos_report The size of relative data in F11 is already defined by RMI_F11_REL_BYTES. Use the define in rmi_f11_rel_pos_report() to be consistent. Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Reviewed-by: Nick Dyer <nick@shmanahar.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: synaptics-rmi4 - remove unneeded variableAndrew Duggan2016-07-141-4/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the data_base_addr_offset variable in rmi_f11_attention(). The f11 data is read as a single block so there is no need to store an offset to the data address. Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Nick Dyer <nick@shmanahar.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: synaptics-rmi4 - remove pointer to rmi_function in f12_dataAndrew Duggan2016-07-141-1/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pointer to struct rmi_function in f12_data is never set and was never used. The fn pointer is also stored in rmi_2d_sensor which is a member of f12_data. Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Nick Dyer <nick@shmanahar.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: synaptics-rmi4 - support regulator suppliesBjorn Andersson2016-07-141-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support the two supplies - vdd and vio - to make it possible to control power to the Synaptics chip. Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Acked-by: Rob Herring <robh@kernel.org> Reviewed-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: synaptics-rmi4 - fix spelling in definesNick Dyer2016-05-191-11/+11
| | | | | | | | | | | | | | | Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk> Reviewed-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: synaptics-rmi4 - fix maximum size check for F12 control register 8Andrew Duggan2016-07-201-4/+5
| |/ |/| | | | | | | | | | | | | | | | | | | According to the RMI4 spec the maximum size of F12 control register 8 is 15 bytes. The current code incorrectly reports an error if control 8 is greater then 14. Making sensors with a control register 8 with 15 bytes unusable. Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Reported-by: Chris Healy <cphealy@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | Input: synaptics-rmi4 - use of_get_child_by_name() to fix refcountAndrew Duggan2016-07-141-2/+2
|/ | | | | | | | | | | Calling of_find_node_by_name() assumes that the caller has incremented the refcount of the of_node being passed in. Currently, the caller is not incrementing the refcount of the of_node which results in the node being prematurely freed when of_find_node_by_name() calls of_node_put() on it. Instead use of_get_child_by_name() which does not call put on the of_node. Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: synaptics-rmi4 - remove check of Non-NULL arrayAndrew Duggan2016-03-181-3/+2Star
| | | | | | | | Originally the irq_mask member of rmi_function was a pointer. Then it was switched to being a zero length array. However, the checks for a NULL pointer where not removed. Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: synaptics-rmi4 - using logical instead of bitwise ANDDan Carpenter2016-03-161-2/+2
| | | | | | | | There is a typo so we have && instead of &. Fixes: ff8f83708b3e ('Input: synaptics-rmi4 - add support for 2D sensors and F11') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: synaptics-rmi4 - add device tree support to the SPI transport driverAndrew Duggan2016-03-111-1/+43
| | | | | | | | | | Add devicetree binding for SPI devices. Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Acked-by: Rob Herring <robh@kernel.org> Tested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Tested-by: Linus Walleij <linus.walleij@linaro.org> Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: synaptics-rmi4 - add SPI transport driverAndrew Duggan2016-03-113-0/+557
| | | | | | | | | Add the transport driver for devices using RMI4 over SPI. Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Tested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Tested-by: Linus Walleij <linus.walleij@linaro.org> Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: synaptics-rmi4 - add support for F30Andrew Duggan2016-03-115-0/+421
| | | | | | | | | | | | RMI4 F30 supports input from clickpad buttons and controls LEDs located on the touchpad PCB. This patch adds support of the clickpad buttons and defers supporting LEDs for the future. Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Tested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Tested-by: Linus Walleij <linus.walleij@linaro.org> Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: synaptics-rmi4 - add support for F12Andrew Duggan2016-03-115-0/+473
| | | | | | | | | | | Function 12 implements 2D touch position sensor for newer Synaptics touch devices. It replaces F11 and no device will contain both functions. Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Christopher Heiny <cheiny@synaptics.com> Tested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Tested-by: Linus Walleij <linus.walleij@linaro.org> Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: synaptics-rmi4 - add device tree support for 2d sensors and F11Andrew Duggan2016-03-113-1/+117
| | | | | | | | | | 2D sensors have several parameter which can be set in the platform data. This patch adds support for getting those values from devicetree. Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Tested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Tested-by: Linus Walleij <linus.walleij@linaro.org> Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: synaptics-rmi4 - add support for 2D sensors and F11Andrew Duggan2016-03-117-1/+1641
| | | | | | | | | | | | | RMI4 currently defines two functions for reporting data for 2D sensors (F11 and F12). This patch adds the common functionality which is shared by devices with 2D reporting along with implementing functionality for F11. Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Christopher Heiny <cheiny@synaptics.com> Tested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Tested-by: Linus Walleij <linus.walleij@linaro.org> Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: synaptics-rmi4 - add device tree support for RMI4 I2C devicesAndrew Duggan2016-03-115-5/+124
| | | | | | | | | | | | Add devicetree binding for I2C devices and add bindings for optional parameters in the function drivers. Parameters for function drivers are defined in child nodes for each of the functions. Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Acked-by: Rob Herring <robh@kernel.org> Tested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Tested-by: Linus Walleij <linus.walleij@linaro.org> Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: synaptics-rmi4 - add I2C transport driverAndrew Duggan2016-03-113-0/+399
| | | | | | | | | | Add the transport driver for devices using RMI4 over I2C. Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Christopher Heiny <cheiny@synaptics.com> Tested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Tested-by: Linus Walleij <linus.walleij@linaro.org> Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: synaptics-rmi4 - add support for Synaptics RMI4 devicesAndrew Duggan2016-03-117-0/+2277
Synaptics uses the Register Mapped Interface (RMI) protocol as a communications interface for their devices. This driver adds the core functionality needed to interface with RMI4 devices. RMI devices can be connected to the host via several transport protocols and can supports a wide variety of functionality defined by RMI functions. Support for transport protocols and RMI functions are implemented in individual drivers. The RMI4 core driver uses a bus architecture to facilitate the various combinations of transport and function drivers needed by a particular device. Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Christopher Heiny <cheiny@synaptics.com> Tested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Tested-by: Linus Walleij <linus.walleij@linaro.org> Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>