From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Neil Armstrong <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 13:09:05 +0200 [thread overview]
Message-ID: <8213587e-681a-a948-42a6-2b1632b47ac0@linaro.org> (raw)
In-Reply-To: <20221005-mdm9615-pinctrl-yaml-v1-1-0cbc006e2a30@linaro.org>
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 |
> + 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
next prev parent reply other threads:[~2022-10-06 11:09 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 [this message]
2022-10-06 16:20 ` Neil Armstrong
2022-10-06 20:20 ` Krzysztof Kozlowski
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=8213587e-681a-a948-42a6-2b1632b47ac0@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).