From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Sebastian Reichel <sebastian.reichel@collabora.com>,
Sebastian Reichel <sre@kernel.org>, Lee Jones <lee@kernel.org>
Cc: Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
devicetree@vger.kernel.org, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] dt-bindings: power: mfd: max8925: Convert to DT schema format
Date: Mon, 25 Sep 2023 09:07:08 +0200 [thread overview]
Message-ID: <eea00166-3f02-4eb0-9f82-26ffd0133dcc@linaro.org> (raw)
In-Reply-To: <20230922233142.1479677-1-sebastian.reichel@collabora.com>
On 23/09/2023 01:31, Sebastian Reichel wrote:
> Convert the binding to DT schema format.
>
> The sub-functions of this MFD device do not have their own compatible
> string and are thus described directly in the MFD binding document
> after being converted to YAML.
>
...
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + interrupt-controller: true
> +
> + "#interrupt-cells":
> + const: 1
> + description:
> + The cell is the IRQ number
> +
> + maxim,tsc-irq:
> + description: second interrupt from max8925
> + $ref: /schemas/types.yaml#/definitions/uint32
> +
> + regulators:
> + type: object
> +
> + patternProperties:
> + "^SDV[1-3]$|^LDO[1-9]$|^LDO1[0-9]$|^LDO20$":
> + description: regulator configuration for SDV1-3 and LDO1-20
> + $ref: /schemas/regulator/regulator.yaml
Missing on this level: unevaluatedProperties: false
> +
> + additionalProperties: false
> +
> + backlight:
> + type: object
> + properties:
> + maxim,max8925-dual-string:
> + description: set to 1 to support dual string
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [0, 1]
> + default: 0
> +
> + additionalProperties: false
> +
> + charger:
> + type: object
> + properties:
> + batt-detect:
> + description: set to 1 if battery detection via ID pin is supported
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [0, 1]
> + default: 0
> +
> + topoff-threshold:
> + description: charging current in topoff mode, configures bits 5-6 in CHG_CNTL1
> + $ref: /schemas/types.yaml#/definitions/uint32
> + minimum: 0
> + maximum: 3
> + default: 0
> +
> + fast-charge:
> + description: set charging current in fast mode, configures bits 0-3 in CHG_CNTL1
> + $ref: /schemas/types.yaml#/definitions/uint32
> + minimum: 0
> + maximum: 7
> + default: 0
> +
> + no-temp-support:
> + description: set to 1 if temperature sensing is not supported
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [0, 1]
> + default: 0
> +
> + no-insert-detect:
> + description: set to 1 if AC detection is not supported
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [0, 1]
> + default: 0
> +
> + additionalProperties: false
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - interrupt-controller
> + - "#interrupt-cells"
> + - regulators
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + max8925@3c {
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,max8925";
> + reg = <0x3c>;
> + interrupts = <1>;
> + interrupt-parent = <&intcmux4>;
> + interrupt-controller;
> + #interrupt-cells = <1>;
> + maxim,tsc-irq = <0>;
> +
> + regulators {
> + SDV1 {
> + regulator-min-microvolt = <637500>;
> + regulator-max-microvolt = <1425000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + LDO1 {
> + regulator-min-microvolt = <750000>;
> + regulator-max-microvolt = <3900000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> + };
> +
> + backlight {
> + maxim,max8925-dual-string = <0>;
> + };
> +
> + charger {
> + batt-detect = <0>;
> + topoff-threshold = <1>;
> + fast-charge = <7>;
> + no-temp-support = <0>;
> + no-insert-detect = <0>;
> + };
> + };
> + };
Best regards,
Krzysztof
prev parent reply other threads:[~2023-09-25 7:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-22 23:31 [PATCH v2] dt-bindings: power: mfd: max8925: Convert to DT schema format Sebastian Reichel
2023-09-25 7:07 ` 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=eea00166-3f02-4eb0-9f82-26ffd0133dcc@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=sebastian.reichel@collabora.com \
--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).