Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "John Crispin" <john@phrozen.org>
Cc: devicetree@vger.kernel.org, mfd@lists.linux.dev, robh@kernel.org,
	conor+dt@kernel.org, lee@kernel.org
Subject: Re: [PATCH v2 2/3] mfd: add Airoha GPIO system controller driver
Date: Fri, 04 Dec 2026 19:50:19 +0000	[thread overview]
Message-ID: <sashiko-outbox-250567@kernel.org> (raw)
In-Reply-To: <20261204193857.3801624-3-john@phrozen.org>

Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [Low] mfd: single-cell MFD wrapper in airoha_gpio_sysctl_probe()
- [Low] mfd: airoha_gpio_sysctl_probe() uses PLATFORM_DEVID_NONE instead
  of AUTO
- [Low] mfd: commit subject omits driver prefix and capitalized
  description
--

commit c0c4caede3d516641ce772c10961adb3a204e79d
Author: John Crispin <john@phrozen.org>

mfd: add Airoha GPIO system controller driver

This commit adds an MFD platform driver for the Airoha AN7589 GPIO system
controller that registers an MFD cell for the PWM controller.

> mfd: add Airoha GPIO system controller driver

[Severity: Low]
MFD commit subjects use the "mfd: <driver>: <Capitalized description>"
format, so this should include the driver prefix and capitalize the
description (e.g. "mfd: airoha-gpio-sysctl: Add Airoha GPIO system
controller driver").

[ ... ]

> diff --git a/drivers/mfd/airoha-gpio-sysctl.c b/drivers/mfd/airoha-gpio-sysctl.c
> new file mode 100644
> index 0000000000000..40b3251200f37
> --- /dev/null
> +++ b/drivers/mfd/airoha-gpio-sysctl.c

[ ... ]

> +static const struct mfd_cell an7589_gpio_sysctl_cells[] = {
> +	MFD_CELL_NAME("airoha-an7589-pwm"),
> +};

[Severity: Low]
Is a dedicated MFD driver needed here when it manages no shared core
resources and registers only a single PWM cell?

In Documentation/devicetree/bindings/mfd/airoha,an7589-gpio-sysctl.yaml,
the node already specifies "syscon" and "simple-mfd" with #pwm-cells = <3>
on the parent node, so simple-mfd populates the pinctrl child and syscon
provides the shared regmap.

MFD is meant for devices registering multiple children across subsystems,
and this wrapper adds a separate MFD_AIROHA_GPIO_SYSCTL Kconfig option
that silently prevents the PWM driver from probing if disabled.  Could the
PWM driver bind directly to airoha,an7589-gpio-sysctl instead?

> +static int airoha_gpio_sysctl_probe(struct platform_device *pdev)
> +{
> +	return devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_NONE,
> +				    an7589_gpio_sysctl_cells,
> +				    ARRAY_SIZE(an7589_gpio_sysctl_cells),
> +				    NULL, 0, NULL);
> +}

[Severity: Low]
Should this pass PLATFORM_DEVID_AUTO instead of PLATFORM_DEVID_NONE?

MFD prefers PLATFORM_DEVID_AUTO unless a subdevice needs explicit
numbering.  PLATFORM_DEVID_NONE assigns a fixed unindexed platform device
name, which would fail with -EEXIST if more than one instance ever probed.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261204193857.3801624-1-john@phrozen.org?part=2

  reply	other threads:[~2026-12-04 19:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 19:38 [PATCH v2 0/3] pwm: airoha: add AN7589 support John Crispin
2026-12-04 19:38 ` [PATCH v2 1/3] dt-bindings: mfd: airoha: add #pwm-cells to AN7589 gpio-sysctl John Crispin
2026-12-04 19:45   ` sashiko-bot
2026-12-04 19:38 ` [PATCH v2 2/3] mfd: add Airoha GPIO system controller driver John Crispin
2026-12-04 19:50   ` sashiko-bot [this message]
2026-12-04 19:38 ` [PATCH v2 3/3] pwm: airoha: add support for AN7589 John Crispin

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-250567@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=john@phrozen.org \
    --cc=lee@kernel.org \
    --cc=mfd@lists.linux.dev \
    --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