From: sashiko-bot@kernel.org
To: "Yassine Oudjana" <y.oudjana@protonmail.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v9 4/6] dt-bindings: pinctrl: mediatek,mt6779-pinctrl: Document MT6765 pin controller
Date: Fri, 25 Sep 2026 15:55:59 +0000 [thread overview]
Message-ID: <20260925155559.9AA941F00898@smtp.kernel.org> (raw)
In-Reply-To: <20260925-mt6735-pinctrl-v9-v9-4-bfb19d8bb87c@protonmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] pinctrl: mediatek: DT binding allows drive-strength 16 which driver rejects
--
commit c86bb87060bc7c504b8fa22832cdfbbac4934ccd
Author: Yassine Oudjana <y.oudjana@protonmail.com>
dt-bindings: pinctrl: mediatek,mt6779-pinctrl: Document MT6765 pin controller
The MT6765 pin controller has had a driver for a while, but DT bindings were
never documented for it.
> diff --git a/Documentation/devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml
> index 4df6971030416..94117008ebf9f 100644
> --- a/Documentation/devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml
> +++ b/Documentation/devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml
[ ... ]
> @@ -61,6 +62,41 @@ required:
>
> allOf:
> - $ref: pinctrl.yaml#
> + - if:
> + properties:
[ ... ]
> + patternProperties:
> + '-pins$':
> + patternProperties:
> + '^pins':
> + properties:
> + drive-strength:
> + enum: [1, 2, 4, 16]
[Severity: Medium]
Does this binding allow a drive-strength that exceeds the hardware capacity?
The MT6765 driver is configured to pass the device tree drive-strength
value strictly as a raw register value:
drivers/pinctrl/mediatek/pinctrl-mt6765.c:mt6765_data {
...
.drive_set = mtk_pinconf_drive_set_raw,
...
}
The core driver then safely rejects values exceeding the 3-bit register mask
(which limits values to at most 7):
drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c:mtk_hw_set_value() {
...
if (value < 0 || value > pf.mask)
return -EINVAL;
...
}
Since 16 is greater than the hardware register mask, would device trees
using this value pass schema validation but fail to configure pins during
driver probe?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260925-mt6735-pinctrl-v9-v9-0-bfb19d8bb87c@protonmail.com?part=4
next prev parent reply other threads:[~2026-09-25 15:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-25 15:46 [PATCH v9 0/6] MediaTek pinctrl DT binding cleanup and MT6735 pinctrl support Yassine Oudjana
2026-09-25 15:46 ` [PATCH v9 1/6] dt-bindings: pinctrl: mediatek,mt6779-pinctrl: Pull pinctrl node changes from MT6795 document Yassine Oudjana
2026-09-25 15:47 ` [PATCH v9 2/6] dt-bindings: pinctrl: mediatek,mt6779-pinctrl: Improve pinctrl subnode and property descriptions Yassine Oudjana
2026-09-25 15:47 ` [PATCH v9 3/6] dt-bindings: pinctrl: mediatek,mt6779-pinctrl: Add MT6795 Yassine Oudjana
2026-09-25 15:55 ` sashiko-bot
2026-09-25 15:47 ` [PATCH v9 4/6] dt-bindings: pinctrl: mediatek,mt6779-pinctrl: Document MT6765 pin controller Yassine Oudjana
2026-09-25 15:55 ` sashiko-bot [this message]
2026-09-25 18:42 ` Yassine Oudjana
2026-09-25 15:47 ` [PATCH v9 5/6] dt-bindings: pinctrl: mediatek,mt6779-pinctrl: Add bindings for MT6735 " Yassine Oudjana
2026-09-25 15:54 ` sashiko-bot
2026-09-25 15:48 ` [PATCH v9 6/6] pinctrl: mediatek: Add MT6735 pinctrl driver Yassine Oudjana
2026-09-25 16:09 ` sashiko-bot
2026-10-01 8:07 ` [PATCH v9 0/6] MediaTek pinctrl DT binding cleanup and MT6735 pinctrl support Linus Walleij
2026-10-06 19:29 ` Yassine Oudjana
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=20260925155559.9AA941F00898@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=y.oudjana@protonmail.com \
/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