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

Commit bab89966 authored by Mohan Pallaka's avatar Mohan Pallaka Committed by Matt Wagantall
Browse files

input: synaptics_dsx: squash commit from 3.14 kernel



Squash and apply the following touchscreen changes taken from the msm-3.14
kernel branch as of msm-3.14 commit 3bc54cf86b
(Merge "msm: camera: Add dummy sub module in sensor pipeline")

 b20792c2 input: synaptics_dsx: Fix security issues
 4f3ec831 input: synaptics_dsx: Remove use of deprecated INIT_COMPLETION
 8c5bd97f input: synaptics_dsx: change permission for sysfs secure_touch_enable
 b22c0b56 input: synaptics_dsx: reconfigure resolution in suspend
 0ea26697 touchscreen: synaptics_dsx: set absolute axes for touchscreen
 6a021e0a input: synaptics_dsx: handle all controller interrupts
 d3de3ed6 input: synaptics_dsx: remove query operation from reinit
 2285a8dd input: synaptics_dsx: remove vkey kobject in remove
 6817aed5 input: synaptics: Fix to secure touch clock unbalance
 44a84a1e input: synaptics_dsx: support for pm ops
 41439903 input: synaptics: add support for unprogrammed panels
 b029351d input: synaptics: remove outdated header
 d065c5e0 input: synaptics: add ability to distinguish touch part
 72ca30da input: synaptics_dsx: release pinctrl resources on probe failure
 0ab5f1e5 input: synaptics: add NULL pointer check
 ad4102c8 input: synaptics: Secure touch clocks
 6a77bbed input: synaptics_dsx: fix compilation warning when !CONFIG_PM_*
 f3488933 input: synaptics_dsx: reorder device resume sequence
 71b65447 input: synaptics_dsx: add support for 2D sensor for soft-keys
 610ecdc2 input: synaptics_dsx: fix data sysfs read-write permission
 06195779 input: synaptics_dsx: fix up world writable sysfs file
 995ed76d input: synaptics_dsx: add ability to identify controller
 69a416fe input: synaptic_dsx: configure touch panel boundary coordinates
 609eb34b input: synaptics_dsx: correct sysfs permissions
 59af5ffb input: synaptics_dsx: remove firmware update at boot
 13b71e2f input: synaptic_dsx: stay awake the device during firmware update
 dccee682 input: synaptic_dsx: add sysfs entry for force firmware update
 a4d13992 input: synaptics: secure touch support
 11c70731 input: synaptic_dsx: add debugfs support for suspend/resume
 2642f2cb input: synaptics_dsx: add standard features for touch support
 72f05e70 input: synaptics_dsx: add dual regulator support
 ab390caa input: synaptics_dsx: add device tree support
 51898424 input: synaptics_dsx: fix conflicts with other drivers

Signed-off-by: default avatarAlex Sarraf <asarraf@codeaurora.org>
parent cd68debc
Loading
Loading
Loading
Loading
+103 −0
Original line number Diff line number Diff line
Synaptics DSX touch controller

Required properties:

 - compatible		: should be "synaptics,dsx"
 - reg			: i2c slave address of the device
 - interrupt-parent	: parent of interrupt
 - interrupts		: touch sample interrupt to indicate presense or release
				of fingers on the panel.
 - synaptics,irq-gpio	: irq gpio
 - synaptics,reset-gpio	: reset gpio

