All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Vinod Koul <vkoul@kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	linux-arm-msm@vger.kernel.org, Andy Gross <agross@kernel.org>,
	linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 1/2] dt-bindings: pinctrl: qcom: Add SM8350 pinctrl bindings
Date: Tue, 12 Jan 2021 20:56:27 -0600	[thread overview]
Message-ID: <20210113025627.GA1414436@robh.at.kernel.org> (raw)
In-Reply-To: <X/dCIuUR/El8Gxaa@builder.lan>

On Thu, Jan 07, 2021 at 11:17:22AM -0600, Bjorn Andersson wrote:
> On Tue 05 Jan 23:49 CST 2021, Vinod Koul wrote:
> 
> > Add device tree binding Documentation details for Qualcomm SM8350
> > pinctrl driver.
> > 
> > Signed-off-by: Vinod Koul <vkoul@kernel.org>
> > ---
> >  .../bindings/pinctrl/qcom,sm8350-tlmm.yaml    | 149 ++++++++++++++++++
> >  1 file changed, 149 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,sm8350-tlmm.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,sm8350-tlmm.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,sm8350-tlmm.yaml
> > new file mode 100644
> > index 000000000000..abdafd25bfc2
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/pinctrl/qcom,sm8350-tlmm.yaml
> > @@ -0,0 +1,149 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/pinctrl/qcom,sm8350-tlmm.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Qualcomm Technologies, Inc. SM8350 TLMM block
> > +
> > +maintainers:
> > +  - Vinod Koul <vkoul@kernel.org>
> > +
> > +description: |
> > +  This binding describes the Top Level Mode Multiplexer block found in the
> > +  SM8350 platform.
> > +
> > +properties:
> > +  compatible:
> > +    const: qcom,sm8350-tlmm
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +
> > +  interrupt-controller: true
> > +
> > +  '#interrupt-cells':
> > +    description: Specifies the PIN numbers and Flags, as defined in
> > +      include/dt-bindings/interrupt-controller/irq.h
> > +    const: 2
> > +
> > +  gpio-controller: true
> > +
> > +  '#gpio-cells':
> > +    description: Specifying the pin number and flags, as defined in
> > +      include/dt-bindings/gpio/gpio.h
> > +    const: 2
> > +
> > +  gpio-ranges:
> > +    maxItems: 1
> > +
> > +  gpio-reserved-ranges:
> > +    maxItems: 1
> > +
> > +#PIN CONFIGURATION NODES
> > +patternProperties:
> > +  '-pinmux$':
> 
> I believe that what Rob was asking for was the matter of describing the
> mux and config subnodes under this one. But I don't know really how to
> express this, because the following are all valid:
> 
> default_state: default-state {
> 	pins = "gpio1";
> 	bias-disable;
> };
> 
> default_state: default-state {
> 	rx {
> 		pins = "gpio1";
> 		function = "gpio";
> 		bias-disable;
> 	};
> };
> 
> default_state: default-state {
> 	pinmux {
> 		pins = "gpio1";
> 		function = "gpio";
> 	};
> 
> 	pinconf {
> 		pins = "gpio1";
> 		bias-disable;
> 	};
> };
> 
> I.e. the properties described here applies either to this node directly,
> or any subnodes (1 level) down.

Why!?

You can create a definition and reuse it. Something like this:

$defs:
  pin-node:
    type: object
    properties:
      ...

patternProperties:
  '-state$':
    oneOf:
      - $ref: #/$defs/pin-node

      - patternProperties:
          '.*':
            $ref: #/$defs/pin-node


Rob

  parent reply	other threads:[~2021-01-13  2:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-06  5:49 [PATCH v4 0/2] pinctrl: qcom: Add SM8350 pinctrl support Vinod Koul
2021-01-06  5:49 ` [PATCH v4 1/2] dt-bindings: pinctrl: qcom: Add SM8350 pinctrl bindings Vinod Koul
2021-01-07 17:17   ` Bjorn Andersson
2021-01-08  7:57     ` Vinod Koul
2021-01-08 18:40       ` Bjorn Andersson
2021-01-13  2:56     ` Rob Herring [this message]
2021-01-19 17:10       ` Bjorn Andersson
2021-01-06  5:49 ` [PATCH v4 2/2] pinctrl: qcom: Add SM8350 pinctrl driver Vinod Koul
2021-01-07 17:19   ` Bjorn Andersson

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=20210113025627.GA1414436@robh.at.kernel.org \
    --to=robh@kernel.org \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --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=vkoul@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.