From: sashiko-bot@kernel.org
To: "Linus Walleij" <linusw@kernel.org>
Cc: robh@kernel.org, devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v3 1/2] dt-bindings: power: supply: ab8500: Add AB8505 charger
Date: Fri, 25 Sep 2026 09:09:57 +0000 [thread overview]
Message-ID: <20260925090958.7BBC31F008A1@smtp.kernel.org> (raw)
In-Reply-To: <20260925-ab8500-charger-dt-v3-1-f80b8d295e2d@kernel.org>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] dt-bindings: driver probe breakage due to 9 interrupt limit for AB8505
- [Medium] dt-bindings: missing schema constraint for autopower_cfg on AB8505
--
commit 56f862db85ac24639bf3e5234e563c4b067537a4
Author: Linus Walleij <linusw@kernel.org>
dt-bindings: power: supply: ab8500: Add AB8505 charger
This commit adds a unique AB8505 charger compatible string with the AB8500
compatible as its fallback. It requires 14 main and USB charger interrupts
on AB8500 and 9 USB charger interrupts on AB8505. It also notes that the
autopower_cfg describes the AB8500 facility, as the AB8505 register bit
is reserved.
> diff --git a/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-charger.yaml b/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-charger.yaml
> index 4f19744844e9c..dcffcecaea13b 100644
> --- a/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-charger.yaml
> +++ b/Documentation/devicetree/bindings/power/supply/stericsson,ab8500-charger.yaml
[ ... ]
> properties:
> compatible:
> - const: stericsson,ab8500-charger
> + oneOf:
> + - const: stericsson,ab8500-charger
> + - items:
> + - const: stericsson,ab8505-charger
> + - const: stericsson,ab8500-charger
[ ... ]
> +allOf:
> + - $ref: power-supply.yaml#
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: stericsson,ab8505-charger
> + then:
> + properties:
> + interrupts:
> + minItems: 9
> + maxItems: 9
[Severity: High]
Since stericsson,ab8505-charger uses stericsson,ab8500-charger as a fallback
above, does enforcing a strict limit of 9 interrupts here break driver probe?
Looking at drivers/power/supply/ab8500_charger.c:ab8500_charger_probe(), the
driver unconditionally requests all 14 interrupts:
for (i = 0; i < ARRAY_SIZE(ab8500_charger_irq); i++) {
irq = platform_get_irq_byname(pdev, ab8500_charger_irq[i].name);
if (irq < 0)
return irq;
}
If the device tree strictly follows this schema and provides only 9
interrupts, platform_get_irq_byname() will return -ENXIO when requesting the
missing MAIN charger interrupts, aborting probe immediately.
[Severity: Medium]
Since the commit message notes that the corresponding AB8505 register bit
is reserved, should this conditional block explicitly disallow the
autopower_cfg property?
If a device tree includes autopower_cfg in an ab8505-charger node, the schema
will allow it. At runtime, the driver will act on it and invoke
ab8500_enable_disable_sw_fallback(), which unconditionally writes to the
reserved hardware register on AB8505 devices.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260925-ab8500-charger-dt-v3-0-f80b8d295e2d@kernel.org?part=1
next prev parent reply other threads:[~2026-09-25 9:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-25 8:59 [PATCH v3 0/2] power: supply: Correct AB8505 charger device tree Linus Walleij
2026-09-25 8:59 ` [PATCH v3 1/2] dt-bindings: power: supply: ab8500: Add AB8505 charger Linus Walleij
2026-09-25 9:09 ` sashiko-bot [this message]
2026-09-25 16:22 ` Linus Walleij
2026-09-25 8:59 ` [PATCH v3 2/2] ARM: dts: ux500: Use AB8505 charger compatible Linus Walleij
2026-09-25 9:08 ` sashiko-bot
2026-09-25 16:23 ` Linus Walleij
2026-10-04 17:46 ` (subset) [PATCH v3 0/2] power: supply: Correct AB8505 charger device tree Sebastian Reichel
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=20260925090958.7BBC31F008A1@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linusw@kernel.org \
--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