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

Commit bad53a95 authored by Amy Maloche's avatar Amy Maloche Committed by Gerrit - the friendly Code Review server
Browse files

input: touchscreen: Propagating fixes for ft5x06 from msm-3.18



This is squash of the below gerrits from msm-3.18.

feb6ad0 ft5x06: Set input property bit to indicate a direct input device
83310a9 input: ft5x06_ts: Add DT support
86797e8 input: ft5x06_ts: Add support for FB notifications
d898291 input: ft5x06: Add support for firmware upgrade
0804395 input: ft5x06_ts: Add debugfs support
836a474 input: ft5x06_ts: Add support for protocol B
71e8bfd input: ft5x06_ts: Add debugfs entry for dump info
8a123ff input: touchpanel: Release all touches during suspend
77ab545 input: ft5x06_ts: Handle error if i2c read fails
550c106 input: ft5x06_ts: Disable regulators in suspend
4c142d1 input: touchpanel: fix the number of touch events detection
88dd4c2 input: ft5x06_ts: Add firmware upgrade support for ft6x06
473f8cd input: ft5x06_ts: Parse board specific parameters from pdata
88d102e input: ft5x06_ts: Upgrade firmware based on version
75184ddc input: touchscreen: remove PRESSURE event from ft5x06 driver
d6e831b input: touchscreen: add option to ignore Focaltech family-id check
15725c2 input: touchscreen: ft5x06: remove unbalanced touch event
740d7b1 input: touchscreen: ft5x06: add FT5336 firmware update support
a857895 input: touchscreen: ft5x06: fix firmware force update issue
4e8b58e input: touchscreen: request threaded-only IRQs with IRQF_ONESHOT
a144428 input: ft5x06: add support when CONFIG_PM is not defined
20482b2 input: ft5x06_ts: remove deprecated apis in 3.18 kernel
6146c68 input: ft5x06_ts: add support for firmware update for CTP FT6X36
8399308 input: touchscreen: change the focaltech firmware upgrade method
dba19fc input: ft5x06_ts: check vendor id before upgrade FT firmware
266d1fe input: ft5x06_ts: add support for pinctrl framework
7e2ea02 input: ft5x06_ts: fix the Focaltech CTP current leakage issue
f09a056 input: focaltech: release pinctrl resources on probe failure
494eae3 input: ft5x06_ts: pinctrl and gpio config in suspend/resume path
5c6aa1b input: ft5x06_ts: add NULL pointer check
d397de6 input: ft5x06_ts: add proximity feature support
8726963 ARM: dts: msm: correct Focaltech CTP irq flag configuration
5cc0bff input: ft5x06_ts: add gesture feature support
f26889b4 input: ft5x06_ts: do not free input_dev after unregister it
a409edae input: ft5x06_ts: fix compiling error in FT CTP driver
0796794 input: ft5x06_ts: correct the status of the pocket mode
fb9da6c input: change sensors classdev device's parent to input devices
e781db6 input: ft5x06_ts: add sysfs to access touch module info
6c5f9d2 input: ft5x06_ts: remove proximity sensor support
28783b9 input: ft5x06: defer touch resume to workqueue
4a64f8c input: ft5x06: add secure touch support for Focaltech on 8937 QRD
2a45585 input: ft5x06: creation of secure touch sysfs files
cee9cca input: ft5x06: Add support for clocks for secure touch on 8937 QRD
6d6c08e input: ft5x06: check return value of kobject_create_and_add
3176095 input: ft5x06_ts: fix uninitialized references in ft5x06_ts

Fix merge conflicts, checkpatch errors.

