From 15ec2bf27fa6d691e2996856b6cf0094856d5516 Mon Sep 17 00:00:00 2001 From: Ritesh Kumar Date: Tue, 23 Mar 2021 10:55:51 +0530 Subject: [PATCH] input: touchscreen: focaltech: Skip gpio operations in SPI TUI Skip reset/irq gpio operations in SPI Trusted Touch. Change-Id: Ief00045af6ddac55681814042148b416f9ffa552 Signed-off-by: Ritesh Kumar --- drivers/input/touchscreen/focaltech_touch/focaltech_core.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/input/touchscreen/focaltech_touch/focaltech_core.c b/drivers/input/touchscreen/focaltech_touch/focaltech_core.c index 911be28c23b6..e2b8859cee95 100644 --- a/drivers/input/touchscreen/focaltech_touch/focaltech_core.c +++ b/drivers/input/touchscreen/focaltech_touch/focaltech_core.c @@ -264,6 +264,9 @@ static void fts_ts_trusted_touch_reset_gpio_toggle(struct fts_ts_data *fts_data) { void __iomem *base; + if (fts_data->bus_type != BUS_TYPE_I2C) + return; + base = ioremap(TOUCH_RESET_GPIO_BASE, TOUCH_RESET_GPIO_SIZE); writel_relaxed(0x1, base + TOUCH_RESET_GPIO_OFFSET); /* wait until toggle to finish*/ @@ -280,6 +283,9 @@ static void fts_trusted_touch_intr_gpio_toggle(struct fts_ts_data *fts_data, void __iomem *base; u32 val; + if (fts_data->bus_type != BUS_TYPE_I2C) + return; + base = ioremap(TOUCH_INTR_GPIO_BASE, TOUCH_INTR_GPIO_SIZE); val = readl_relaxed(base + TOUCH_RESET_GPIO_OFFSET); if (enable) {