Re: [PATCH 1/6] dt-bindings: pinctrl: convert qcom,mdm9615-pinctrl.txt to dt-schema

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/10/2022 11:57, Neil Armstrong wrote:
> Convert the MDM9515 pinctrl bindings to dt-schema.
> 
> Signed-off-by: Neil Armstrong <neil.armstrong@xxxxxxxxxx>
> ---
>  .../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@xxxxxxxxxx>
> +
> +description: |

No need for |

> +  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.

> +
> +allOf:
> +  - $ref: "pinctrl.yaml#"

Drop it, it's included from tlmm-common

> +  - $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

> +    oneOf:
> +      - $ref: "#/$defs/qcom-mdm9615-pinctrl-state"
> +      - patternProperties:
> +          "-pins$":
> +            $ref: "#/$defs/qcom-mdm9615-pinctrl-state"
> +
> +'$defs':

No need for quotes

> +  qcom-mdm9615-pinctrl-state:
> +    type: object
> +    description:
> +      Pinctrl node's client devices use subnodes for desired pin configuration.
> +      Client device subnodes use below standard properties.
> +    $ref: "qcom,tlmm-common.yaml#/$defs/qcom-tlmm-state"

No need for quotes

> +
> +    properties:
> +      pins:
> +        description:
> +          List of gpio pins affected by the properties specified in this
> +          subnode.
> +        items:
> +          oneOf:
> +            - pattern: "^gpio([0-9]|[1-7][0-9]|8[0-7])$"

No sd-like functions? If so, then drop oneOf

> +        minItems: 1
> +        maxItems: 16
> +
> +      function:
> +        description:
> +          Specify the alternative function to be configured for the specified
> +          pins.
> +
> +        enum: [ gpio, gsbi2_i2c, gsbi3, gsbi4, gsbi5_i2c, gsbi5_uart,
> +                sdc2, ebi2_lcdc, ps_hold, prim_audio, sec_audio, cdc_mclk, ]
> +
> +      bias-disable: true
> +      bias-pull-down: true
> +      bias-pull-up: true
> +      drive-strength: true
> +      output-high: true
> +      output-low: true
> +      input-enable: true
> +
> +    required:
> +      - pins
> +      - function
> +
> +    additionalProperties: false
> +
> +examples:
> +  - |
> +        #include <dt-bindings/interrupt-controller/arm-gic.h>
> +        tlmm: pinctrl@1000000 {

Use 4 spaces indentation.

> +          compatible = "qcom,mdm9615-pinctrl";
> +          reg = <0x01000000 0x300000>;
> +          interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
> +          gpio-controller;
> +          gpio-ranges = <&msmgpio 0 0 88>;
> +          #gpio-cells = <2>;
> +          interrupt-controller;
> +          #interrupt-cells = <2>;

Add example of -state with and without -pins node.

You dropped it with conversion.


> +        };
> 

Best regards,
Krzysztof




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux