From: sashiko-bot@kernel.org
To: "Chris Morgan" <macroalpha82@gmail.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH V3 1/6] dt-bindings: power: supply: sgm41542: document sgm41542
Date: Mon, 01 Jun 2026 16:41:45 +0000 [thread overview]
Message-ID: <20260601164146.06E741F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260601162951.254968-2-macroalpha82@gmail.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] The binding defines power supply properties like 'monitored-battery' but fails to include a root-level reference to the core 'power-supply.yaml' schema, and incorrectly uses 'additionalProperties: false' instead of 'unevaluatedProperties: false'.
- [Low] C preprocessor `#include` directives are placed in the middle of the example DTS block, after a node definition.
--
commit afc648784a49832d73d043919a9fa8c27e4ca3ae
Author: Chris Morgan <macromorgan@hotmail.com>
dt-bindings: power: supply: sgm41542: document sgm41542
This commit documents the SGMicro sgm41542 battery charger and boost
converter. It defines the hardware bindings, including custom input
current and voltage limits, interrupts, and monitored battery references.
> diff --git a/Documentation/devicetree/bindings/power/supply/sgmicro,sgm41542.yaml b/Documentation/devicetree/bindings/power/supply/sgmicro,sgm41542.yaml
> new file mode 100644
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/supply/sgmicro,sgm41542.yaml
[ ... ]
> + interrupts:
> + maxItems: 1
> +
> + monitored-battery:
> + description: |
> + A phandle to a monitored battery node. Values for the following
> + are used by the driver and if not present will result in default
> + values being applied:
[Severity: Low]
Since this device acts as a battery charger, should it include an
allOf block with a $ref to power-supply.yaml? Without it, standard
properties like monitored-battery lack their inherited type definitions.
[ ... ]
> +required:
> + - compatible
> + - reg
> +
> +additionalProperties: false
[Severity: Low]
If this schema is updated to reference the core power-supply schema,
does this need to be changed to unevaluatedProperties: false? Using
additionalProperties: false without inheriting the common power-supply
schema causes schema validation to strictly reject any other standard
power-supply properties added to the device tree node.
> +
> +examples:
> + - |
> + battery: battery {
> + compatible = "simple-battery";
> + constant-charge-current-max-microamp = <10000000>;
> + constant-charge-voltage-max-microvolt = <4350000>;
> + precharge-current-microamp = <180000>;
> + charge-term-current-microamp = <300000>;
> + };
> + #include <dt-bindings/gpio/gpio.h>
> + #include <dt-bindings/interrupt-controller/irq.h>
[Severity: Low]
Is it standard to place these include directives after the initial
battery node? While technically valid C preprocessor syntax, DT binding
conventions typically require all include directives to be placed at the
very top of the examples block, prior to defining any nodes.
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260601162951.254968-1-macroalpha82@gmail.com?part=1
next prev parent reply other threads:[~2026-06-01 16:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-01 16:29 [PATCH V3 0/6] Add Anbernic RG Vita-Pro Chris Morgan
2026-06-01 16:29 ` [PATCH V3 1/6] dt-bindings: power: supply: sgm41542: document sgm41542 Chris Morgan
2026-06-01 16:41 ` sashiko-bot [this message]
2026-06-01 16:29 ` [PATCH V3 2/6] power: supply: sgm41542: Add SG Micro sgm41542 charger Chris Morgan
2026-06-01 16:54 ` sashiko-bot
2026-06-01 16:29 ` [PATCH V3 3/6] dt-bindings: display: panel: document Anbernic TD4310 panel Chris Morgan
2026-06-01 16:29 ` [PATCH V3 4/6] drm/panel: anbernic-td4310: Add RG Vita Pro panel Chris Morgan
2026-06-01 17:05 ` sashiko-bot
2026-06-01 16:29 ` [PATCH V3 5/6] dt-bindings: arm: rockchip: Add Anbernic RG Vita-Pro Chris Morgan
2026-06-01 16:29 ` [PATCH V3 6/6] arm64: dts: " Chris Morgan
2026-06-01 17:17 ` sashiko-bot
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=20260601164146.06E741F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=macroalpha82@gmail.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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