devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Nathan Morrisson <nmorrisson@phytec.com>,
	lee@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, nm@ti.com, vigneshr@ti.com,
	kristo@kernel.org, j-keerthy@ti.com
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, upstream@lists.phytec.de,
	w.egorov@phytec.de
Subject: Re: [PATCH 1/2] dt-bindings: Convert lp873x.txt to json-schema
Date: Mon, 29 Apr 2024 08:06:58 +0200	[thread overview]
Message-ID: <2023dd55-33d8-4904-8724-97d89c130010@kernel.org> (raw)
In-Reply-To: <20240426172155.10860-1-nmorrisson@phytec.com>

On 26/04/2024 19:21, Nathan Morrisson wrote:
> Convert the lp873x binding to DT schema format. Converted with
> minimal corrections.
> 
> Signed-off-by: Nathan Morrisson <nmorrisson@phytec.com>

Please use subject prefixes matching the subsystem. You can get them for
example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory
your patch is touching.


...

> -};
> diff --git a/Documentation/devicetree/bindings/mfd/lp873x.yaml b/Documentation/devicetree/bindings/mfd/lp873x.yaml
> new file mode 100644
> index 000000000000..87fefdc3126b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/lp873x.yaml

Missing vendor prefix. Name it after compatible, so ti,lp8732.yaml

> @@ -0,0 +1,114 @@
> +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mfd/lp873x.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: TI LP873X PMIC MFD drivers


MFD is Linuxism, 'drivers' is not a hardware usually. Please provide
title matching hardware.

> +
> +maintainers:
> +  - J Keerthy <j-keerthy@ti.com>
> +
> +description: |

Do not need '|' unless you need to preserve formatting.

> +  PMIC with two high-current buck converters and two linear regulators.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - ti,lp8732
> +      - ti,lp8733
> +
> +  reg:
> +    maxItems: 1
> +
> +  gpio-controller: true
> +
> +  '#gpio-cells':
> +    const: 2
> +
> +  regulators:
> +    description:
> +      List of child nodes that specify the regulator initialization data.
> +    type: object
> +    patternProperties:
> +      "^buck[01]|ldo[01]$":
> +        type: object
> +        $ref: /schemas/regulator/regulator.yaml#
> +        unevaluatedProperties: false
> +    additionalProperties: false
> +
> +patternProperties:
> +  '^(buck[01]|ldo[01])-in-supply$':
> +    description: Phandle to parent supply of each regulator populated under regulators node.
> +
> +required:
> +  - compatible
> +  - reg
> +  - regulators

Several other properties are required and you did not mention changes in
the conversion.

> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        i2c@0 {
> +            #address-cells = <1>;
> +            #size-cells = <0>;
> +            reg = <0>;
> +
> +            pmic: lp8733@60 {

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

That's usually pmic


Best regards,
Krzysztof


      parent reply	other threads:[~2024-04-29  6:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-26 17:21 [PATCH 1/2] dt-bindings: Convert lp873x.txt to json-schema Nathan Morrisson
2024-04-26 17:21 ` [PATCH 2/2] arm64: dts: ti: phycore-am64: Add PMIC Nathan Morrisson
2024-04-29  6:06 ` 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=2023dd55-33d8-4904-8724-97d89c130010@kernel.org \
    --to=krzk@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=j-keerthy@ti.com \
    --cc=kristo@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=nmorrisson@phytec.com \
    --cc=robh@kernel.org \
    --cc=upstream@lists.phytec.de \
    --cc=vigneshr@ti.com \
    --cc=w.egorov@phytec.de \
    /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).