From: sashiko-bot@kernel.org
To: "Jerome Brunet" <jbrunet@baylibre.com>
Cc: devicetree@vger.kernel.org, conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH v2 2/3] mfd: axp20x: Add support for AXP318W PMIC
Date: Fri, 10 Jul 2026 16:31:34 +0000 [thread overview]
Message-ID: <20260710163134.880CF1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260710-axp318-regulator-v2-2-ee5f1c56b49f@baylibre.com>
Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
- [High] The Power Key (PEK) MFD cell is incorrectly named `axp318w-pek`, which has no corresponding platform driver, resulting in a dead device.
- [High] The `axp20x-regulator` driver does not handle `AXP318_ID`, causing the regulator probe to unconditionally fail.
- [Low] The newly added MFD cell array `axp318_cells` is not declared as `static const`, violating MFD subsystem guidelines.
- [Low] The `axp20x-regulator` cell uses a hard-coded ID instead of `PLATFORM_DEVID_AUTO`, violating MFD subsystem guidelines.
--
--- Patch [2]: [PATCH v2 2/3] mfd: axp20x: Add support for AXP318W PMIC ---
commit 1a5eb1e56ed118dbcf34674ba079b5c5e2ba9f27
Author: Andre Przywara <andre.przywara@arm.com>
mfd: axp20x: Add support for AXP318W PMIC
The AXP318W is a PMIC chip produced by X-Powers, it can be connected to
an I2C bus. It adds support for regulators, interrupts and power key devices.
> diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
> index 679364189ea58..956a0370e6a5e 100644
> --- a/drivers/mfd/axp20x.c
> +++ b/drivers/mfd/axp20x.c
[ ... ]
> @@ -1061,6 +1134,11 @@ static struct mfd_cell axp313a_cells[] = {
> MFD_CELL_RES("axp313a-pek", axp313a_pek_resources),
> };
>
> +static struct mfd_cell axp318_cells[] = {
[Severity: Low]
Does this array need to be declared as static const?
The MFD subsystem guidelines recommend using static const for mfd_cell
arrays to prevent dynamic amendments and keep the array in immutable memory.
> + MFD_CELL_BASIC("axp20x-regulator", NULL, NULL, 0, 1),
[Severity: Low]
Should this cell use PLATFORM_DEVID_AUTO instead of a hard-coded ID?
Using a hard-coded ID of 1 instead of PLATFORM_DEVID_AUTO might lead to
device naming collisions in sysfs if multiple PMICs are present.
[Severity: High]
Will the axp20x-regulator driver probe successfully for this device?
It appears the axp20x-regulator driver's axp20x_regulator_probe() in
drivers/regulator/axp20x-regulator.c is missing a switch case for AXP318_ID.
Would this cause the probe to fall through to the default case, log an
unsupported variant error, and return -EINVAL unconditionally?
> + MFD_CELL_RES("axp318w-pek", axp318_pek_resources),
[Severity: High]
Is there a matching platform driver for axp318w-pek?
Looking at the child driver's ID match table axp_pek_id_match in
drivers/input/misc/axp20x-pek.c, it seems to only contain axp20x-pek and
axp221-pek. Will assigning this specific name cause the power key device
to silently fail to bind to a driver?
> +};
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260710-axp318-regulator-v2-0-ee5f1c56b49f@baylibre.com?part=2
next prev parent reply other threads:[~2026-07-10 16:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-10 16:19 [PATCH v2 0/3] regulator: Add X-Powers AXP318W PMIC support Jerome Brunet
2026-07-10 16:19 ` [PATCH v2 1/3] dt-bindings: mfd: x-powers,axp152: Document AXP318W Jerome Brunet
2026-07-10 16:30 ` sashiko-bot
2026-07-10 16:19 ` [PATCH v2 2/3] mfd: axp20x: Add support for AXP318W PMIC Jerome Brunet
2026-07-10 16:31 ` sashiko-bot [this message]
2026-07-10 16:19 ` [PATCH v2 3/3] regulator: axp20x: add support for the AXP318W Jerome Brunet
2026-07-10 16:27 ` Jerome Brunet
2026-07-10 16:29 ` sashiko-bot
2026-07-10 17:00 ` Mark Brown
2026-07-11 12:37 ` Jerome Brunet
2026-07-10 17:02 ` [PATCH v2 0/3] regulator: Add X-Powers AXP318W PMIC support Jerome Brunet
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=20260710163134.880CF1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jbrunet@baylibre.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