Optional property:
 - vdd-supply			: digital voltage power supply needed to power device
 - avdd-supply			: analog voltage power supply needed to power device
 - synaptics,button-map		: virtual key code mappings to be used
 - 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,panel-coords	: touch panel min x, min y, max x and
					max y resolution
 - synaptics,display-coords	: display min x, min y, max x and
					max y resolution
 - synaptics,fw-name		: name of firmware .img file in /etc/firmware
 - synaptics,disable-gpios	: specify this to disable gpios in suspend
 - pinctrl-names		: This should be defined if a target uses pinctrl framework.
			See "pinctrl" in Documentation/devicetree/bindings/pinctrl/msm-pinctrl.txt.
			It should specify the names of the configs that pinctrl can install in driver.
			Following are the pinctrl configs that can be installed:
			"pmx_ts_active" : Active configuration of pins, this should specify active
			config defined in pin groups of interrupt and reset gpio.
			"pmx_ts_suspend" : Disabled configuration of pins, this should specify sleep
			config defined in pin groups of interrupt and reset gpio.
			"pmx_ts_release" : Release configuration of pins, this should specify
			release config defined in pin groups of interrupt and reset gpio.
 - synaptics,detect-device	: Define this property when two Synaptics Touchscreen controllers
				need to be supported without changing the DT. In this case, all
				such devices are placed as child nodes of Synaptics touchscreen
				node. Following are the properties that can be defined inside
				these child nodes:
				- synaptics-package-id
				- synaptics,panel-coords
				- synaptics-display-coords
				- synaptics,button-map
				- synaptics,key-codes
 - clocks			: Optional property that represents the clocks associated
				with the underlying bus when secure touch is enabled. This property
				is required only if secure touch is enabled and used with this driver.
 - clock-names:			: Clock names used for secure touch. The names are:
				"iface_clk", "core_clk".

Optional properties inside child node:
These properties are defined only when synaptics,detect-device property is defined in DT.
 - synaptics,package-id		: Specifies the Package Id of touch controller.
 - synaptics,panel-coords	: Specifies the Touch panel min x, min y, max x and max y
				resolution.
 - synaptics,display-coords	: Specifies the display min x, min y, max x and max y
				resolution.
 - synaptics,button-map		: Key code mappings to be used when device
				supports 0D buttons and directly sends key codes.
 - synaptics,key-codes		: Virtual key code mappings to be used when device
				supports 2D buttons and sends coordinates instead of
				key codes.
 - synaptics,bypass-sensor-coords-check : Bypass the comparison of sensor coordinates
				range read from DT and touch controller. Used when some
				touch panels in the field are unprogrammed and misprogrammed.

Example:
	i2c@f9927000 {
		synaptics@20 {
			compatible = "synaptics,dsx"
			reg = <0x20>;
			interrupt-parent = <&msmgpio>;
			interrupts = <17 0x2>;
			vdd-supply = <&pm8226_l19>;
			avdd-supply = <&pm8226_lvs1>;
			synaptics,reset-gpio = <&msmgpio 16 0x00>;
			synaptics,irq-gpio = <&msmgpio 17 0x00>;
			synaptics,reset-delay-ms = <100>;
			synaptics,x-flip;
			synaptics,y-flip;
			synaptics,disable-gpios;
			synaptics,fw-name = "PR1610974.img";
			pinctrl-names = "pmx_ts_active","pmx_ts_suspend", "pmx_ts_release";
			pinctrl-0 = <&ts_int_active &ts_reset_active>;
			pinctrl-1 = <&ts_int_suspend &ts_reset_suspend>;
			pinctrl-2 = <&ts_release>;
			synaptics,detect-device;
			synaptics,device1 {
				synaptics,package-id = <3202>;
				synaptics,button-map = <139 172 158>;
			};
			synaptics,device2 {
				synaptics,package-id = <3408>;
				synaptics,display-coords = <0 0 1079 1919>;
				synaptics,panel-coords = <0 0 1079 2084>;
				synaptics,key-codes = <139 172 158 217>;
			};
			clocks = <&clock_gcc clk_gcc_blsp1_ahb_clk>,
			 <&clock_gcc clk_gcc_blsp1_qup5_i2c_apps_clk>;
			clock-names = "iface_clk", "core_clk";
		};
	};
+11 −0
Original line number Diff line number Diff line
@@ -11,6 +11,8 @@ menuconfig INPUT_TOUCHSCREEN

if INPUT_TOUCHSCREEN

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

config OF_TOUCHSCREEN
	def_tristate INPUT
	depends on INPUT && OF
@@ -962,4 +964,13 @@ config TOUCHSCREEN_ZFORCE
	  To compile this driver as a module, choose M here: the
	  module will be called zforce_ts.

config SECURE_TOUCH
	bool "Secure Touch"
	depends on (TOUCHSCREEN_SYNAPTICS_I2C_RMI4 || \
	  TOUCHSCREEN_SYNAPTICS_DSX_I2C_v21)
	help
	  Say Y here to enable Secure Touch in supported drivers.

	  If unsure, say N.