Change-Id: I67976638d376f15f9fd649854dee3e5bf530399b
Signed-off-by: default avatarVenkata Prahlad Valluru <vvalluru@codeaurora.org>
parent 8174ed94
Loading
Loading
Loading
Loading
+79 −12
Original line number Diff line number Diff line
@@ -22,7 +22,29 @@ Required properties:
 - focaltech,reset-gpio	: reset gpio to control the reset of chip.
 - focaltech,display-coords : display coordinates in pixels. It is a four
				tuple consisting of min x, min y, max x and
				max y values.
				max y values
 - focaltech,name	: name of the controller
 - focaltech,group-id	: group id of this device
 - focaltech,hard-reset-delay-ms : hard reset delay in ms
 - focaltech,soft-reset-delay-ms : soft reset delay in ms
 - focaltech,fw-delay-aa-ms : specify the delay in ms after programming 0xaa
				register for firmware upgrade
 - focaltech,fw-delay-55-ms : specify the delay in ms after programming 0x55
				register for firmware upgrade
 - focaltech,fw-upgrade-id1 : specify the upgrade id1 for firmware upgrade
 - focaltech,fw-upgrade-id2 : specify the upgrade id2 for firmware upgrade
 - focaltech,fw-delay-readid-ms : specify the read id delay in ms for firmware upgrade
 - focaltech,fw-delay-era-flsh-ms : specify the erase flash delay in ms for firmware upgrade
 - pinctrl-names : This should be defined if a target uses pinctrl framework.
			See "pinctrl" in Documentation/devicetree/bindings/pinctrl/msm-pinctrl.txt.
			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.

Optional properties:

