devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Dimitri Fedrau <dima.fedrau@gmail.com>
Cc: Sebastian Reichel <sre@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/2] dt-bindings: power: supply: add support for MAX17201/MAX17205 fuel gauge
Date: Sun, 16 Jun 2024 09:27:21 +0200	[thread overview]
Message-ID: <ee0cd414-206c-48c9-aee2-06e24e0b981c@kernel.org> (raw)
In-Reply-To: <20240615203352.164234-2-dima.fedrau@gmail.com>

On 15/06/2024 22:33, Dimitri Fedrau wrote:
> Adding documentation for MAXIMs MAX17201/MAX17205 fuel gauge.
> 

Three patchsets within 30 minutes. No changelog et all.

Slow down (one posting per 24h) to give people chances to review. Then
provide changelog under --- and describe what happened.

> Signed-off-by: Dimitri Fedrau <dima.fedrau@gmail.com>
> ---
>  .../bindings/power/supply/maxim,max1720x.yaml | 51 +++++++++++++++++++
>  1 file changed, 51 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/power/supply/maxim,max1720x.yaml
> 
> diff --git a/Documentation/devicetree/bindings/power/supply/maxim,max1720x.yaml b/Documentation/devicetree/bindings/power/supply/maxim,max1720x.yaml
> new file mode 100644
> index 000000000000..4414bc6f214f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/supply/maxim,max1720x.yaml
> @@ -0,0 +1,51 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/power/supply/maxim,max1720x.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Maxim MAX1720x fuel gauge
> +
> +maintainers:
> +  - Dimitri Fedrau <dima.fedrau@gmail.com>
> +
> +properties:
> +  compatible:
> +    const: maxim,max1720x

Nope, this must be specific.

Filename follows compatible then.

> +
> +  reg:
> +    items:
> +      - description: ModelGauge m5 registers
> +      - description: Nonvolatile registers
> +
> +  reg-names:
> +    items:
> +      - const: m5
> +      - const: nvmem
> +
> +  interrupts:
> +    maxItems: 1

This is incomplete. Missing battery and probably more... Look how other
bindings are written.

> +
> +required:
> +  - compatible
> +  - reg
> +  - reg-names
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    i2c {
> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +
> +      max17201@36 {

Node names should be generic. See also an explanation and list of
examples (not exhaustive) in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation


> +        compatible = "maxim,max1720x";
> +        reg = <0x36>, <0xb>;
> +        reg-names = "m5", "nvmem";
> +        interrupt-parent = <&gpio0>;
> +        interrupts = <31 IRQ_TYPE_LEVEL_LOW>;
> +        status = "okay";

Drop

Best regards,
Krzysztof


  reply	other threads:[~2024-06-16  7:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240615203352.164234-1-dima.fedrau@gmail.com>
2024-06-15 20:33 ` [PATCH v3 1/2] dt-bindings: power: supply: add support for MAX17201/MAX17205 fuel gauge Dimitri Fedrau
2024-06-16  7:27   ` Krzysztof Kozlowski [this message]
2024-06-17 12:59     ` Dimitri Fedrau
2024-06-17 17:29       ` Krzysztof Kozlowski

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=ee0cd414-206c-48c9-aee2-06e24e0b981c@kernel.org \
    --to=krzk@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dima.fedrau@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=robh@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).