All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Kyle Tso <kyletso@google.com>
Cc: krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
	linux@roeck-us.net, heikki.krogerus@linux.intel.com,
	gregkh@linuxfoundation.org, badhri@google.com,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-usb@vger.kernel.org
Subject: Re: [PATCH v5 1/2] dt-bindings: connector: Add child nodes for multiple PD capabilities
Date: Fri, 8 Dec 2023 10:50:39 -0600	[thread overview]
Message-ID: <20231208165039.GA1756077-robh@kernel.org> (raw)
In-Reply-To: <20231205030114.1349089-2-kyletso@google.com>

On Tue, Dec 05, 2023 at 11:01:13AM +0800, Kyle Tso wrote:
> Commit 662a60102c12 ("usb: typec: Separate USB Power Delivery from USB
> Type-C") allows userspace to configure the PD of a port by selecting
> different set of predefined PD capabilities. Define the PD capability
> sets in DT for better configurability in device modules.
> 
> Define an optional child node "capabilities" to contain multiple USB
> Power Delivery capabilities.
> 
> Define child nodes with pattern (e.g. caps-0, caps-1) under
> "capabilities". Each node contains PDO data of a selectable Power
> Delivery capability.
> 
> Also define common properties for source-pdos, sink-pdos, and
> op-sink-microwatt that can be referenced.
> 
> Signed-off-by: Kyle Tso <kyletso@google.com>
> ---
> v4 -> v5:
> - Fixed DT_CHECK errors
> 
>  .../bindings/connector/usb-connector.yaml     | 88 +++++++++++++------
>  1 file changed, 59 insertions(+), 29 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/connector/usb-connector.yaml b/Documentation/devicetree/bindings/connector/usb-connector.yaml
> index 7c8a3e8430d3..7945d09d1f59 100644
> --- a/Documentation/devicetree/bindings/connector/usb-connector.yaml
> +++ b/Documentation/devicetree/bindings/connector/usb-connector.yaml
> @@ -14,6 +14,8 @@ description:
>    of a USB interface controller or a separate node when it is attached to both
>    MUX and USB interface controller.
>  
> +$ref: "#/$defs/capabilities"
> +
>  properties:
>    compatible:
>      oneOf:
> @@ -67,6 +69,15 @@ properties:
>        model it as a regulator. See bindings/regulator/fixed-regulator.yaml
>  
>    # The following are optional properties for "usb-c-connector".
> +  source-pdos:
> +    $ref: "#/$defs/capabilities/properties/source-pdos"
> +
> +  sink-pdos:
> +    $ref: "#/$defs/capabilities/properties/sink-pdos"
> +
> +  op-sink-microwatt:
> +    $ref: "#/$defs/capabilities/properties/op-sink-microwatt"

With the $ref above, these aren't needed. But you have to use 
unevaluatedProperties instead of additionalProperties.

I fixed this up and applied.

Rob

  reply	other threads:[~2023-12-08 16:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-05  3:01 [PATCH v5 0/2] mutiple selectable capabilities in tcpm Kyle Tso
2023-12-05  3:01 ` [PATCH v5 1/2] dt-bindings: connector: Add child nodes for multiple PD capabilities Kyle Tso
2023-12-08 16:50   ` Rob Herring [this message]
2023-12-11  2:49     ` Kyle Tso
2023-12-05  3:01 ` [PATCH v5 2/2] usb: typec: tcpm: Support multiple capabilities Kyle Tso
2023-12-13 14:32   ` Heikki Krogerus

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=20231208165039.GA1756077-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=badhri@google.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kyletso@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /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.