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

Commit 2bf3f6c3 authored by Mao Li's avatar Mao Li
Browse files

ARM: dts: msm: correct Focaltech CTP irq flag configuration



Fixed below irq flag issues of Focaltech CTP:
Focaltech CTP firmware generates edge interrupt to MSM, but the
interrupt type in DTSI is level, which will cause CTP interrupt
cannot wake up MSM when system is in deep sleep. Fix this by
setting edge irq flag in DTSI.

For GPIO irq, the irq flag should be specified in "interrupts"
node. Msm_gpio module will only use the lower 8-bit of
"interrupts" node and discards the upper bits. If we specify
0x2002 in "interrupts" node, the upper bits(0x2000) is not used
by msm_gpio, only lower bits(0x2) is used, that means only
lower bits(0x2) should be set in "interrupts" node.

"focaltech,irq-gpio" node is used to specify gpio property,
rather than irq flag. Remove the irq flag setting in this node.

In driver code, specify only "IRQF_ONESHOT". The irq trigger type
is specified by DTSI "interrupts" node. See above.

Change-Id: I4cd8596fb4538b701317f01a6cafaa771041ffdd
Signed-off-by: default avatarMao Li <maol@codeaurora.org>
parent b06d837b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@
			compatible = "focaltech,5x06";
			reg = <0x38>;
			interrupt-parent = <&msm_gpio>;
			interrupts = <13 0x2008>;
			interrupts = <13 0x2>;
			vdd-supply = <&pm8909_l17>;
			vcc_i2c-supply = <&pm8909_l6>;
			/* pins used by touchscreen */
@@ -34,7 +34,7 @@
			focaltech,name = "ft6336";
			focaltech,family-id = <0x36>;
			focaltech,reset-gpio = <&msm_gpio 12 0x0>;
			focaltech,irq-gpio = <&msm_gpio 13 0x2008>;
			focaltech,irq-gpio = <&msm_gpio 13 0x0>;
			focaltech,display-coords = <0 0 480 854>;
			focaltech,panel-coords = <0 0 480 950>;
			focaltech,button-map= <139 102 158>;
+2 −2
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@
			compatible = "focaltech,5x06";
			reg = <0x38>;
			interrupt-parent = <&msm_gpio>;
			interrupts = <13 0x2008>;
			interrupts = <13 0x2>;
			vdd-supply = <&pm8909_l17>;
			vcc_i2c-supply = <&pm8909_l6>;
			/* pins used by touchscreen */
@@ -71,7 +71,7 @@
			focaltech,name = "ft6436";
			focaltech,family-id = <0x36>;
			focaltech,reset-gpio = <&msm_gpio 12 0x0>;
			focaltech,irq-gpio = <&msm_gpio 13 0x2008>;
			focaltech,irq-gpio = <&msm_gpio 13 0x0>;
			focaltech,display-coords = <0 0 480 854>;
			focaltech,panel-coords = <0 0 480 950>;
			focaltech,no-force-update;
+2 −2
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@
			compatible = "focaltech,5x06";
			reg = <0x38>;
			interrupt-parent = <&msm_gpio>;
			interrupts = <13 0x2008>;
			interrupts = <13 0x2>;
			vdd-supply = <&pm8909_l17>;
			vcc_i2c-supply = <&pm8909_l6>;
			/* pins used by touchscreen */
@@ -34,7 +34,7 @@
			focaltech,name = "ft6306";
			focaltech,family-id = <0x36>;
			focaltech,reset-gpio = <&msm_gpio 12 0x0>;
			focaltech,irq-gpio = <&msm_gpio 13 0x2008>;
			focaltech,irq-gpio = <&msm_gpio 13 0x0>;
			focaltech,display-coords = <0 0 480 854>;
			focaltech,panel-coords = <0 0 480 950>;
			focaltech,button-map= <139 102 158>;
+2 −2
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@
			compatible = "focaltech,5x06";
			reg = <0x38>;
			interrupt-parent = <&msm_gpio>;
			interrupts = <13 0x2008>;
			interrupts = <13 0x2>;
			vdd-supply = <&pm8916_l17>;
			vcc_i2c-supply = <&pm8916_l6>;
			/* pins used by touchscreen */
@@ -56,7 +56,7 @@
			focaltech,name = "ft6436";
			focaltech,family-id = <0x36>;
			focaltech,reset-gpio = <&msm_gpio 12 0x0>;
			focaltech,irq-gpio = <&msm_gpio 13 0x2008>;
			focaltech,irq-gpio = <&msm_gpio 13 0x0>;
			focaltech,display-coords = <0 0 480 854>;
			focaltech,panel-coords = <0 0 480 950>;
			focaltech,button-map= <139 102 158>;
+4 −0
Original line number Diff line number Diff line
@@ -1951,6 +1951,10 @@ static int ft5x06_ts_probe(struct i2c_client *client,

	err = request_threaded_irq(client->irq, NULL,
				ft5x06_ts_interrupt,
	/*
	* the interrupt trigger mode will be set in Device Tree with property
	* "interrupts", so here we just need to set the flag IRQF_ONESHOT
	*/
				IRQF_ONESHOT,
				client->dev.driver->name, data);
	if (err) {