All of lore.kernel.org
 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 2/3] mfd: add Airoha GPIO system controller driver
Date: Tue, 01 Dec 2026 19:52:28 +0000	[thread overview]
Message-ID: <sashiko-outbox-244127@kernel.org> (raw)
In-Reply-To: <20261201194434.3132187-3-john@phrozen.org>

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

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

mfd: add Airoha GPIO system controller driver

This commit adds an MFD driver for the Airoha AN7589 GPIO system controller to
register its PWM controller as an MFD cell.

> mfd: add Airoha GPIO system controller driver

[Severity: Low]
This isn't a bug, but MFD commit subjects use the format "mfd: <driver>:
<Capitalized description>", such as "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..b1cd312dffd92
> --- /dev/null
> +++ b/drivers/mfd/airoha-gpio-sysctl.c
> @@ -0,0 +1,43 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Airoha GPIO system controller
> + *
> + * Copyright (C) 2026 John Crispin <john@phrozen.org>
> + */
> +
> +#include <linux/array_size.h>
> +#include <linux/mfd/core.h>
> +#include <linux/mod_devicetable.h>
> +#include <linux/module.h>
> +#include <linux/platform_device.h>
> +
> +static const struct mfd_cell an7589_gpio_sysctl_cells[] = {
> +	MFD_CELL_NAME("airoha-an7589-pwm"),
> +};

[Severity: Low]
Is a dedicated MFD driver appropriate here when it only registers a single
mfd_cell?

In Documentation/devicetree/bindings/mfd/airoha,an7589-gpio-sysctl.yaml, the
node includes "syscon" and "simple-mfd", so the DT pinctrl child is already
populated by simple-mfd and the regmap is provided by syscon.  This driver
manages no shared resources and only instantiates airoha-an7589-pwm, whereas
the MFD subsystem is meant for drivers registering multiple child devices
across subsystems.

> +
> +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]
This isn't a bug, but MFD drivers prefer PLATFORM_DEVID_AUTO over
PLATFORM_DEVID_NONE when registering cells unless explicit numbering is
needed.

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

  reply	other threads:[~2026-12-01 19:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01 19:44 [PATCH 0/3] pwm: airoha: add AN7589 support John Crispin
2026-12-01 19:44 ` [PATCH 1/3] dt-bindings: mfd: airoha: add #pwm-cells to AN7589 gpio-sysctl John Crispin
2026-12-01 19:44 ` [PATCH 2/3] mfd: add Airoha GPIO system controller driver John Crispin
2026-12-01 19:52   ` sashiko-bot [this message]
2026-12-01 19:44 ` [PATCH 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-244127@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 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.