endif
+1 −0
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ obj-$(CONFIG_TOUCHSCREEN_ST1232) += st1232.o
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_TI_AM335X_TSC)	+= ti_am335x_tsc.o
obj-$(CONFIG_TOUCHSCREEN_TOUCHIT213)	+= touchit213.o
obj-$(CONFIG_TOUCHSCREEN_TOUCHRIGHT)	+= touchright.o
+29 −13
Original line number Diff line number Diff line
#
# Synaptics DSX touchscreen driver configuration
#
menuconfig TOUCHSCREEN_SYNAPTICS_DSX
menuconfig TOUCHSCREEN_SYNAPTICS_DSX_v21
	bool "Synaptics DSX touchscreen"
	default y
	help
@@ -10,22 +10,38 @@ menuconfig TOUCHSCREEN_SYNAPTICS_DSX

	  If unsure, say N.

if TOUCHSCREEN_SYNAPTICS_DSX
if TOUCHSCREEN_SYNAPTICS_DSX_v21

choice
	default TOUCHSCREEN_SYNAPTICS_DSX_I2C
	default TOUCHSCREEN_SYNAPTICS_DSX_I2C_v21
	prompt "Synaptics DSX touchscreen bus interface"
config TOUCHSCREEN_SYNAPTICS_DSX_I2C

config TOUCHSCREEN_SYNAPTICS_DSX_I2C_v21
	bool "I2C"
	depends on I2C
config TOUCHSCREEN_SYNAPTICS_DSX_SPI
	help
	  Say Y here if you have a Synaptics DSX touchscreen interfaced
	  to the host processor over I2C

	  If unsure, say N.

	  This module uses the services of DSX CORE

config TOUCHSCREEN_SYNAPTICS_DSX_SPI_v21
	bool "SPI"
	depends on SPI_MASTER
	help
	  Say Y here if you have a Synaptics DSX touchscreen interfaced
	  to the host processor over SPI

	  If unsure, say N.

	  This module uses the services of DSX CORE
endchoice

config TOUCHSCREEN_SYNAPTICS_DSX_CORE
config TOUCHSCREEN_SYNAPTICS_DSX_CORE_v21
	tristate "Synaptics DSX core driver module"
	depends on TOUCHSCREEN_SYNAPTICS_DSX_I2C || TOUCHSCREEN_SYNAPTICS_DSX_SPI
	depends on TOUCHSCREEN_SYNAPTICS_DSX_I2C_v21 || TOUCHSCREEN_SYNAPTICS_DSX_SPI_v21
	help
	  Say Y here to enable basic touch reporting functionalities.

@@ -34,9 +50,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
config TOUCHSCREEN_SYNAPTICS_DSX_RMI_DEV_v21
	tristate "Synaptics DSX touchscreen RMI device module"
	depends on TOUCHSCREEN_SYNAPTICS_DSX_CORE
	depends on TOUCHSCREEN_SYNAPTICS_DSX_CORE_v21
	help
	  Say Y here to enable support for direct RMI register access.

@@ -45,9 +61,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
config TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_v21
	tristate "Synaptics DSX touchscreen firmware update module"
	depends on TOUCHSCREEN_SYNAPTICS_DSX_CORE
	depends on TOUCHSCREEN_SYNAPTICS_DSX_CORE_v21
	help
	  Say Y here to enable support for carrying out firmware update.

@@ -56,9 +72,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_PROXIMITY
config TOUCHSCREEN_SYNAPTICS_DSX_PROXIMITY_v21
	tristate "Synaptics DSX touchscreen proximity module"
	depends on TOUCHSCREEN_SYNAPTICS_DSX_CORE
	depends on TOUCHSCREEN_SYNAPTICS_DSX_CORE_v21
	help
	  Say Y here to enable support for proximity functionalities.

+6 −6
Original line number Diff line number Diff line
@@ -4,9 +4,9 @@

# 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_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_PROXIMITY) += synaptics_dsx_proximity.o
obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_I2C_v21) += synaptics_dsx_i2c.o
obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_SPI_v21) += synaptics_dsx_spi.o
obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_CORE_v21) += synaptics_dsx_core.o
obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_RMI_DEV_v21) += synaptics_dsx_rmi_dev.o
obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_v21) += synaptics_dsx_fw_update.o
obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_PROXIMITY_v21) += synaptics_dsx_proximity.o
Loading