Input: synaptics-rmi4: Add support for F12
Subsystems (2)
PATCH 6/10 Input: synaptics-rmi4: Add support for F12
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 <[email protected]>
Signed-off-by Christopher Heiny <[email protected]>
--- drivers/input/rmi4/Kconfig | 10 + drivers/input/rmi4/Makefile | 1 + drivers/input/rmi4/rmi_bus.c | 13 +- drivers/input/rmi4/rmi_driver.h | 8 + drivers/input/rmi4/rmi_f12.c | 487 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 518 insertions(+), 1 deletion(-) create mode 100644 drivers/input/rmi4/rmi_f12.c
drivers/input/rmi4/Kconfig +10 -0
@@ -64,3 +64,13 @@ config RMI4_F11_PEN If your system is not recognizing pen touches and you know your sensor supports pen input, you probably want to turn this feature off. + +config RMI4_F12 + bool "RMI4 Function 12 (2D pointing)" + select RMI4_2D_SENSOR + help + Say Y here if you want to add support for RMI4 function 12. + + Function 12 provides 2D multifinger pointing for touchscreens and + touchpads. For sensors that support relative pointing, F12 also + provides mouse input.
drivers/input/rmi4/Makefile +1 -0
@@ -5,6 +5,7 @@ rmi_core-$(CONFIG_RMI4_2D_SENSOR) += rmi_2d_sensor.o # Function drivers rmi_core-$(CONFIG_RMI4_F11) += rmi_f11.o +rmi_core-$(CONFIG_RMI4_F12) += rmi_f12.o # Transports obj-$(CONFIG_RMI4_I2C) += rmi_i2c.o
drivers/input/rmi4/rmi_bus.c +12 -1
@@ -359,14 +359,24 @@ static int __init rmi_bus_init(void) goto err_unregister_f01; } + error =rmi_register_f12_handler (); +if (error) { +pr_err ("%s: error registering the RMI F12 handler: %d\n" , + __func__, error); + goto err_unregister_f11; + } + error =rmi_register_physical_driver ();if (error) {pr_err ("%s: error registering the RMI physical driver: %d\n" , __func__, error); - goto err_unregister_f11; + goto err_unregister_f12; }return 0 ; + +err_unregister_f12: +rmi_unregister_f12_handler (); err_unregister_f11:rmi_unregister_f11_handler (); err_unregister_f01:
@@ -385,6 +395,7 @@ static void __exit rmi_bus_exit(void)*/ rmi_unregister_physical_driver (); +rmi_unregister_f12_handler ();rmi_unregister_f11_handler ();rmi_unregister_f01_handler ();bus_unregister (&rmi_bus_type);
drivers/input/rmi4/rmi_driver.h +8 -0
@@ -107,4 +107,12 @@ void rmi_unregister_f11_handler(void);static inline int rmi_register_f11_handler (void ) {return 0 ; }static inline void rmi_unregister_f11_handler (void ) {}#endif + +#ifdef CONFIG_RMI4_F12 +int rmi_register_f12_handler (void ); +void rmi_unregister_f12_handler (void ); +#else +static inline int rmi_register_f12_handler (void ) {return 0 ; } +static inline void rmi_unregister_f12_handler (void ) {} +#endif #endif
drivers/input/rmi4/rmi_f12.c new file +487 -0
487 lines not on this page · raw message
Signature · 1 line
2.5.0