mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: jeff_chang@richtek.com, lgirdwood@gmail.com, broonie@kernel.org,
	robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v5 1/2] dt-bindings: regulator: Add Richtek RT5133 Support
Date: Tue, 29 Jul 2025 08:59:24 +0200	[thread overview]
Message-ID: <bbd655f4-4e3c-4808-a70f-a508714e463d@kernel.org> (raw)
In-Reply-To: <20250729064719.2810734-1-jeff_chang@richtek.com>

On 29/07/2025 08:40, jeff_chang@richtek.com wrote:
> From: Jeff Chang <jeff_chang@richtek.com>
> 
> Add bindings for Richtek RT5133 IC Controlled PMIC
> 
> Signed-off-by: Jeff Chang <jeff_chang@richtek.com>

Subject prefix did not improve. Please read ENTIRE feedback you got at
v1, v2 and v3. I think v4 is the only one you applied.

> ---
> 
> PATCH v5
> 1. Fix Subject RT5133
> 2. Update Base regulator description.
> 3. Move richtek,oc-shutdown-all and richtek,pgb-shutdown-all to chip layer.
> 4. Update richtek,oc-shutdown-all and richtek,pgb-shutdown-all description.
> 5. Remove rt5133-ldo-supply, just using vin-supply for pvin7 and pvin8.
>    Pvin7,8 are power source for LDO7,8. Referecne is LDO1 Vout.
> 6. Using standard examples. (Node name and IRQ type)
> 
>  .../bindings/regulator/richtek,rt5133.yaml    | 176 ++++++++++++++++++
>  1 file changed, 176 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/regulator/richtek,rt5133.yaml
> 
> diff --git a/Documentation/devicetree/bindings/regulator/richtek,rt5133.yaml b/Documentation/devicetree/bindings/regulator/richtek,rt5133.yaml
> new file mode 100644
> index 000000000000..c12069ade224
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/richtek,rt5133.yaml
> @@ -0,0 +1,176 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/regulator/richtek,rt5133.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Richtek RT5133 PMIC Regulator
> +
> +maintainers:
> +  - ShihChia Chang <jeff_chang@richtek.com>
> +
> +description:
> +  The RT5133 is an integrated Power Management IC for portable devices, featuring

Still not wrapped.

> +  8 LDOs and 3 GPOs. It allows programmable output voltages, soft-start times,
> +  and protections via I2C. GPO operation depends on LDO1 voltage.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - richtek,rt5133
> +
> +  reg:
> +    maxItems: 1
> +
> +  enable-gpios:
> +    maxItems: 1
> +
> +  wakeup-source: true
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  gpio-controller: true
> +
> +  "#gpio-cells":
> +    const: 2
> +
> +  richtek,oc-shutdown-all:
> +    type: boolean
> +    description:
> +      Controls the behavior when any LDO (Low Dropout Regulator) enters an Over Current state.

Still not wrapped. Please follow Linux coding style.

> +      If set to true, all LDO channels will be shut down.
> +      If set to false (default), only the affected LDO channel will shut down itself.
> +
> +  richtek,pgb-shutdown-all:
> +    type: boolean
> +    description:
> +      Controls the behavior when any LDO enters a Power Bad state.
> +      If set to true, all LDO channels will be shut down.
> +      If set to false (default), only the affected LDO channel will shut down itself.
> +
> +  regulators:
> +    type: object
> +    additionalProperties: false
> +
> +    properties:
> +      base:
> +        type: object
> +        $ref: regulator.yaml#
> +        unevaluatedProperties: false
> +        description:
> +          Properties for the base regulator, which is the top-level supply for
> +          LDO1 to LDO6. It functions merely as an on/off switch rather than
> +          regulating voltages. If none of LDO1 to LDO6 are in use, switching off
> +          the base will reduce the quiescent current.
> +
> +        required:
> +          - regulator-name
> +
> +    patternProperties:
> +      "^ldo([1-6])$":
> +        type: object
> +        $ref: regulator.yaml#
> +        unevaluatedProperties: false
> +        description:
> +          Properties for single LDO regulator
> +
> +        required:
> +          - regulator-name
> +
> +      "^ldo([7-8])$":
> +        type: object
> +        $ref: regulator.yaml#
> +        unevaluatedProperties: false
> +        description:
> +          Properties for single LDO regulator
> +
> +        properties:
> +          vin-supply: true
> +
> +        required:
> +          - regulator-name
> +          - vin-supply
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - wakeup-source

This is surprising. If this is required, then it is implied by the
compatible. Drop it from here and from properties.

> +
> +unevaluatedProperties: false

additionalProperties instead

> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    i2c {
> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +
> +      pmic@18 {
> +        compatible = "richtek,rt5133";
> +        reg = <0x18>;
> +        wakeup-source;
> +        interrupts-extended = <&gpio 0 IRQ_TYPE_EDGE_FALLING>;
> +        enable-gpios = <&gpio 2 0>;

This did not improve.

> +        gpio-controller;
> +        #gpio-cells = <2>;
> +        richtek,oc-shutdown-all;
> +        richtek,pgb-shutdown-all;
> +        regulators {
> +          base {
> +            regulator-name = "rt5133,base";

Names do not have commas.

> +          };
> +          pvin78: ldo1 {
> +            regulator-name = "rt5133-ldo1";

Drop rt5133 prefix from every name.


Best regards,
Krzysztof

      parent reply	other threads:[~2025-07-29  6:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-29  6:40 jeff_chang
2025-07-29  6:40 ` [PATCH v5 2/2] regulator: rt5133: Add RT5133 PMIC regulator Support jeff_chang
2025-07-29  6:59 ` Krzysztof Kozlowski [this message]

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=bbd655f4-4e3c-4808-a70f-a508714e463d@kernel.org \
    --to=krzk@kernel.org \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jeff_chang@richtek.com \
    --cc=krzk+dt@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@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

all inboxes | Powered by JetHome®