Input: synaptics-rmi4: Add support for Synaptics RMI4 devices
Subsystems (2)
PATCH v4 1/10 Input: synaptics-rmi4: Add support for Synaptics RMI4 devices
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.
--- drivers/input/Kconfig | 2 + drivers/input/Makefile | 2 + drivers/input/rmi4/Kconfig | 10 + drivers/input/rmi4/Makefile | 2 + drivers/input/rmi4/rmi_bus.c | 378 ++++++++++++++ drivers/input/rmi4/rmi_bus.h | 186 +++++++ drivers/input/rmi4/rmi_driver.c | 1027 +++++++++++++++++++++++++++++++++++++++ drivers/input/rmi4/rmi_driver.h | 103 ++++ drivers/input/rmi4/rmi_f01.c | 574 ++++++++++++++++++++++ include/linux/rmi.h | 209 ++++++++ include/uapi/linux/input.h | 1 + 11 files changed, 2494 insertions(+) create mode 100644 drivers/input/rmi4/Kconfig create mode 100644 drivers/input/rmi4/Makefile create mode 100644 drivers/input/rmi4/rmi_bus.c create mode 100644 drivers/input/rmi4/rmi_bus.h create mode 100644 drivers/input/rmi4/rmi_driver.c create mode 100644 drivers/input/rmi4/rmi_driver.h create mode 100644 drivers/input/rmi4/rmi_f01.c create mode 100644 include/linux/rmi.h
drivers/input/Kconfig +2 -0
@@ -201,6 +201,8 @@ source "drivers/input/touchscreen/Kconfig" source "drivers/input/misc/Kconfig" +source "drivers/input/rmi4/Kconfig" + endif menu "Hardware I/O ports"
drivers/input/Makefile +2 -0
@@ -26,3 +26,5 @@ obj-$(CONFIG_INPUT_TOUCHSCREEN) += touchscreen/ obj-$(CONFIG_INPUT_MISC) += misc/ obj-$(CONFIG_INPUT_APMPOWER) += apm-power.o + +obj-$(CONFIG_RMI4_CORE) += rmi4/
drivers/input/rmi4/Kconfig new file +10 -0
@@ -0,0 +1,10 @@ +# +# RMI4 configuration +# +config RMI4_CORE + tristate "Synaptics RMI4 bus support" + help + Say Y here if you want to support the Synaptics RMI4 bus. This is + required for all RMI4 device support. + + If unsure, say Y.
drivers/input/rmi4/Makefile new file +2 -0
@@ -0,0 +1,2 @@ +obj-$(CONFIG_RMI4_CORE) += rmi_core.o +rmi_core-y := rmi_bus.o rmi_driver.o rmi_f01.o
drivers/input/rmi4/rmi_bus.c new file +378 -0
378 lines not on this page · raw message
drivers/input/rmi4/rmi_bus.h new file +186 -0
186 lines not on this page · raw message
drivers/input/rmi4/rmi_driver.c new file +1027 -0
1,027 lines not on this page · raw message
drivers/input/rmi4/rmi_driver.h new file +103 -0
103 lines not on this page · raw message
drivers/input/rmi4/rmi_f01.c new file +574 -0
574 lines not on this page · raw message
include/linux/rmi.h new file +209 -0
209 lines not on this page · raw message
include/uapi/linux/input.h +1 -0
@@ -246,6 +246,7 @@ struct input_mask {#define BUS_GSC 0x1A#define BUS_ATARI 0x1B#define BUS_SPI 0x1C +#define BUS_RMI 0x1D/* * MT_TOOL types
Signature · 1 line
2.5.0
kbuild test robot
build bot[PATCH] Input: synaptics-rmi4: fix array_size.cocci warnings
drivers/input/rmi4/rmi_bus.c:295:20-21: WARNING: Use ARRAY_SIZE
drivers/input/rmi4/rmi_bus.c:295:20-21: WARNING: Use ARRAY_SIZE
Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element
Semantic patch information:
This makes an effort to find cases where ARRAY_SIZE can be used such as where there is a division of sizeof the array by the sizeof its first element or by any indexed element or the element type. It replaces the division of the two sizeofs by ARRAY_SIZE.
Generated by: scripts/coccinelle/misc/array_size.cocci
---
rmi_bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/rmi4/rmi_bus.c +1 -1
@@ -292,7 +292,7 @@ static struct rmi_function_handler *fn_h };#define RMI_FN_HANDLER_ARRAY_SIZE \ - (sizeof(fn_handlers) / sizeof(struct rmi_function_handler *)) + ARRAY_SIZE(fn_handlers)static void __rmi_unregister_function_handlers (int start_idx) {
kbuild test robot
build botcoccinelle warnings: (new ones prefixed by >>)
Hi Andrew,
[auto build test WARNING on input/next]
[also build test WARNING on v4.5-rc3 next-20160209]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]
url: https://github.com/0day-ci/linux/commits/Andrew-Duggan/Input-synaptics-rmi4-Synaptics-RMI4-Driver/20160210-094628 base: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
coccinelle warnings: (new ones prefixed by >>)
>> drivers/input/rmi4/rmi_bus.c:295:20-21: WARNING: Use ARRAY_SIZE
Please review and possibly fold the followup patch.
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation