lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cef6b9a2-9753-d478-ab6a-444784a18576@linaro.org>
Date:   Thu, 6 Oct 2022 22:20:25 +0200
From:   Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To:     neil.armstrong@...aro.org,
        Konrad Dybcio <konrad.dybcio@...ainline.org>,
        Andy Gross <agross@...nel.org>, Lee Jones <lee@...nel.org>,
        Bjorn Andersson <andersson@...nel.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        Mark Brown <broonie@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Liam Girdwood <lgirdwood@...il.com>
Cc:     linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH 1/6] dt-bindings: pinctrl: convert
 qcom,mdm9615-pinctrl.txt to dt-schema

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@...aro.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@...nel.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@...0000: 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