devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: ChiaEn Wu <peterwu.pub@gmail.com>,
	sre@kernel.org, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org
Cc: chiaen_wu@richtek.com, cy_huang@richtek.com,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-pm@vger.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: power: supply: Add Richtek RT9467 battery charger
Date: Thu, 29 Sep 2022 13:31:25 +0200	[thread overview]
Message-ID: <8322b054-27c4-32c5-53a4-abb40845d66c@linaro.org> (raw)
In-Reply-To: <2590163cabaef9ece537c5453eeef9f259e56cef.1664475743.git.chiaen_wu@richtek.com>

On 29/09/2022 12:37, ChiaEn Wu wrote:
> From: ChiaEn Wu <chiaen_wu@richtek.com>
> 
> Add bindings for the Richtek RT9467 battery charger.
> 
> Co-developed-by: ChiYuan Huang <cy_huang@richtek.com>
> Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
> Signed-off-by: ChiaEn Wu <chiaen_wu@richtek.com>
> ---

Thank you for your patch. There is something to discuss/improve.

> +
> +  reg:
> +    maxItems: 1
> +
> +  wakeup-source: true
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  charge-enable-gpios:
> +    description: GPIO is used to turn on and off charging.
> +    maxItems: 1
> +
> +  usb-otg-vbus-regulator:
> +    type: object
> +    description: OTG boost regulator.
> +    unevaluatedProperties: false
> +    $ref: /schemas/regulator/regulator.yaml#
> +
> +    properties:
> +      enable-gpios:
> +        maxItems: 1

maxItems are coming from gpio-consumer-common.yaml, so just
enable-gpios: true

> +
> +required:
> +  - compatible
> +  - reg
> +  - wakeup-source
> +  - interrupts
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    #include <dt-bindings/gpio/gpio.h>
> +    i2c {
> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +
> +      rt9467@5b {

Node names should be generic.
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation

> +        compatible = "richtek,rt9467-charger";
> +        reg = <0x5b>;
> +        wakeup-source;
> +        interrupts-extended = <&gpio_intc 32 IRQ_TYPE_LEVEL_LOW>;
> +        charge-enable-gpios = <&gpio26 1 0>;

Use defines for GPIO flags.

> +
> +        rt9467_otg_vbus: usb-otg-vbus-regulator {
> +          regulator-name = "rt9467-usb-otg-vbus";
> +          regulator-min-microvolt = <4425000>;
> +          regulator-max-microvolt = <5825000>;
> +          regulator-min-microamp = <500000>;
> +          regulator-max-microamp = <3000000>;
> +        };
> +      };
> +    };

Best regards,
Krzysztof


  reply	other threads:[~2022-09-29 11:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-29 10:37 [PATCH 0/2] Add Richtek RT9467 5A Battery Charger support ChiaEn Wu
2022-09-29 10:37 ` [PATCH 1/2] dt-bindings: power: supply: Add Richtek RT9467 battery charger ChiaEn Wu
2022-09-29 11:31   ` Krzysztof Kozlowski [this message]
2022-09-29 10:37 ` [PATCH 2/2] power: supply: rt9467: Add Richtek RT9467 charger driver ChiaEn Wu
2022-09-29 12:33   ` kernel test robot
2022-09-30  2:26   ` 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=8322b054-27c4-32c5-53a4-abb40845d66c@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=chiaen_wu@richtek.com \
    --cc=cy_huang@richtek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=peterwu.pub@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=sre@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).