From: sashiko-bot@kernel.org
To: "Mohammad Rafi Shaik" <mohammad.rafi.shaik@oss.qualcomm.com>
Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v1 2/2] pinctrl: qcom: Allow arming the wakeup_enable bit from pin config
Date: Thu, 15 Oct 2026 14:30:44 +0000 [thread overview]
Message-ID: <sashiko-outbox-172961@kernel.org> (raw)
In-Reply-To: <20261015-tlmm_wakeup_gpio_support-v1-2-c6d6f37a7e51@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] pinctrl: qcom: missing hardware capability check in wakeup-enable get()
--
commit b3082e25a0d303b051061eac8a2191e7673c4106
Author: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
pinctrl: qcom: Allow arming the wakeup_enable bit from pin config
This commit adds a "wakeup-enable" pin configuration parameter to arm the
wakeup_enable bit without taking over the pin mux. It folds open-coded
accesses into a helper shared between GPIO IRQ requests and pin config. Pins
not described as wakeup-capable by the SoC are rejected.
> diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
> index 27f06bbc113c9..cb12f8b906007 100644
> --- a/drivers/pinctrl/qcom/pinctrl-msm.c
> +++ b/drivers/pinctrl/qcom/pinctrl-msm.c
[ ... ]
> @@ -354,6 +402,16 @@ static int msm_config_group_get(struct pinctrl_dev *pctldev,
>
> g = &pctrl->soc->groups[group];
>
> + if (param == MSM_PINCONF_WAKEUP_ENABLE) {
> + if (!g->intr_wakeup_present_bit)
> + return -EOPNOTSUPP;
> +
> + arg = msm_readl_intr_cfg(pctrl, g) & BIT(g->intr_wakeup_enable_bit);
> + *config = pinconf_to_config_packed(param, !!arg);
[Severity: Low]
Does this code miss a hardware capability check before returning the
configuration?
In the setter msm_pin_set_wakeup_enable(), the code correctly verifies that
the specific pin has the capability by checking the dynamic hardware presence
bit:
intr_cfg = msm_readl_intr_cfg(pctrl, g);
if (intr_cfg & BIT(g->intr_wakeup_present_bit)) {
However, this getter msm_config_group_get() only checks the static bit offset
g->intr_wakeup_present_bit from the SoC struct and fails to read the register
to check the actual dynamic hardware capability.
Can querying wakeup-enable on a pin that is dynamically not wakeup-capable
succeed and return unverified, meaningless register state from the enable_bit
offset, exposing inconsistent capabilities to userspace?
> +
> + return 0;
> + }
> +
> ret = msm_config_reg(pctrl, g, param, &mask, &bit);
> if (ret < 0)
> return ret;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261015-tlmm_wakeup_gpio_support-v1-0-c6d6f37a7e51@oss.qualcomm.com?part=2
prev parent reply other threads:[~2026-10-15 14:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-15 14:22 [PATCH 0/2] pinctrl: qcom: Allow arming the wakeup_enable bit from pin config Mohammad Rafi Shaik
2026-10-15 14:22 ` [PATCH v1 1/2] dt-bindings: pinctrl: qcom,tlmm-common: Add wakeup-enable Mohammad Rafi Shaik
2026-10-15 14:32 ` sashiko-bot
2026-10-15 14:23 ` [PATCH v1 2/2] pinctrl: qcom: Allow arming the wakeup_enable bit from pin config Mohammad Rafi Shaik
2026-10-15 14:30 ` sashiko-bot [this message]
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-172961@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=mohammad.rafi.shaik@oss.qualcomm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.