summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorHugo Villeneuve <hvilleneuve@dimonoff.com>2025-04-10 21:46:32 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-05-18 09:24:05 +0300
commitdadbe33fee36484bbf1d6b5e5dc2f9cf27693173 (patch)
treee572f95b552752e8451a59139d3b20f1e12cb0d7 /drivers/input
parentce4e826dbfe788abda09e1c790168ba4c0fdff0b (diff)
downloadlinux-dadbe33fee36484bbf1d6b5e5dc2f9cf27693173.tar.xz
Input: cyttsp5 - ensure minimum reset pulse width
commit c6cb8bf79466ae66bd0d07338c7c505ce758e9d7 upstream. The current reset pulse width is measured to be 5us on a Renesas RZ/G2L SOM. The manufacturer's minimum reset pulse width is specified as 10us. Extend reset pulse width to make sure it is long enough on all platforms. Also reword confusing comments about reset pin assertion. Fixes: 5b0c03e24a06 ("Input: Add driver for Cypress Generation 5 touchscreen") Cc: stable@vger.kernel.org Acked-by: Alistair Francis <alistair@alistair23.me> Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com> Link: https://lore.kernel.org/r/20250410184633.1164837-1-hugo@hugovil.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/touchscreen/cyttsp5.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/cyttsp5.c b/drivers/input/touchscreen/cyttsp5.c
index db5a885ecd72..6c9bd1f238fc 100644
--- a/drivers/input/touchscreen/cyttsp5.c
+++ b/drivers/input/touchscreen/cyttsp5.c
@@ -865,13 +865,16 @@ static int cyttsp5_probe(struct device *dev, struct regmap *regmap, int irq,
ts->input->phys = ts->phys;
input_set_drvdata(ts->input, ts);
- /* Reset the gpio to be in a reset state */
+ /* Assert gpio to be in a reset state */
ts->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
if (IS_ERR(ts->reset_gpio)) {
error = PTR_ERR(ts->reset_gpio);
dev_err(dev, "Failed to request reset gpio, error %d\n", error);
return error;
}
+
+ fsleep(10); /* Ensure long-enough reset pulse (minimum 10us). */
+
gpiod_set_value_cansleep(ts->reset_gpio, 0);
/* Need a delay to have device up */