Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Fenglin Wu" <fenglin.wu@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH 2/4] dt-bindings: pinctrl: qcom,pmic-gpio: Add level-shifter function
Date: Wed, 27 May 2026 10:12:14 +0000	[thread overview]
Message-ID: <20260527101214.BA2DD1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260527-pinctrl-level-shifter-v1-2-1965461d0a7c@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Unconditionally requiring `qcom,rpmh` and `qcom,pmic-id` for the existing `qcom,pmh0101-gpio` compatible breaks device tree validation and backward compatibility.
--

commit 4ef6fb2ad4a4a7f20f7b6195e05c09b5f1ccf313
Author: Fenglin Wu <fenglin.wu@oss.qualcomm.com>

dt-bindings: pinctrl: qcom,pmic-gpio: Add level-shifter function

This commit adds the level-shifter function and related device tree
properties for RPMh firmware control. It introduces a parameter to enable
or disable the level-shifter and defines allowed groups for pmh0101.

> diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
> --- a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml
> +++ b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml

[ ... ]

> @@ -330,6 +345,25 @@ allOf:
>            contains:
>              enum:
>                - qcom,pmh0101-gpio
> +    then:
> +      properties:
> +        gpio-line-names:
> +          minItems: 18
> +          maxItems: 18
> +        gpio-reserved-ranges:
> +          minItems: 1
> +          maxItems: 9
> +        qcom,rpmh: true
> +        qcom,pmic-id: true
> +      required:
> +        - qcom,rpmh
> +        - qcom,pmic-id

[Severity: High]
Does unconditionally requiring these properties break backward compatibility
with existing device trees?

Existing device trees using the qcom,pmh0101-gpio compatible might not have
the qcom,rpmh or qcom,pmic-id properties, which would cause validation
to fail for those older platforms.

Additionally, if the driver unconditionally relies on these properties
in subsequent changes (such as calling pmic_gpio_register_level_shifters()
where a missing qcom,rpmh causes rpmh_get_ctrlr_dev() to return -ENODEV),
this could cause the entire GPIO controller probe to fail on older device
trees.

Could these properties be made optional or strictly conditional on actual use
so that the driver can gracefully handle their absence?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260527-pinctrl-level-shifter-v1-0-1965461d0a7c@oss.qualcomm.com?part=2

  reply	other threads:[~2026-05-27 10:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-27  9:22 [PATCH 0/4] pinctrl: qcom: spmi-gpio: Add bidirectional level-shifter function support Fenglin Wu
2026-05-27  9:22 ` [PATCH 1/4] soc: qcom: rpmh: Allow non-child devices to issue write commands Fenglin Wu
2026-05-27  9:53   ` sashiko-bot
2026-05-27  9:22 ` [PATCH 2/4] dt-bindings: pinctrl: qcom,pmic-gpio: Add level-shifter function Fenglin Wu
2026-05-27 10:12   ` sashiko-bot [this message]
2026-05-27  9:22 ` [PATCH 3/4] pinctrl: qcom: spmi-gpio: Rearchitect for flexible group support Fenglin Wu
2026-05-27 10:59   ` sashiko-bot
2026-05-27  9:22 ` [PATCH 4/4] pinctrl: qcom: spmi-gpio: Add level-shifter function support Fenglin Wu
2026-05-27 11:36   ` sashiko-bot

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=20260527101214.BA2DD1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=fenglin.wu@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox