summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen
diff options
context:
space:
mode:
authorHaibo Chen <haibo.chen@nxp.com>2020-10-20 14:32:05 +0800
committerDong Aisheng <aisheng.dong@nxp.com>2021-11-02 16:56:32 +0800
commitc6a477fbd782bcd3b54d3d6a03746aaeb1863ff0 (patch)
tree63a9bfc58ad7b81072a28b21299e403dea0ac83d /drivers/input/touchscreen
parent30e7416fec9b23876657331aaf8293275b8b4dd6 (diff)
LF-2539-2 input: touch: goodix: force set the IRQ_TYPE_EDGE_FALLING for GT1151Q
For the touch chip use on the new OLED panel(rm67199), when touch the screen, GT1151Q sends a falling edge pulse via INT pin. For code logic, it will read the touch internal config data, the bit[1~0] of config[6] means the interrupt trigger method. For this GT1151Q, this bit[1~0] is 3 in default, which means IRQ_TYPE_LEVEL_HIGH, which not match with the datasheet and the hardware behavior. Since the default level of the INT pin is high, so after driver probe, a lot of useless touch interrupts keep triggered. To fix this, need to update the touch firmware. Set the bit[1~0] of config[6] to value 1. Since we lack the touch firmware file, as a workaround, add a property "edge-failling-trigger" in dts file, if has this property, force set the IRQ_TYPE_EDGE_FALLING. Signed-off-by: Haibo Chen <haibo.chen@nxp.com> Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Diffstat (limited to 'drivers/input/touchscreen')
-rw-r--r--drivers/input/touchscreen/goodix.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c
index 4f53d3c57e69..74e01f860a3c 100644
--- a/drivers/input/touchscreen/goodix.c
+++ b/drivers/input/touchscreen/goodix.c
@@ -1106,6 +1106,9 @@ static int goodix_configure_dev(struct goodix_ts_data *ts)
return error;
}
+ if (device_property_read_bool(ts->input_dev->dev.parent, "edge-failling-trigger"))
+ ts->int_trigger_type = GOODIX_INT_TRIGGER;
+
ts->irq_flags = goodix_irq_flags[ts->int_trigger_type] | IRQF_ONESHOT;
error = goodix_request_irq(ts);
if (error) {