@@ -32,22 +54,67 @@ Optional properties:
 - focaltech,i2c-pull-up : to specify pull up is required.
 - focaltech,no-force-update : to specify force update is allowed.
 - focaltech,button-map : button map of key codes. The number
				of key codes depend on panel.
				of key codes depend on panel
 - focaltech,fw-name	: specify the firmware file name
 - focaltech,fw-delay-aa-ms : specify the "aa" delay in ms for firmware upgrade
 - focaltech,fw-delay-55-ms : specify the "55" delay in ms for firmware upgrade
 - focaltech,fw-upgrade-id1 : specify the upgrade id1 for firmware upgrade
 - focaltech,fw-upgrade-id2 : specify the upgrade id2 for firmware upgrade
 - focaltech,fw-delay-readid-ms : specify the read id delay in ms for firmware upgrade
 - focaltech,fw-delay-era-flsh-ms : specify the erase flash delay in ms for firmware upgrade
 - focaltech,fw-auto-cal	: specify whether calibration is needed after firmware upgrade
 - focaltech,fw-vkey-support	: specify if virtual keys are supported through firmware
 - focaltech,ignore-id-check : specify ignore family-id check
 - focaltech,panel-coords : panel coordinates for the chip in pixels.
				It is a four tuple consisting of min x,
				min y, max x and max y values
 - focaltech,fw-name	: specify the firmware file name
 - focaltech,psensor-support	: specify whether support the proximity sensor
 - focaltech,gesture-support	: specify whether support gesture feature
 - focaltech,resume-in-workqueue : specifiy whether to defer the resume to workqueue
 - 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@f9924000 {
		ft5x06_ts@38 {
	i2c@f9923000{
		focaltech@38{
			compatible = "focaltech,5x06";
			reg = <0x38>;
			interrupt-parent = <&msmgpio>;
			interrupts = <61 0x2>;
			vdd-supply = <&pm8941_l22>;
			vcc_i2c-supply = <&pm8941_s3>;
			focaltech,reset-gpio = <&msmgpio 60 0x00>;
			focaltech,irq-gpio = <&msmgpio 61 0x00>;
			focaltech,panel-coords = <0 0 480 800>;
			interrupts = <1 0x2>;
			vdd-supply = <&pm8110_l19>;
			vcc_i2c-supply = <&pm8110_l14>;
			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>;
			focaltech,name = "ft6x06";
			focaltech,family-id = <0x06>;
			focaltech,reset-gpio = <&msmgpio 0 0x00>;
			focaltech,irq-gpio = <&msmgpio 1 0x00>;
			focaltech,display-coords = <0 0 480 800>;
			focaltech,button-map= <158 102 139 217>;
			focaltech,family-id = <0x0a>;
			focaltech,panel-coords = <0 0 480 800>;
			focaltech,button-map= <139 102 158>;
			focaltech,no-force-update;
			focaltech,i2c-pull-up;
			focaltech,group-id = <1>;
			focaltech,hard-reset-delay = <20>;
			focaltech,soft-reset-delay = <150>;
			focaltech,num-max-touches = <2>;
			focaltech,fw-name = "ft_8610_qrd_fw.bin";
			focaltech,fw-delay-aa-ms = <100>;
			focaltech,fw-delay-55-ms = <30>;
			focaltech,fw-upgrade-id1 = <0x79>;
			focaltech,fw-upgrade-id2 = <0x08>;
			focaltech,fw-delay-readid-ms = <10>;
			focaltech,fw-delay-era-flsh-ms = <2000>;
			focaltech,fw-auto-cal;
			focaltech,psensor-support;
			focaltech,gesture-support;
			/* 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>;
		};
	};
+28 −0
Original line number Diff line number Diff line
@@ -1205,6 +1205,24 @@ config TOUCHSCREEN_COLIBRI_VF50
	  To compile this driver as a module, choose M here: the
	  module will be called colibri_vf50_ts.

config TOUCHSCREEN_FT5X06_PSENSOR
       tristate "FocalTech proximity feature support"
       depends on TOUCHSCREEN_FT5X06 && SENSORS
       help
         Say Y here if you want to support ft5x06's proximity
         feature.

         If unsure, say N.

config TOUCHSCREEN_FT5X06_GESTURE
       tristate "FocalTech gesture feature support"
       depends on TOUCHSCREEN_FT5X06
       help
         Say Y here if you want to support ft5x06's gesture
         feature.

         If unsure, say N.

config TOUCHSCREEN_ROHM_BU21023
	tristate "ROHM BU21023/24 Dual touch support resistive touchscreens"
	depends on I2C
@@ -1240,4 +1258,14 @@ config TOUCHSCREEN_FT5X06
         To compile this driver as a module, choose M here: the
         module will be called ft5x06_ts.

config FT_SECURE_TOUCH
	bool "Secure Touch support for Focaltech Touchscreen"
	depends on TOUCHSCREEN_FT5X06
	help
	  Say Y here
	  -Focaltech touch driver is connected
	  -To enable secure touch for Focaltech touch driver

	  If unsure, say N.

endif
+2245 −266

File changed.

Preview size limit exceeded, changes collapsed.

+30 −0
Original line number Diff line number Diff line
@@ -22,8 +22,30 @@
#define FT5X16_ID		0x0A
#define FT5X36_ID		0x14
#define FT6X06_ID		0x06
#define FT6X36_ID       0x36

struct fw_upgrade_info {
	bool auto_cal;
	u16 delay_aa;
	u16 delay_55;
	u8 upgrade_id_1;
	u8 upgrade_id_2;
	u16 delay_readid;
	u16 delay_erase_flash;
};

struct ft5x06_gesture_platform_data {
	int gesture_enable_to_set;	/* enable/disable gesture */
	int in_pocket;	/* whether in pocket mode or not */
	struct device *dev;
	struct class *gesture_class;
	struct ft5x06_ts_data *data;
};

struct ft5x06_ts_platform_data {
	struct fw_upgrade_info info;
	const char *name;
	const char *fw_name;
	u32 irqflags;
	u32 irq_gpio;
	u32 irq_gpio_flags;
@@ -38,8 +60,16 @@ struct ft5x06_ts_platform_data {
	u32 panel_miny;
	u32 panel_maxx;
	u32 panel_maxy;
	u32 group_id;
	u32 hard_rst_dly;
	u32 soft_rst_dly;
	u32 num_max_touches;
	bool fw_vkey_support;
	bool no_force_update;
	bool i2c_pull_up;
	bool ignore_id_check;
	bool gesture_support;
	bool resume_in_workqueue;
	int (*power_init)(bool);
	int (*power_on)(bool);
};