diff options
18 files changed, 159 insertions, 102 deletions
diff --git a/Documentation/devicetree/bindings/input/touchscreen/synaptics_dsxv26_i2c.txt b/Documentation/devicetree/bindings/input/touchscreen/synaptics_dsxv26_i2c.txt new file mode 100644 index 000000000000..7dece8e06240 --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/synaptics_dsxv26_i2c.txt @@ -0,0 +1,50 @@ +Synaptics DSXV26 touch controller + +Please add this description here: The Synaptics Touch controller is connected to the +host processor via I2C. The controller generates interrupts when the user touches +the panel. The host controller is expected to read the touch coordinates over I2C and +pass the coordinates to the rest of the system. + +Required properties: + + - compatible : should be "synaptics,dsx-i2c". + - reg : i2c slave address of the device. + - interrupt-parent : parent of interrupt. + - synaptics,irq-gpio : irq gpio. + - synaptics,irq-flags : irq flags. + +Optional property: + - vdd_ana-supply : digital voltage power supply needed to power device. + - vcc_i2c-supply : analog voltage power supply needed to power device. + - synaptics,pwr-reg-name : power reg name of digital voltage. + - synaptics,bus-reg-name : bus reg name of analog voltage. + - synaptics,irq-on-state : status of irq gpio. + - synaptics,cap-button-codes : virtual key code mappings to be used. + - synaptics,vir-button-codes : virtual key code and the response region on panel. + - synaptics,x-flip : modify orientation of the x axis. + - synaptics,y-flip : modify orientation of the y axis. + - synaptics,reset-delay-ms : reset delay for controller (ms), default 100. + - synaptics,max-y-for-2d : maximal y value of the panel. + +Example: + i2c@78b7000 { + status = "ok"; + synaptics@4b { + compatible = "synaptics,dsx-i2c"; + reg = <0x4b>; + interrupt-parent = <&tlmm>; + interrupts = <65 0x2008>; + vdd_ana-supply = <&pmtitanium_l17>; + vcc_i2c-supply = <&pmtitanium_l6>; + synaptics,pwr-reg-name = "vdd_ana"; + synaptics,bus-reg-name = "vcc_i2c"; + synaptics,irq-gpio = <&tlmm 65 0x2008>; + synaptics,irq-on-state = <0>; + synaptics,irq-flags = <0x2008>; /* IRQF_ONESHOT | IRQF_TRIGGER_LOW */ + synaptics,power-delay-ms = <200>; + synaptics,reset-delay-ms = <200>; + synaptics,max-y-for-2d = <1919>; /* remove if no virtual buttons */ + synaptics,cap-button-codes = <139 172 158>; + synaptics,vir-button-codes = <139 180 2000 320 160 172 540 2000 320 160 158 900 2000 320 160>; + }; + }; diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index fa87a7733074..93ad9df1f294 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig @@ -12,6 +12,7 @@ menuconfig INPUT_TOUCHSCREEN if INPUT_TOUCHSCREEN source "drivers/input/touchscreen/synaptics_dsx/Kconfig" +source "drivers/input/touchscreen/synaptics_dsx_2.6/Kconfig" config OF_TOUCHSCREEN def_tristate INPUT diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile index 66f45d0e2eef..aaf7f587ed19 100644 --- a/drivers/input/touchscreen/Makefile +++ b/drivers/input/touchscreen/Makefile @@ -68,6 +68,7 @@ obj-$(CONFIG_TOUCHSCREEN_STMPE) += stmpe-ts.o obj-$(CONFIG_TOUCHSCREEN_SUN4I) += sun4i-ts.o obj-$(CONFIG_TOUCHSCREEN_SUR40) += sur40.o obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_v21) += synaptics_dsx/ +obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_v26) += synaptics_dsx_2.6/ obj-$(CONFIG_TOUCHSCREEN_TI_AM335X_TSC) += ti_am335x_tsc.o obj-$(CONFIG_TOUCHSCREEN_TOUCHIT213) += touchit213.o obj-$(CONFIG_TOUCHSCREEN_TOUCHRIGHT) += touchright.o diff --git a/drivers/input/touchscreen/synaptics_dsx_2.6/Kconfig b/drivers/input/touchscreen/synaptics_dsx_2.6/Kconfig index b40f26e0a555..78b995ec7c8a 100644 --- a/drivers/input/touchscreen/synaptics_dsx_2.6/Kconfig +++ b/drivers/input/touchscreen/synaptics_dsx_2.6/Kconfig @@ -1,33 +1,33 @@ # -# Synaptics DSX touchscreen driver configuration +# Synaptics DSX v2.6 touchscreen driver configuration # -menuconfig TOUCHSCREEN_SYNAPTICS_DSX - bool "Synaptics DSX touchscreen" - default N +menuconfig TOUCHSCREEN_SYNAPTICS_DSX_v26 + bool "Synaptics DSX v2.6 touchscreen" + default y help Say Y here if you have a Synaptics DSX touchscreen connected to your system. If unsure, say N. -if TOUCHSCREEN_SYNAPTICS_DSX +if TOUCHSCREEN_SYNAPTICS_DSX_v26 choice - default TOUCHSCREEN_SYNAPTICS_DSX_I2C - prompt "Synaptics DSX bus interface" -config TOUCHSCREEN_SYNAPTICS_DSX_I2C + default TOUCHSCREEN_SYNAPTICS_DSX_I2C_v26 + prompt "Synaptics DSX v2.6 bus interface" +config TOUCHSCREEN_SYNAPTICS_DSX_I2C_v26 bool "RMI over I2C" depends on I2C -config TOUCHSCREEN_SYNAPTICS_DSX_SPI +config TOUCHSCREEN_SYNAPTICS_DSX_SPI_v26 bool "RMI over SPI" depends on SPI_MASTER -config TOUCHSCREEN_SYNAPTICS_DSX_RMI_HID_I2C +config TOUCHSCREEN_SYNAPTICS_DSX_RMI_HID_I2C_v26 bool "HID over I2C" depends on I2C endchoice -config TOUCHSCREEN_SYNAPTICS_DSX_CORE - tristate "Synaptics DSX core driver module" +config TOUCHSCREEN_SYNAPTICS_DSX_CORE_v26 + tristate "Synaptics DSX v2.6 core driver module" depends on I2C || SPI_MASTER help Say Y here to enable basic touch reporting functionality. @@ -37,9 +37,9 @@ config TOUCHSCREEN_SYNAPTICS_DSX_CORE To compile this driver as a module, choose M here: the module will be called synaptics_dsx_core. -config TOUCHSCREEN_SYNAPTICS_DSX_RMI_DEV - tristate "Synaptics DSX RMI device module" - depends on TOUCHSCREEN_SYNAPTICS_DSX_CORE +config TOUCHSCREEN_SYNAPTICS_DSX_RMI_DEV_v26 + tristate "Synaptics DSX v2.6 RMI device module" + depends on TOUCHSCREEN_SYNAPTICS_DSX_CORE_v26 help Say Y here to enable support for direct RMI register access. @@ -48,9 +48,9 @@ config TOUCHSCREEN_SYNAPTICS_DSX_RMI_DEV To compile this driver as a module, choose M here: the module will be called synaptics_dsx_rmi_dev. -config TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE - tristate "Synaptics DSX firmware update module" - depends on TOUCHSCREEN_SYNAPTICS_DSX_CORE +config TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_v26 + tristate "Synaptics DSX v2.6 firmware update module" + depends on TOUCHSCREEN_SYNAPTICS_DSX_CORE_v26 help Say Y here to enable support for doing firmware update. @@ -59,9 +59,9 @@ config TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE To compile this driver as a module, choose M here: the module will be called synaptics_dsx_fw_update. -config TOUCHSCREEN_SYNAPTICS_DSX_TEST_REPORTING - tristate "Synaptics DSX test reporting module" - depends on TOUCHSCREEN_SYNAPTICS_DSX_CORE +config TOUCHSCREEN_SYNAPTICS_DSX_TEST_REPORTING_v26 + tristate "Synaptics DSX v2.6 test reporting module" + depends on TOUCHSCREEN_SYNAPTICS_DSX_CORE_v26 help Say Y here to enable support for retrieving production test reports. @@ -70,9 +70,9 @@ config TOUCHSCREEN_SYNAPTICS_DSX_TEST_REPORTING To compile this driver as a module, choose M here: the module will be called synaptics_dsx_test_reporting. -config TOUCHSCREEN_SYNAPTICS_DSX_PROXIMITY - tristate "Synaptics DSX proximity module" - depends on TOUCHSCREEN_SYNAPTICS_DSX_CORE +config TOUCHSCREEN_SYNAPTICS_DSX_PROXIMITY_v26 + tristate "Synaptics DSX v2.6 proximity module" + depends on TOUCHSCREEN_SYNAPTICS_DSX_CORE_v26 help Say Y here to enable support for proximity functionality. @@ -81,9 +81,9 @@ config TOUCHSCREEN_SYNAPTICS_DSX_PROXIMITY To compile this driver as a module, choose M here: the module will be called synaptics_dsx_proximity. -config TOUCHSCREEN_SYNAPTICS_DSX_ACTIVE_PEN - tristate "Synaptics DSX active pen module" - depends on TOUCHSCREEN_SYNAPTICS_DSX_CORE +config TOUCHSCREEN_SYNAPTICS_DSX_ACTIVE_PEN_v26 + tristate "Synaptics DSX v2.6 active pen module" + depends on TOUCHSCREEN_SYNAPTICS_DSX_CORE_v26 help Say Y here to enable support for active pen functionality. @@ -92,9 +92,9 @@ config TOUCHSCREEN_SYNAPTICS_DSX_ACTIVE_PEN To compile this driver as a module, choose M here: the module will be called synaptics_dsx_active_pen. -config TOUCHSCREEN_SYNAPTICS_DSX_GESTURE - tristate "Synaptics DSX user defined gesture module" - depends on TOUCHSCREEN_SYNAPTICS_DSX_CORE +config TOUCHSCREEN_SYNAPTICS_DSX_GESTURE_v26 + tristate "Synaptics DSX v2.6 user defined gesture module" + depends on TOUCHSCREEN_SYNAPTICS_DSX_CORE_v26 help Say Y here to enable support for user defined gesture functionality. @@ -103,9 +103,9 @@ config TOUCHSCREEN_SYNAPTICS_DSX_GESTURE To compile this driver as a module, choose M here: the module will be called synaptics_dsx_gesture. -config TOUCHSCREEN_SYNAPTICS_DSX_VIDEO - tristate "Synaptics DSX video module" - depends on TOUCHSCREEN_SYNAPTICS_DSX_CORE +config TOUCHSCREEN_SYNAPTICS_DSX_VIDEO_v26 + tristate "Synaptics DSX v2.6 video module" + depends on TOUCHSCREEN_SYNAPTICS_DSX_CORE_v26 help Say Y here to enable support for video communication functionality. diff --git a/drivers/input/touchscreen/synaptics_dsx_2.6/Makefile b/drivers/input/touchscreen/synaptics_dsx_2.6/Makefile index 515bc17e1563..e5e72153f8c4 100644 --- a/drivers/input/touchscreen/synaptics_dsx_2.6/Makefile +++ b/drivers/input/touchscreen/synaptics_dsx_2.6/Makefile @@ -4,14 +4,14 @@ # Each configuration option enables a list of files. -obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_I2C) += synaptics_dsx_i2c.o -obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_SPI) += synaptics_dsx_spi.o -obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_RMI_HID_I2C) += synaptics_dsx_rmi_hid_i2c.o -obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_CORE) += synaptics_dsx_core.o -obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_RMI_DEV) += synaptics_dsx_rmi_dev.o -obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE) += synaptics_dsx_fw_update.o -obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_TEST_REPORTING) += synaptics_dsx_test_reporting.o -obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_PROXIMITY) += synaptics_dsx_proximity.o -obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_ACTIVE_PEN) += synaptics_dsx_active_pen.o -obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_GESTURE) += synaptics_dsx_gesture.o -obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_VIDEO) += synaptics_dsx_video.o +obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_I2C_v26) += synaptics_dsx_i2c.o +obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_SPI_v26) += synaptics_dsx_spi.o +obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_RMI_HID_I2C_v26) += synaptics_dsx_rmi_hid_i2c.o +obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_CORE_v26) += synaptics_dsx_core.o +obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_RMI_DEV_v26) += synaptics_dsx_rmi_dev.o +obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_v26) += synaptics_dsx_fw_update.o +obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_TEST_REPORTING_v26) += synaptics_dsx_test_reporting.o +obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_PROXIMITY_v26) += synaptics_dsx_proximity.o +obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_ACTIVE_PEN_v26) += synaptics_dsx_active_pen.o +obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_GESTURE_v26) += synaptics_dsx_gesture.o +obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_VIDEO_v26) += synaptics_dsx_video.o diff --git a/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_active_pen.c b/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_active_pen.c index 0e617084e911..db5324ab09fe 100644 --- a/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_active_pen.c +++ b/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_active_pen.c @@ -38,7 +38,7 @@ #include <linux/delay.h> #include <linux/input.h> #include <linux/platform_device.h> -#include <linux/input/synaptics_dsx.h> +#include <linux/input/synaptics_dsx_v2_6.h> #include "synaptics_dsx_core.h" #define APEN_PHYS_NAME "synaptics_dsx/active_pen" diff --git a/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_core.c b/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_core.c index 158329925a32..07d2c479aa39 100644 --- a/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_core.c +++ b/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_core.c @@ -40,7 +40,7 @@ #include <linux/gpio.h> #include <linux/platform_device.h> #include <linux/regulator/consumer.h> -#include <linux/input/synaptics_dsx.h> +#include <linux/input/synaptics_dsx_v2_6.h> #include "synaptics_dsx_core.h" #ifdef KERNEL_ABOVE_2_6_38 #include <linux/input/mt.h> @@ -67,11 +67,11 @@ #define F12_DATA_15_WORKAROUND #define IGNORE_FN_INIT_FAILURE -/* + #define FB_READY_RESET #define FB_READY_WAIT_MS 100 #define FB_READY_TIMEOUT_S 30 -*/ + #define RPT_TYPE (1 << 0) #define RPT_X_LSB (1 << 1) #define RPT_X_MSB (1 << 2) @@ -596,7 +596,7 @@ static struct synaptics_rmi4_exp_fn_data exp_data; static struct synaptics_dsx_button_map *vir_button_map; static struct device_attribute attrs[] = { - __ATTR(reset, S_IWUGO, + __ATTR(reset, S_IRUGO | S_IWUSR | S_IWGRP, synaptics_rmi4_show_error, synaptics_rmi4_f01_reset_store), __ATTR(productinfo, S_IRUGO, @@ -608,13 +608,13 @@ static struct device_attribute attrs[] = { __ATTR(flashprog, S_IRUGO, synaptics_rmi4_f01_flashprog_show, synaptics_rmi4_store_error), - __ATTR(0dbutton, (S_IRUGO | S_IWUGO), + __ATTR(0dbutton, (S_IRUGO | S_IWUSR | S_IWGRP), synaptics_rmi4_0dbutton_show, synaptics_rmi4_0dbutton_store), - __ATTR(suspend, S_IWUGO, + __ATTR(suspend, S_IRUGO | S_IWUSR | S_IWGRP, synaptics_rmi4_show_error, synaptics_rmi4_suspend_store), - __ATTR(wake_gesture, (S_IRUGO | S_IWUGO), + __ATTR(wake_gesture, (S_IRUGO | S_IWUSR | S_IWGRP), synaptics_rmi4_wake_gesture_show, synaptics_rmi4_wake_gesture_store), }; @@ -1422,6 +1422,11 @@ static void synaptics_rmi4_sensor_report(struct synaptics_rmi4_data *rmi4_data, rmi = &(rmi4_data->rmi4_mod_info); + if (rmi4_data->stay_awake) { + msleep(30); + return; + } + /* * Get interrupt status information from F01 Data1 register to * determine the source(s) that are flagging the interrupt. @@ -4306,7 +4311,7 @@ static int __init synaptics_rmi4_init(void) { int retval; - retval = synaptics_rmi4_bus_init(); + retval = synaptics_rmi4_bus_init_v26(); if (retval) return retval; @@ -4317,7 +4322,7 @@ static void __exit synaptics_rmi4_exit(void) { platform_driver_unregister(&synaptics_rmi4_driver); - synaptics_rmi4_bus_exit(); + synaptics_rmi4_bus_exit_v26(); return; } diff --git a/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_core.h b/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_core.h index 1b4079cfda6a..0de0e9905cb4 100644 --- a/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_core.h +++ b/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_core.h @@ -405,9 +405,9 @@ struct synaptics_rmi4_exp_fn { unsigned char intr_mask); }; -int synaptics_rmi4_bus_init(void); +int synaptics_rmi4_bus_init_v26(void); -void synaptics_rmi4_bus_exit(void); +void synaptics_rmi4_bus_exit_v26(void); void synaptics_rmi4_new_function(struct synaptics_rmi4_exp_fn *exp_fn_module, bool insert); diff --git a/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_fw_update.c b/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_fw_update.c index 5dd0ec4e53cc..34201f3957c3 100644 --- a/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_fw_update.c +++ b/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_fw_update.c @@ -39,7 +39,7 @@ #include <linux/input.h> #include <linux/firmware.h> #include <linux/platform_device.h> -#include <linux/input/synaptics_dsx.h> +#include <linux/input/synaptics_dsx_v2_6.h> #include "synaptics_dsx_core.h" #define FW_IMAGE_NAME "synaptics/startup_fw_update.img" @@ -661,25 +661,25 @@ static struct bin_attribute dev_attr_data = { }; static struct device_attribute attrs[] = { - __ATTR(dorecovery, S_IWUGO, + __ATTR(dorecovery, S_IRUGO | S_IWUSR | S_IWGRP, synaptics_rmi4_show_error, fwu_sysfs_do_recovery_store), - __ATTR(doreflash, S_IWUGO, + __ATTR(doreflash, S_IRUGO | S_IWUSR | S_IWGRP, synaptics_rmi4_show_error, fwu_sysfs_do_reflash_store), - __ATTR(writeconfig, S_IWUGO, + __ATTR(writeconfig, S_IRUGO | S_IWUSR | S_IWGRP, synaptics_rmi4_show_error, fwu_sysfs_write_config_store), - __ATTR(readconfig, S_IWUGO, + __ATTR(readconfig, S_IRUGO | S_IWUSR | S_IWGRP, synaptics_rmi4_show_error, fwu_sysfs_read_config_store), - __ATTR(configarea, S_IWUGO, + __ATTR(configarea, S_IRUGO | S_IWUSR | S_IWGRP, synaptics_rmi4_show_error, fwu_sysfs_config_area_store), - __ATTR(imagename, S_IWUGO, + __ATTR(imagename, S_IRUGO | S_IWUSR | S_IWGRP, synaptics_rmi4_show_error, fwu_sysfs_image_name_store), - __ATTR(imagesize, S_IWUGO, + __ATTR(imagesize, S_IRUGO | S_IWUSR | S_IWGRP, synaptics_rmi4_show_error, fwu_sysfs_image_size_store), __ATTR(blocksize, S_IRUGO, @@ -703,7 +703,7 @@ static struct device_attribute attrs[] = { __ATTR(guestcodeblockcount, S_IRUGO, fwu_sysfs_guest_code_block_count_show, synaptics_rmi4_store_error), - __ATTR(writeguestcode, S_IWUGO, + __ATTR(writeguestcode, S_IRUGO | S_IWUSR | S_IWGRP, synaptics_rmi4_show_error, fwu_sysfs_write_guest_code_store), }; diff --git a/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_gesture.c b/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_gesture.c index 7630a60737cd..dcada834c6cb 100644 --- a/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_gesture.c +++ b/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_gesture.c @@ -38,7 +38,7 @@ #include <linux/delay.h> #include <linux/input.h> #include <linux/platform_device.h> -#include <linux/input/synaptics_dsx.h> +#include <linux/input/synaptics_dsx_v2_6.h> #include "synaptics_dsx_core.h" #define GESTURE_PHYS_NAME "synaptics_dsx/gesture" diff --git a/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_i2c.c b/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_i2c.c index 3be3bcaab29a..784de607aa08 100644 --- a/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_i2c.c +++ b/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_i2c.c @@ -40,7 +40,7 @@ #include <linux/types.h> #include <linux/of_gpio.h> #include <linux/platform_device.h> -#include <linux/input/synaptics_dsx.h> +#include <linux/input/synaptics_dsx_v2_6.h> #include "synaptics_dsx_core.h" #define SYN_I2C_RETRY_TIMES 10 @@ -625,13 +625,13 @@ static struct i2c_driver synaptics_rmi4_i2c_driver = { .id_table = synaptics_rmi4_id_table, }; -int synaptics_rmi4_bus_init(void) +int synaptics_rmi4_bus_init_v26(void) { return i2c_add_driver(&synaptics_rmi4_i2c_driver); } -EXPORT_SYMBOL(synaptics_rmi4_bus_init); +EXPORT_SYMBOL(synaptics_rmi4_bus_init_v26); -void synaptics_rmi4_bus_exit(void) +void synaptics_rmi4_bus_exit_v26(void) { kfree(wr_buf); @@ -639,7 +639,7 @@ void synaptics_rmi4_bus_exit(void) return; } -EXPORT_SYMBOL(synaptics_rmi4_bus_exit); +EXPORT_SYMBOL(synaptics_rmi4_bus_exit_v26); MODULE_AUTHOR("Synaptics, Inc."); MODULE_DESCRIPTION("Synaptics DSX I2C Bus Support Module"); diff --git a/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_proximity.c b/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_proximity.c index 2507c7743d9a..d9e27c306af5 100644 --- a/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_proximity.c +++ b/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_proximity.c @@ -38,7 +38,7 @@ #include <linux/delay.h> #include <linux/input.h> #include <linux/platform_device.h> -#include <linux/input/synaptics_dsx.h> +#include <linux/input/synaptics_dsx_v2_6.h> #include "synaptics_dsx_core.h" #define PROX_PHYS_NAME "synaptics_dsx/proximity" diff --git a/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_rmi_dev.c b/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_rmi_dev.c index 9d19bda545f7..582e43666b17 100644 --- a/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_rmi_dev.c +++ b/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_rmi_dev.c @@ -43,7 +43,7 @@ #include <linux/uaccess.h> #include <linux/cdev.h> #include <linux/platform_device.h> -#include <linux/input/synaptics_dsx.h> +#include <linux/input/synaptics_dsx_v2_6.h> #include "synaptics_dsx_core.h" #define CHAR_DEVICE_NAME "rmi" @@ -118,7 +118,7 @@ struct rmidev_data { static struct bin_attribute attr_data = { .attr = { .name = "data", - .mode = (S_IRUGO | S_IWUGO), + .mode = (S_IRUGO | S_IWUSR), }, .size = 0, .read = rmidev_sysfs_data_show, @@ -126,25 +126,25 @@ static struct bin_attribute attr_data = { }; static struct device_attribute attrs[] = { - __ATTR(open, S_IWUGO, + __ATTR(open, S_IRUGO | S_IWUSR | S_IWGRP, synaptics_rmi4_show_error, rmidev_sysfs_open_store), - __ATTR(release, S_IWUGO, + __ATTR(release, S_IRUGO | S_IWUSR | S_IWGRP, synaptics_rmi4_show_error, rmidev_sysfs_release_store), __ATTR(attn_state, S_IRUGO, rmidev_sysfs_attn_state_show, synaptics_rmi4_store_error), - __ATTR(pid, S_IRUGO | S_IWUGO, + __ATTR(pid, S_IRUGO | S_IRUGO | S_IWUSR | S_IWGRP, rmidev_sysfs_pid_show, rmidev_sysfs_pid_store), - __ATTR(term, S_IWUGO, + __ATTR(term, S_IRUGO | S_IWUSR | S_IWGRP, synaptics_rmi4_show_error, rmidev_sysfs_term_store), - __ATTR(intr_mask, S_IRUGO | S_IWUGO, + __ATTR(intr_mask, S_IRUGO, rmidev_sysfs_intr_mask_show, rmidev_sysfs_intr_mask_store), - __ATTR(concurrent, S_IRUGO | S_IWUGO, + __ATTR(concurrent, S_IRUGO, rmidev_sysfs_concurrent_show, rmidev_sysfs_concurrent_store), }; @@ -155,7 +155,7 @@ static struct class *rmidev_device_class; static struct rmidev_handle *rmidev; -DECLARE_COMPLETION(rmidev_remove_complete); +DECLARE_COMPLETION(rmidev_remove_complete_v26); static irqreturn_t rmidev_sysfs_irq(int irq, void *data) { @@ -1016,7 +1016,7 @@ static void rmidev_remove_device(struct synaptics_rmi4_data *rmi4_data) rmidev = NULL; exit: - complete(&rmidev_remove_complete); + complete(&rmidev_remove_complete_v26); return; } @@ -1045,7 +1045,7 @@ static void __exit rmidev_module_exit(void) { synaptics_rmi4_new_function(&rmidev_module, false); - wait_for_completion(&rmidev_remove_complete); + wait_for_completion(&rmidev_remove_complete_v26); return; } diff --git a/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_rmi_hid_i2c.c b/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_rmi_hid_i2c.c index df6e357a8ec3..7e02487ece5a 100644 --- a/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_rmi_hid_i2c.c +++ b/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_rmi_hid_i2c.c @@ -42,7 +42,7 @@ #include <linux/types.h> #include <linux/of_gpio.h> #include <linux/platform_device.h> -#include <linux/input/synaptics_dsx.h> +#include <linux/input/synaptics_dsx_v2_6.h> #include "synaptics_dsx_core.h" #define SYN_I2C_RETRY_TIMES 10 @@ -987,19 +987,19 @@ static struct i2c_driver synaptics_rmi4_i2c_driver = { .id_table = synaptics_rmi4_id_table, }; -int synaptics_rmi4_bus_init(void) +int synaptics_rmi4_bus_init_v26(void) { return i2c_add_driver(&synaptics_rmi4_i2c_driver); } -EXPORT_SYMBOL(synaptics_rmi4_bus_init); +EXPORT_SYMBOL(synaptics_rmi4_bus_init_v26); -void synaptics_rmi4_bus_exit(void) +void synaptics_rmi4_bus_exit_v26(void) { i2c_del_driver(&synaptics_rmi4_i2c_driver); return; } -EXPORT_SYMBOL(synaptics_rmi4_bus_exit); +EXPORT_SYMBOL(synaptics_rmi4_bus_exit_v26); MODULE_AUTHOR("Synaptics, Inc."); MODULE_DESCRIPTION("Synaptics DSX I2C Bus Support Module"); diff --git a/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_spi.c b/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_spi.c index d5d9c3cbf633..382a3dd029d7 100644 --- a/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_spi.c +++ b/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_spi.c @@ -40,7 +40,7 @@ #include <linux/types.h> #include <linux/of_gpio.h> #include <linux/platform_device.h> -#include <linux/input/synaptics_dsx.h> +#include <linux/input/synaptics_dsx_v2_6.h> #include "synaptics_dsx_core.h" #define SPI_READ 0x80 @@ -615,19 +615,19 @@ static struct spi_driver synaptics_rmi4_spi_driver = { }; -int synaptics_rmi4_bus_init(void) +int synaptics_rmi4_bus_init_v26(void) { return spi_register_driver(&synaptics_rmi4_spi_driver); } -EXPORT_SYMBOL(synaptics_rmi4_bus_init); +EXPORT_SYMBOL(synaptics_rmi4_bus_init_v26); -void synaptics_rmi4_bus_exit(void) +void synaptics_rmi4_bus_exit_v26(void) { spi_unregister_driver(&synaptics_rmi4_spi_driver); return; } -EXPORT_SYMBOL(synaptics_rmi4_bus_exit); +EXPORT_SYMBOL(synaptics_rmi4_bus_exit_v26); MODULE_AUTHOR("Synaptics, Inc."); MODULE_DESCRIPTION("Synaptics DSX SPI Bus Support Module"); diff --git a/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_test_reporting.c b/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_test_reporting.c index 6ed7bd62a6a4..a401457c3e4a 100644 --- a/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_test_reporting.c +++ b/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_test_reporting.c @@ -40,7 +40,7 @@ #include <linux/ctype.h> #include <linux/hrtimer.h> #include <linux/platform_device.h> -#include <linux/input/synaptics_dsx.h> +#include <linux/input/synaptics_dsx_v2_6.h> #include "synaptics_dsx_core.h" #define SYSFS_FOLDER_NAME "f54" diff --git a/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_video.c b/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_video.c index 493410ee0472..0916529e64e4 100644 --- a/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_video.c +++ b/drivers/input/touchscreen/synaptics_dsx_2.6/synaptics_dsx_video.c @@ -37,7 +37,7 @@ #include <linux/delay.h> #include <linux/input.h> #include <linux/platform_device.h> -#include <linux/input/synaptics_dsx.h> +#include <linux/input/synaptics_dsx_v2_6.h> #include "synaptics_dsx_core.h" #define SYSFS_FOLDER_NAME "video" diff --git a/include/linux/input/synaptics_dsx_v2_6.h b/include/linux/input/synaptics_dsx_v2_6.h index 7deef3551b83..2b91bc043f6f 100644 --- a/include/linux/input/synaptics_dsx_v2_6.h +++ b/include/linux/input/synaptics_dsx_v2_6.h @@ -34,13 +34,13 @@ #ifndef _SYNAPTICS_DSX_H_ #define _SYNAPTICS_DSX_H_ -#define PLATFORM_DRIVER_NAME "synaptics_dsx" -#define STYLUS_DRIVER_NAME "synaptics_dsx_stylus" -#define ACTIVE_PEN_DRIVER_NAME "synaptics_dsx_active_pen" -#define PROXIMITY_DRIVER_NAME "synaptics_dsx_proximity" -#define GESTURE_DRIVER_NAME "synaptics_dsx_gesture" -#define I2C_DRIVER_NAME "synaptics_dsx_i2c" -#define SPI_DRIVER_NAME "synaptics_dsx_spi" +#define PLATFORM_DRIVER_NAME "synaptics_dsxv26" +#define STYLUS_DRIVER_NAME "synaptics_dsxv26_stylus" +#define ACTIVE_PEN_DRIVER_NAME "synaptics_dsxv26_active_pen" +#define PROXIMITY_DRIVER_NAME "synaptics_dsxv26_proximity" +#define GESTURE_DRIVER_NAME "synaptics_dsxv26_gesture" +#define I2C_DRIVER_NAME "synaptics_dsxv26" +#define SPI_DRIVER_NAME "synaptics_dsxv26" /* * struct synaptics_dsx_button_map - button map |
