devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Cc: azkali <a.ffcc7@gmail.com>, Adam Jiang <chaoj@nvidia.com>,
	CTCaer <ctcaer@gmail.com>, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Derek Kiernan <derek.kiernan@amd.com>,
	Dragan Cvetic <dragan.cvetic@amd.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: misc: rohm,bm92txx: Add BM92Txx support
Date: Thu, 24 Aug 2023 18:16:44 +0200	[thread overview]
Message-ID: <8d4e2110-4e43-06c4-126d-22c29050f13e@linaro.org> (raw)
In-Reply-To: <20230824153059.212244-2-linkmauve@linkmauve.fr>

On 24/08/2023 17:30, Emmanuel Gil Peyrot wrote:
> The BM92T36 is used in the Nintendo Switch as its USB-C Power Delivery
> controller.
> 
> Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
> ---
>  .../bindings/misc/rohm,bm92txx.yaml           | 67 +++++++++++++++++++
>  MAINTAINERS                                   |  5 ++
>  2 files changed, 72 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/misc/rohm,bm92txx.yaml

That's not misc device but usb, so please put it in usb.

> 
> diff --git a/Documentation/devicetree/bindings/misc/rohm,bm92txx.yaml b/Documentation/devicetree/bindings/misc/rohm,bm92txx.yaml
> new file mode 100644
> index 000000000000..0322a7f096f0
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/misc/rohm,bm92txx.yaml
> @@ -0,0 +1,67 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +# Copyright (C) 2023 Emmanuel Gil Peyrot
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/misc/rohm,bm92txx.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: BM92Txx USB-C Power Delivery Controller
> +
> +maintainers:
> +  - Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
> +
> +properties:
> +  compatible:
> +    enum:
> +      - rohm,bm92t10
> +      - rohm,bm92t20
> +      - rohm,bm92t30
> +      - rohm,bm92t36
> +      - rohm,bm92t50

Your driver suggests they are fully compatible.

> +
> +  reg:
> +    maxItems: 1
> +
> +  rohm,dp-signal-toggle-on-resume:
> +    type: boolean
> +    description: |
> +      Do a toggle on resume instead of disable in suspend and enable in resume,
> +      because this also disables the LED effects.

That's OS policy, not suitable for DT. Drop the property.

> +
> +  rohm,led-static-on-suspend:
> +    type: boolean
> +    description: Dim or breathing dock LED.

Ditto

> +
> +  rohm,dock-power-limit-disable:
> +    type: boolean
> +    description: Disable the power limit in dock mode.

Your description copies property name, so it is not much useful. Why
this is board-configurable?

> +
> +  rohm,dp-alerts-enable:
> +    type: boolean
> +    description: Enable DisplayPort alerts.

Same questions.

> +
> +  rohm,pd-5v-current-limit-ma:
> +    $ref: /schemas/types.yaml#/definitions/uint32

Use common property units.

> +    default: 2000
> +    description: Current limit in mA when voltage is 5V.
> +

You miss connector, so binding is incomplete. All these properties look
duplicating connector properties.


> +  rohm,pd-9v-current-limit-ma:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    default: 2000
> +    description: Current limit in mA when voltage is 9V.
> +
> +  rohm,pd-12v-current-limit-ma:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    default: 1500
> +    description: Current limit in mA when voltage is 12V.
> +
> +  rohm,pd-15v-current-limit-ma:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    default: 1200
> +    description: Current limit in mA when voltage is 15V.
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false

Missing example. You must have and it must be complete.

Best regards,
Krzysztof


  reply	other threads:[~2023-08-24 16:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-24 15:30 [PATCH 0/2] Add a driver for the ROHM BM92Txx USB-C Power Delivery controller Emmanuel Gil Peyrot
2023-08-24 15:30 ` [PATCH 1/2] dt-bindings: misc: rohm,bm92txx: Add BM92Txx support Emmanuel Gil Peyrot
2023-08-24 16:16   ` Krzysztof Kozlowski [this message]
2023-08-24 15:30 ` [PATCH 2/2] misc: bm92txx: Add driver for the ROHM BM92Txx Emmanuel Gil Peyrot
2023-08-24 15:40   ` Greg Kroah-Hartman
2023-08-24 16:26   ` Krzysztof Kozlowski
2023-08-24 16:28   ` Krzysztof Kozlowski
2023-08-28 15:06     ` Emmanuel Gil Peyrot
2023-08-28 17:05       ` Krzysztof Kozlowski
2023-08-28 17:08         ` Krzysztof Kozlowski
2023-08-25 18:24   ` kernel test robot
2023-08-25 18:45   ` kernel test robot

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=8d4e2110-4e43-06c4-126d-22c29050f13e@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=a.ffcc7@gmail.com \
    --cc=arnd@arndb.de \
    --cc=chaoj@nvidia.com \
    --cc=conor+dt@kernel.org \
    --cc=ctcaer@gmail.com \
    --cc=derek.kiernan@amd.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dragan.cvetic@amd.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linkmauve@linkmauve.fr \
    --cc=linux-kernel@vger.kernel.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).