linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: neil.armstrong@linaro.org,
	Konrad Dybcio <konrad.dybcio@somainline.org>,
	Andy Gross <agross@kernel.org>, Lee Jones <lee@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Mark Brown <broonie@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 1/6] dt-bindings: pinctrl: convert qcom,mdm9615-pinctrl.txt to dt-schema
Date: Thu, 6 Oct 2022 22:20:25 +0200	[thread overview]
Message-ID: <cef6b9a2-9753-d478-ab6a-444784a18576@linaro.org> (raw)
In-Reply-To: <5a669cee-55b2-f5cb-56f2-279003d08578@linaro.org>

On 06/10/2022 18:20, Neil Armstrong wrote:
> Hi,
> 
> On 06/10/2022 13:09, Krzysztof Kozlowski wrote:
>> On 06/10/2022 11:57, Neil Armstrong wrote:
>>> Convert the MDM9515 pinctrl bindings to dt-schema.
>>>
>>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>>> ---
>>>   .../bindings/pinctrl/qcom,mdm9615-pinctrl.txt      | 161 ---------------------
>>>   .../bindings/pinctrl/qcom,mdm9615-pinctrl.yaml     | 101 +++++++++++++
>>>   2 files changed, 101 insertions(+), 161 deletions(-)
>>>
>>
>> Thank you for your patch. There is something to discuss/improve.
>>
>>> -		};
>>> -	};
>>> diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,mdm9615-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,mdm9615-pinctrl.yaml
>>> new file mode 100644
>>> index 000000000000..6a5966fc0098
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/pinctrl/qcom,mdm9615-pinctrl.yaml
>>> @@ -0,0 +1,101 @@
>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>>> +%YAML 1.2
>>> +---
>>> +$id: http://devicetree.org/schemas/pinctrl/qcom,mdm9615-pinctrl.yaml#
>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>> +
>>> +title: Qualcomm Technologies, Inc. MDM9615 TLMM block
>>> +
>>> +maintainers:
>>> +  - Bjorn Andersson <andersson@kernel.org>
>>> +
>>> +description: |
>>
>> No need for |
> 
> Ack
> 
>>
>>> +  This binding describes the Top Level Mode Multiplexer block found in the
>>> +  MDM9615 platform.
>>
>> Instead: "Top Level Mode Multiplexer pin controller node in Qualcomm
>> MDM9615 SoC."
>>
>> I see this pattern is coming from other file, so I will fix all of them.
> 
> Ack, wil use this.
> 
>>
>>> +
>>> +allOf:
>>> +  - $ref: "pinctrl.yaml#"
>>
>> Drop it, it's included from tlmm-common
> 
> Ack
> 
>>
>>> +  - $ref: /schemas/pinctrl/qcom,tlmm-common.yaml#
>>> +
>>> +properties:
>>> +  compatible:
>>> +    const: qcom,mdm9615-pinctrl
>>> +
>>> +  reg:
>>> +    maxItems: 1
>>> +
>>> +  interrupts: true
>>> +  interrupt-controller: true
>>> +  '#interrupt-cells': true
>>> +  gpio-controller: true
>>> +  '#gpio-cells': true
>>> +  gpio-ranges: true
>>> +
>>> +required:
>>> +  - compatible
>>> +  - reg
>>> +
>>> +additionalProperties: false
>>> +
>>> +patternProperties:
>>> +  '-state$':
>>
>> Use " as quotes
> 
> Ack
> 
>>
>>> +    oneOf:
>>> +      - $ref: "#/$defs/qcom-mdm9615-pinctrl-state"
>>> +      - patternProperties:
>>> +          "-pins$":
>>> +            $ref: "#/$defs/qcom-mdm9615-pinctrl-state"
> 
> Interesting, if I add this subnode (that should be valid):
>        gsbi3-state {
>          pins = "gpio8", "gpio9", "gpio10", "gpio11";
>          function = "gsbi3";
>          drive-strength = <8>;
>          bias-disable;
>        };
> 
> then I get the following warning from dt_bindings_check:

First, your block for using defs/qcom-mdm9615-pinctrl-state is not
exactly like it should be, e.g. it misses additionalProperties: false.
Maybe it misses few things more. Please use one of my latest patches as
example, e.g.
https://lore.kernel.org/linux-devicetree/20221006144518.256956-1-krzysztof.kozlowski@linaro.org/T/#t

> 
> Documentation/devicetree/bindings/pinctrl/qcom,mdm9615-pinctrl.example.dtb: pinctrl@1000000: gsbi3-state: More than one condition true in oneOf schema:
>          {'oneOf': [{'$ref': '#/$defs/qcom-mdm9615-pinctrl-state'},
>                     {'patternProperties': {'-pins$': {'$ref': '#/$defs/qcom-mdm9615-pinctrl-state'},
>                                            'pinctrl-[0-9]+': True},
>                      'properties': {'$nodename': True,
>                                     'phandle': True,
>                                     'pinctrl-names': True,
>                                     'secure-status': True,
>                                     'status': True}}]}
>  From schema: /Documentation/devicetree/bindings/pinctrl/qcom,mdm9615-pinctrl.yaml
> 
> And I don't understand why, the nodename should not match "-pins$" nor "pinctrl-[0-9]+'...

Hm, dunno... You have a trailing coma in enum with functions - maybe
remove it?

I looked briefly between your patch and mine for sm8150 and could not
find differences except that additionalProperties and coma.

Best regards,
Krzysztof


  reply	other threads:[~2022-10-06 20:20 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-06  9:57 [PATCH 0/6] arm: qcom: mdm9615: second round of bindings and DT fixes Neil Armstrong
2022-10-06  9:57 ` [PATCH 1/6] dt-bindings: pinctrl: convert qcom,mdm9615-pinctrl.txt to dt-schema Neil Armstrong
2022-10-06 11:09   ` Krzysztof Kozlowski
2022-10-06 16:20     ` Neil Armstrong
2022-10-06 20:20       ` Krzysztof Kozlowski [this message]
2022-10-06 12:27   ` Rob Herring
2022-10-06 16:21     ` Neil Armstrong
2022-10-06 19:42       ` Rob Herring
2022-10-06  9:57 ` [PATCH 2/6] arm: dts: qcom: mdm9615: fix pinctrl subnodes Neil Armstrong
2022-10-06 11:10   ` Krzysztof Kozlowski
2022-10-07 19:36   ` Konrad Dybcio
2022-10-06  9:58 ` [PATCH 3/6] arm: dts: qcom: mdm9615: wp8548-mangoh-green: fix sx150xq node names and probe-reset property Neil Armstrong
2022-10-07 19:38   ` Konrad Dybcio
2022-10-10  7:45     ` Neil Armstrong
2022-10-06  9:58 ` [PATCH 4/6] dt-bindings: soc: qcom: convert non-smd RPM bindings to dt-schema Neil Armstrong
2022-10-06 19:53   ` Rob Herring
2022-10-06  9:58 ` [PATCH 5/6] dt-bindings: regulators: convert non-smd RPM Regulators " Neil Armstrong
2022-10-06 12:27   ` Rob Herring
2022-10-06 20:04   ` Rob Herring
2022-10-06  9:58 ` [PATCH 6/6] dt-bindings: soc: qcom: ipc-rpm: refer to qcom,ipc-rpm-regulator.yaml Neil Armstrong
2022-10-06 12:27   ` Rob Herring
2022-10-06 20:05   ` Rob Herring

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=cef6b9a2-9753-d478-ab6a-444784a18576@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@somainline.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lee@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=robh+dt@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).