From: sashiko-bot@kernel.org
To: "Chris Morgan" <macroalpha82@gmail.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 1/3] dt-bindings: power: cw2015: add cw2215, cw2217, and cw2218
Date: Tue, 27 Oct 2026 13:22:44 +0000 [thread overview]
Message-ID: <sashiko-outbox-186616@kernel.org> (raw)
In-Reply-To: <20261027131751.1724448-2-macroalpha82@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] dt-bindings: power: cw2015: shunt-resistor-micro-ohms bounds off by 1000x
--
commit 76be9d50cb26d818a5ec97865e1118988a432963
Author: Chris Morgan <macromorgan@hotmail.com>
dt-bindings: power: cw2015: add cw2215, cw2217, and cw2218
This commit adds device tree binding support for the Cellwise cw2215,
cw2217, and cw2218 battery fuel gauges to cw2015_battery.yaml, including
the shunt-resistor-micro-ohms property and an 80-byte battery profile
constraint.
> diff --git a/Documentation/devicetree/bindings/power/supply/cw2015_battery.yaml b/Documentation/devicetree/bindings/power/supply/cw2015_battery.yaml
> index f7bde324153d8..12d2d9a9cf6fd 100644
> --- a/Documentation/devicetree/bindings/power/supply/cw2015_battery.yaml
> +++ b/Documentation/devicetree/bindings/power/supply/cw2015_battery.yaml
[ ... ]
> @@ -41,7 +40,14 @@ properties:
>
> power-supplies:
> minItems: 1
> - maxItems: 8 # Should be enough
> + maxItems: 8 # Should be enough
> +
> + shunt-resistor-micro-ohms:
> + description: |
> + The value, in micro-ohms, of the shunt resistor used for sampling
> + the battery current.
> + minimum: 1000000
> + maximum: 50000000
[Severity: Medium]
Are the minimum and maximum constraints on shunt-resistor-micro-ohms in
Documentation/devicetree/bindings/power/supply/cw2015_battery.yaml off by a
factor of 1000?
Since 1 milliohm equals 1,000 micro-ohms, a typical fuel gauge shunt
resistor range of 1 milliohm to 50 milliohms corresponds to 1000 to 50000
micro-ohms (matching other fuel gauge bindings under
Documentation/devicetree/bindings/power/supply/ such as maxim,max17042.yaml,
richtek,rt9756.yaml, and st,stc3117.yaml).
Setting minimum to 1000000 and maximum to 50000000 specifies 1 ohm to 50
ohms (or nano-ohms), which causes dtbs_check and dt_binding_check to reject
valid micro-ohm values for cellwise,cw2215, cellwise,cw2217, and
cellwise,cw2218 nodes.
Should minimum and maximum be 1000 and 50000 instead?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261027131751.1724448-1-macroalpha82@gmail.com?part=1
next prev parent reply other threads:[~2026-10-27 13:22 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-27 13:17 [PATCH 0/3] Add Cellwise CW2217 Chris Morgan
2026-10-27 13:17 ` Chris Morgan
2026-10-27 13:17 ` [PATCH 1/3] dt-bindings: power: cw2015: add cw2215, cw2217, and cw2218 Chris Morgan
2026-10-27 13:17 ` Chris Morgan
2026-10-27 13:22 ` sashiko-bot [this message]
2026-10-27 15:57 ` Krzysztof Kozlowski
2026-10-27 15:57 ` Krzysztof Kozlowski
2026-10-27 13:17 ` [PATCH 2/3] power: supply: cw2217: Add support for Cellwise cw2217 Chris Morgan
2026-10-27 13:17 ` Chris Morgan
2026-10-27 13:31 ` sashiko-bot
2026-10-27 13:34 ` Shawn Lin
2026-10-27 13:34 ` Shawn Lin
2026-10-27 15:46 ` Chris Morgan
2026-10-27 15:46 ` Chris Morgan
2026-10-29 6:24 ` kernel test robot
2026-10-29 6:24 ` kernel test robot
2026-10-27 13:17 ` [PATCH 3/3] arm64: dts: rockchip: Add Battery Gauge to Anbernic Vita-Pro Chris Morgan
2026-10-27 13:17 ` Chris Morgan
2026-10-27 13:32 ` 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=sashiko-outbox-186616@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.