Skip to content

Commit 845b00f

Browse files
committed
Input: cyttsp5 - ensure minimum reset pulse width
JIRA: https://issues.redhat.com/browse/RHEL-101770 Upstream Status: since v6.15 Tested: with the hid-tools test suite and some hardware commit c6cb8bf Author: Hugo Villeneuve <hvilleneuve@dimonoff.com> Date: Thu Apr 10 14:46:32 2025 -0400 Input: cyttsp5 - ensure minimum reset pulse width 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: 5b0c03e ("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: Benjamin Tissoires <benjamin.tissoires@redhat.com>
1 parent dfc2c91 commit 845b00f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/input/touchscreen/cyttsp5.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,13 +870,16 @@ static int cyttsp5_probe(struct device *dev, struct regmap *regmap, int irq,
870870
ts->input->phys = ts->phys;
871871
input_set_drvdata(ts->input, ts);
872872

873-
/* Reset the gpio to be in a reset state */
873+
/* Assert gpio to be in a reset state */
874874
ts->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
875875
if (IS_ERR(ts->reset_gpio)) {
876876
error = PTR_ERR(ts->reset_gpio);
877877
dev_err(dev, "Failed to request reset gpio, error %d\n", error);
878878
return error;
879879
}
880+
881+
fsleep(10); /* Ensure long-enough reset pulse (minimum 10us). */
882+
880883
gpiod_set_value_cansleep(ts->reset_gpio, 0);
881884

882885
/* Need a delay to have device up */

0 commit comments

Comments
 (0)