Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 587bb985 authored by chenx's avatar chenx Committed by Jin Fu
Browse files

input: touchpanel: Add Synaptics latest version 2.7 touchpanel driver



This is the reference driver source code for synaptics touch driver,
the version is 2.7.It is used for QVR845 touchscreen.

Change-Id: I2b5a8ef1b354340a2a8afa4cc27e322672160a03
Signed-off-by: default avatarchenx <chenxiang0527@thundersoft.com>
Git-commit: 485b00bb7275ac565328166de1365013a77122f2
Git-repo: https://source.codeaurora.org/external/thundersoft/ihvjointlab/sensor-driver/commit/?h=Synaptics_ctp_v2.7


[jinf@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: default avatarJin Fu <jinf@codeaurora.org>
parent b83a8353
Loading
Loading
Loading
Loading
+62 −0
Original line number Original line Diff line number Diff line
Synaptics DSXV27 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,reset-gpio	       : reset gpio.
 - vdd_supply			   : digital voltage power supply needed to power device.
 - avdd_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.

Optional property:
 - synaptics,ub-i2c-addr       : addr of ub-i2c.
 - 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,power-delay-ms	   : power delay for controller (ms), default 100.
 - synaptics,reset-active-ms	   : reset active time for controller (ms), default 20.
 - synaptics,max-y-for-2d	   : maximal y value of the panel.
 - clock-names			: Clock names used for secure touch. They are: "iface_clk", "core_clk"
 - clocks			: Defined if 'clock-names' DT property is defined. These clocks
				  are associated with the underlying I2C bus.

Example:
	i2c@78b7000 {
		status = "ok";
		synaptics@4b {
			compatible = "synaptics,dsx-i2c";
			reg = <0x4b>;
			interrupt-parent = <&tlmm>;
			interrupts = <65 0x2008>;
			vdd_supply = <&pmtitanium_l17>;
			avdd_supply = <&pmtitanium_l6>;
			synaptics,pwr-reg-name = "vdd";
			synaptics,bus-reg-name = "avdd";
			synaptics,ub-i2c-addr = <0x2c>;
			synaptics,irq-gpio = <&tlmm 65 0x2008>;
			synaptics,reset-gpio = <&tlmm 99 0x2008>;
			synaptics,irq-on-state = <0>;
			synaptics,power-delay-ms = <200>;
			synaptics,reset-delay-ms = <200>;
			synaptics,reset-active-ms = <20>;
			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>;
			/* Underlying clocks used by secure touch */
			clock-names = "iface_clk", "core_clk";
			clocks = <&clock_gcc clk_gcc_blsp1_ahb_clk>,
				<&clock_gcc clk_gcc_blsp1_qup3_i2c_apps_clk>;
		};
	};
+10 −0
Original line number Original line Diff line number Diff line
@@ -1214,4 +1214,14 @@ config TOUCHSCREEN_ROHM_BU21023
	  To compile this driver as a module, choose M here: the
	  To compile this driver as a module, choose M here: the
	  module will be called bu21023_ts.
	  module will be called bu21023_ts.


config TOUCHSCREEN_SYNAPTICS_DSX
        bool "Synaptics Touchscreen Driver"
        depends on I2C
        help
          Say Y here if you have a Synaptics Touchscreen.

          If unsure, say N.

source "drivers/input/touchscreen/synaptics_dsx/Kconfig"

endif
endif
+1 −0
Original line number Original line Diff line number Diff line
@@ -71,6 +71,7 @@ obj-$(CONFIG_TOUCHSCREEN_STMPE) += stmpe-ts.o
obj-$(CONFIG_TOUCHSCREEN_SUN4I)		+= sun4i-ts.o
obj-$(CONFIG_TOUCHSCREEN_SUN4I)		+= sun4i-ts.o
obj-$(CONFIG_TOUCHSCREEN_SUR40)		+= sur40.o
obj-$(CONFIG_TOUCHSCREEN_SUR40)		+= sur40.o
obj-$(CONFIG_TOUCHSCREEN_SURFACE3_SPI)	+= surface3_spi.o
obj-$(CONFIG_TOUCHSCREEN_SURFACE3_SPI)	+= surface3_spi.o
obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX) += synaptics_dsx/
obj-$(CONFIG_TOUCHSCREEN_TI_AM335X_TSC)	+= ti_am335x_tsc.o
obj-$(CONFIG_TOUCHSCREEN_TI_AM335X_TSC)	+= ti_am335x_tsc.o
obj-$(CONFIG_TOUCHSCREEN_TOUCHIT213)	+= touchit213.o
obj-$(CONFIG_TOUCHSCREEN_TOUCHIT213)	+= touchit213.o
obj-$(CONFIG_TOUCHSCREEN_TOUCHRIGHT)	+= touchright.o
obj-$(CONFIG_TOUCHSCREEN_TOUCHRIGHT)	+= touchright.o
+128 −0
Original line number Original line Diff line number Diff line
#
# Synaptics DSX touchscreen driver configuration
#
menuconfig TOUCHSCREEN_SYNAPTICS_DSX
	bool "Synaptics DSX 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

choice
	default TOUCHSCREEN_SYNAPTICS_DSX_I2C
	prompt "Synaptics DSX bus interface"
config TOUCHSCREEN_SYNAPTICS_DSX_I2C
	bool "RMI over I2C"
	depends on I2C
config TOUCHSCREEN_SYNAPTICS_DSX_SPI
	bool "RMI over SPI"
	depends on SPI_MASTER
config TOUCHSCREEN_SYNAPTICS_DSX_RMI_HID_I2C
	bool "HID over I2C"
	depends on I2C
endchoice

config TOUCHSCREEN_SYNAPTICS_DSX_CORE
	tristate "Synaptics DSX core driver module"
	depends on I2C || SPI_MASTER
	help
	  Say Y here to enable basic touch reporting functionality.

	  If unsure, say N.

	  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
	help
	  Say Y here to enable support for direct RMI register access.

	  If unsure, say N.

	  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
	help
	  Say Y here to enable support for doing firmware update.

	  If unsure, say N.

	  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
	help
	  Say Y here to enable support for retrieving production test reports.

	  If unsure, say N.

	  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
	help
	  Say Y here to enable support for proximity functionality.

	  If unsure, say N.

	  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
	help
	  Say Y here to enable support for active pen functionality.

	  If unsure, say N.

	  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
	help
	  Say Y here to enable support for user defined gesture functionality.

	  If unsure, say N.

	  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
	help
	  Say Y here to enable support for video communication functionality.

	  If unsure, say N.

	  To compile this driver as a module, choose M here: the
	  module will be called synaptics_dsx_video.

config TOUCHSCREEN_SYNAPTICS_DSX_DEBUG
	tristate "Synaptics DSX debug module"
	depends on TOUCHSCREEN_SYNAPTICS_DSX_CORE
	help
	  Say Y here to enable support for firmware debug functionality.

	  If unsure, say N.

	  To compile this driver as a module, choose M here: the
	  module will be called synaptics_dsx_debug.

endif
+18 −0
Original line number Original line Diff line number Diff line
#
# Makefile for the Synaptics DSX touchscreen driver.
#

# 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_DEBUG) += synaptics_dsx_debug.o
Loading