From: sashiko-bot@kernel.org
To: "Marco Mattiolo" <marco.mattiolo@runbox.com>
Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org, dmitry.torokhov@gmail.com
Subject: Re: [PATCH 3/5] Input: s6sy761 - Add mode-switch support
Date: Fri, 04 Dec 2026 22:25:08 +0000 [thread overview]
Message-ID: <sashiko-outbox-250752@kernel.org> (raw)
In-Reply-To: <20261204-crosshatch_touchscreen-v1-3-9f76ff10eab1@runbox.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] Input: s6sy761: s6sy761_power_on() leaves reset deasserted on
error
--
commit 038329598e92eec17f68c862bc567c93b4e723cc
Author: Marco Mattiolo <marco.mattiolo@runbox.com>
Input: s6sy761 - Add mode-switch support
This commit adds support for an optional mode-switch GPIO in the s6sy761
touchscreen driver and asserts it during probe so the AP owns the touch I2C
bus before the first I2C access.
> diff --git a/drivers/input/touchscreen/s6sy761.c b/drivers/input/touchscreen/s6sy761.c
> index 5972a3194a7dc..7f2730e306999 100644
> --- a/drivers/input/touchscreen/s6sy761.c
> +++ b/drivers/input/touchscreen/s6sy761.c
[ ... ]
> @@ -436,6 +437,16 @@ static int s6sy761_probe(struct i2c_client *client)
> return dev_err_probe(&client->dev, PTR_ERR(sdata->reset_gpio),
> "Failed to get reset GPIO\n");
>
> + /*
> + * Some boards share the touch I2C bus between the AP and the SLPI
> + * sensor DSP; make the AP the bus master before talking to the chip.
> + */
> + gpiod = devm_gpiod_get_optional(&client->dev, "mode-switch",
> + GPIOD_OUT_HIGH);
> + if (IS_ERR(gpiod))
> + return dev_err_probe(&client->dev, PTR_ERR(gpiod),
> + "Failed to get mode-switch GPIO\n");
> +
> err = devm_add_action_or_reset(&client->dev, s6sy761_power_off, sdata);
> if (err)
> return err;
[Severity: Medium]
In commit "Input: s6sy761 - Add optional reset GPIO support", does
s6sy761_power_on() leave sdata->reset_gpio deasserted on error?
drivers/input/touchscreen/s6sy761.c:s6sy761_power_on() {
...
gpiod_set_value_cansleep(sdata->reset_gpio, 0);
msleep(140);
...
if (ret < 0)
goto err_disable_regulators;
...
err_disable_regulators:
regulator_bulk_disable(ARRAY_SIZE(sdata->regulators),
sdata->regulators);
return ret;
}
If an I2C transfer or boot status check fails after releasing reset,
err_disable_regulators disables vdd and avdd without re-asserting
sdata->reset_gpio. Because sdata->powered_up is still false,
s6sy761_power_off() returns early and does not assert it either.
This leaves the active-low reset line driven high while the controller
supplies are off, risking back-powering the chip through ESD diodes and
preventing a clean reset pulse on a later s6sy761_resume().
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261204-crosshatch_touchscreen-v1-0-9f76ff10eab1@runbox.com?part=3
next prev parent reply other threads:[~2026-12-04 22:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 22:13 [PATCH 0/5] Introduce Samsung S6SY761 (Google Pixel 3 XL) touchscreen Marco Mattiolo via B4 Relay
2026-12-04 22:13 ` [PATCH 1/5] dt-bindings: input: touchscreen: samsung,s6sy761: Introduce reset and mode-switch GPIOs Marco Mattiolo via B4 Relay
2026-12-04 22:20 ` sashiko-bot
2026-12-04 22:13 ` [PATCH 2/5] Input: s6sy761 - Add optional reset GPIO support Marco Mattiolo via B4 Relay
2026-12-04 22:26 ` sashiko-bot
2026-12-04 22:13 ` [PATCH 3/5] Input: s6sy761 - Add mode-switch support Marco Mattiolo via B4 Relay
2026-12-04 22:25 ` sashiko-bot [this message]
2026-12-04 22:13 ` [PATCH 4/5] arm64: dts: qcom: sdm845-google: Group touchscreen pins, add mode-switch pin Marco Mattiolo via B4 Relay
2026-12-04 22:21 ` sashiko-bot
2026-12-04 22:32 ` David Heidelberg
2026-12-04 22:13 ` [PATCH 5/5] arm64: dts: qcom: sdm845-google-crosshatch: Add touchscreen support Marco Mattiolo via B4 Relay
2026-12-04 22:22 ` sashiko-bot
[not found] <20261201-crosshatch_touchscreen-v1-0-1bea3e2ecaaf@hotmail.it>
2026-12-01 22:22 ` [PATCH 3/5] Input: s6sy761 - Add mode-switch support Marco Mattiolo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-250752@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=marco.mattiolo@runbox.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox