Devicetree
 help / color / mirror / Atom feed
From: Jerome Brunet <jbrunet@baylibre.com>
To: sashiko-bot@kernel.org, Lee Jones <lee@kernel.org>,
	Mark Brown <broonie@kernel.org>
Cc: sashiko-reviews@lists.linux.dev, robh@kernel.org,
	mfd@lists.linux.dev, conor+dt@kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH RESEND v6 4/5] mfd: axp20x: Add support for AXP318W PMIC
Date: Thu, 13 Aug 2026 10:29:02 +0200	[thread overview]
Message-ID: <1jldaafmpd.fsf@starbuckisacylon.baylibre.com> (raw)
In-Reply-To: <20260812214019.CDF921F000E9@smtp.kernel.org> (sashiko-bot@kernel.org's message of "Wed, 12 Aug 2026 21:40:19 +0000")

On sam. 12 janv. 2008 at 23:40, sashiko-bot@kernel.org wrote:

> Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
> - [High] The corresponding regulator driver lacks support for `AXP318_ID`, causing the `axp20x-regulator` child device probe to fail.

Funny sashiko did not pick up on this when v6 was first sent. This is an
ordering problem. The regulator part should be applied before the mfd
one.

I could reorder here but there is not much point since the 2 changes will
land in different subsystems but it does bring a valid question:

Lee, Mark, are you OK with picking the patches indended for your
subsystem or would you prefer that I split the series, regulator on one
side, mfd on the other (with a dep on the regulator one, of course) ?

> - [Medium] The newly added `axp318_cells` array uses a hard-coded cell ID of 1 instead of using `PLATFORM_DEVID_AUTO`.
> --

... Again, already explained this in previous version and the cover letter.

>
> --- Patch [4]: [PATCH RESEND v6 4/5] mfd: axp20x: Add support for AXP318W PMIC ---
> commit 5a33005ba66225f7df0e6747b0fcb9263e977f13
> Author: Andre Przywara <andre.przywara@arm.com>
>
> mfd: axp20x: Add support for AXP318W PMIC
>
> This commit introduces MFD core and I2C support for the X-Powers AXP318W
> PMIC. It defines regmap properties, interrupt maps, and adds the regulator
> child device.
>
>> diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
>> index 84839d4aa1ca5..ea00c0cdce58c 100644
>> --- a/drivers/mfd/axp20x.c
>> +++ b/drivers/mfd/axp20x.c
>
> [ ... ]
>
>> @@ -1061,6 +1129,10 @@ static const struct mfd_cell axp313a_cells[] = {
>>  	MFD_CELL_RES("axp313a-pek", axp313a_pek_resources),
>>  };
>>  
>> +static const struct mfd_cell axp318_cells[] = {
>> +	MFD_CELL_BASIC("axp20x-regulator", NULL, NULL, 0, 1),
>
> [Severity: Medium]
> Should this cell use PLATFORM_DEVID_AUTO instead of a hard-coded ID of 1?
>
> Hard-coding cell IDs or mapping them to fixed instance numbers can lead to
> device naming collisions in sysfs and driver load failures if multiple PMICs
> defining the same cell name exist on the same board.
>
> [Severity: High]
> Will this child device successfully probe, or are the regulator driver
> changes missing from this patch series?
>
> When the MFD core registers the "axp20x-regulator" cell, the regulator driver's
> axp20x_regulator_probe() is invoked. It checks the axp20x->variant, but since
> AXP318_ID is not handled in the regulator driver:
>
> drivers/regulator/axp20x-regulator.c:axp20x_regulator_probe() {
>     ...
>     switch (axp20x->variant) {
>     ...
>     default:
>         dev_err(&pdev->dev, "Unsupported AXP variant: %d\n",
>             axp20x->variant);
>         return -EINVAL;
>     }
> }
>
> It appears this will fall through to the default case, print an error,
> and return -EINVAL unconditionally.
>
>> +};
>> +
>>  static const struct mfd_cell axp717_cells[] = {
>>  	MFD_CELL_NAME("axp20x-regulator"),

-- 
Jerome

  reply	other threads:[~2026-08-13  8:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-12 21:30 [PATCH RESEND v6 0/5] regulator: Add X-Powers AXP318W PMIC support Jerome Brunet
2026-08-12 21:30 ` [PATCH RESEND v6 1/5] mfd: axp20x: Constify axp313 and axp717 cells Jerome Brunet
2026-08-12 21:37   ` sashiko-bot
2026-08-13  8:19     ` Jerome Brunet
2026-08-12 21:30 ` [PATCH RESEND v6 2/5] mfd: axp20x-i2c: Fix i2c instantiation Jerome Brunet
2026-08-12 21:41   ` sashiko-bot
2026-08-12 21:30 ` [PATCH RESEND v6 3/5] dt-bindings: mfd: x-powers,axp152: Document AXP318W Jerome Brunet
2026-08-12 21:37   ` sashiko-bot
2026-08-12 21:30 ` [PATCH RESEND v6 4/5] mfd: axp20x: Add support for AXP318W PMIC Jerome Brunet
2026-08-12 21:40   ` sashiko-bot
2026-08-13  8:29     ` Jerome Brunet [this message]
2026-08-13  9:56       ` Lee Jones
2026-08-12 21:30 ` [PATCH RESEND v6 5/5] regulator: axp20x: add support for the AXP318W Jerome Brunet
2026-08-12 21:37   ` 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=1jldaafmpd.fsf@starbuckisacylon.baylibre.com \
    --to=jbrunet@baylibre.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lee@kernel.org \
    --cc=mfd@lists.linux.dev \
    --cc=robh@kernel.org \
    --cc=sashiko-bot@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