From: sashiko-bot@kernel.org
To: "Kendall Willis" <k-willis@ti.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org,
linux-input@vger.kernel.org, dmitry.torokhov@gmail.com
Subject: Re: [PATCH v3 2/2] Input: gpio-keys - support wakeup pinctrl state on suspend
Date: Thu, 01 Oct 2026 16:02:00 +0000 [thread overview]
Message-ID: <20261001160201.4F53D1F00898@smtp.kernel.org> (raw)
In-Reply-To: <20261001-upstream-gpio-wakeup-v3-2-6f3bcde367a3@ti.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] input: gpio-keys: silent masking of pinctrl resource acquisition errors
--
commit f85782ff9c9eb4bfa803e47eea6427b48cb93f09
Author: Kendall Willis <k-willis@ti.com>
Input: gpio-keys - support wakeup pinctrl state on suspend
This commit adds support for selecting a wakeup pinctrl state during suspend
to RAM on TI K3 AM62 devices. It retrieves the pinctrl state using
devm_pinctrl_get() and looks up the wakeup state if the device is enabled.
> diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
> --- a/drivers/input/keyboard/gpio_keys.c
> +++ b/drivers/input/keyboard/gpio_keys.c
[ ... ]
> @@ -884,6 +887,15 @@ static int gpio_keys_probe(struct platform_device *pdev)
> platform_set_drvdata(pdev, ddata);
> input_set_drvdata(input, ddata);
>
> + ddata->pinctrl = devm_pinctrl_get(dev);
> + if (IS_ERR(ddata->pinctrl)) {
> + error = PTR_ERR(ddata->pinctrl);
> + if (error == -EPROBE_DEFER)
> + return error;
[Severity: Medium]
Does this code intentionally swallow all error codes from devm_pinctrl_get()
other than -EPROBE_DEFER?
If devm_pinctrl_get() fails for other reasons, such as a memory allocation
failure (-ENOMEM) or an invalid device tree configuration (-EINVAL), the
error is silently ignored. This allows the driver to probe successfully but
with silently broken wakeup functionality.
Should the error be returned for all failure cases to avoid masking resource
acquisition failures?
> + } else if (ddata->pinctrl) {
> + ddata->pinctrl_wakeup = pinctrl_lookup_state(ddata->pinctrl, "wakeup");
> + }
> +
> input->name = pdata->name ? : pdev->name;
> input->phys = "gpio-keys/input0";
> input->dev.parent = dev;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261001-upstream-gpio-wakeup-v3-0-6f3bcde367a3@ti.com?part=2
next prev parent reply other threads:[~2026-10-01 16:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 15:50 [PATCH v3 0/2] Input: gpio-keys - support wakeup pinctrl state Kendall Willis
2026-10-01 15:50 ` [PATCH v3 1/2] dt-bindings: input: gpio-keys: add pinctrl states Kendall Willis
2026-10-01 15:59 ` sashiko-bot
2026-10-01 16:11 ` Kendall Willis
2026-10-01 20:01 ` Rob Herring (Arm)
2026-10-01 15:50 ` [PATCH v3 2/2] Input: gpio-keys - support wakeup pinctrl state on suspend Kendall Willis
2026-10-01 16:02 ` sashiko-bot [this message]
2026-10-01 16:12 ` Kendall Willis
2026-10-03 5:26 ` Dmitry Torokhov
2026-10-05 20:42 ` Kendall Willis
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=20261001160201.4F53D1F00898@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=k-willis@ti.com \
--cc=linux-input@vger.kernel.org \
--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