From: sashiko-bot@kernel.org
To: "Ariana Lazar" <ariana.lazar@microchip.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v7 09/11] iio: dac: mcp47feb02: refactor MCP47FEB02 I2C driver into two modules
Date: Fri, 18 Sep 2026 09:28:11 +0000 [thread overview]
Message-ID: <20260918092811.ACEB21F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260918-mcp47feb02_refactor-v7-9-82ca794eafe2@microchip.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] kbuild: Kconfig backward compatibility breakage during module split
- [Low] iio: dac: mcp47feb02: PM operations exported outside driver namespace
--
commit 8ebb6f8ca4b9fbd374359f689f69be2c855ffca3
Author: Ariana Lazar <ariana.lazar@microchip.com>
iio: dac: mcp47feb02: refactor MCP47FEB02 I2C driver into two modules
This commit prepares the MCP47FEB02 driver for bus-specific code by
refactoring it into separate core and I2C files. It creates a shared
core module to support upcoming SPI parts and renames Kconfig and file
structures accordingly.
> diff --git a/drivers/iio/dac/Kconfig b/drivers/iio/dac/Kconfig
> index 3b3c77d8b3e1b..c99c32b229fb6 100644
> --- a/drivers/iio/dac/Kconfig
> +++ b/drivers/iio/dac/Kconfig
> @@ -593,9 +593,13 @@ config MCP47A1
> will be called mcp47a1.
>
> config MCP47FEB02
> - tristate "MCP47F(E/V)B01/02/04/08/11/12/14/18/21/22/24/28 DAC driver"
> + tristate
> +
> +config MCP47FEB02_I2C
> + tristate "MCP47F(E/V)B01/02/04/08/11/12/14/18/21/22/24/28 I2C DAC driver"
[Severity: Medium]
Does renaming the user-visible Kconfig prompt break backward compatibility
during kernel upgrades?
When users upgrade their kernels using make oldconfig or make olddefconfig,
their existing CONFIG_MCP47FEB02 setting will be discarded because it lacks
a prompt. The new CONFIG_MCP47FEB02_I2C defaults to 'n', resulting in the
driver being silently disabled on existing configurations.
Is it possible to keep the original config name for the user-visible option
and create a new hidden config (e.g., CONFIG_MCP47FEB02_CORE) for the
shared code to ensure seamless upgrades?
[ ... ]
> diff --git a/drivers/iio/dac/mcp47feb02.c b/drivers/iio/dac/mcp47feb02-core.c
> similarity index 73%
> rename from drivers/iio/dac/mcp47feb02.c
> rename to drivers/iio/dac/mcp47feb02-core.c
> index 7312c2c96141e..91fad42df2168 100644
> --- a/drivers/iio/dac/mcp47feb02.c
> +++ b/drivers/iio/dac/mcp47feb02-core.c
[ ... ]
> @@ -668,7 +461,7 @@ static ssize_t mcp47feb02_write_powerdown(struct iio_dev *indio_dev, uintptr_t p
> return len;
> }
>
> -static DEFINE_SIMPLE_DEV_PM_OPS(mcp47feb02_pm_ops, mcp47feb02_suspend, mcp47feb02_resume);
> +EXPORT_SIMPLE_DEV_PM_OPS(mcp47feb02_pm_ops, mcp47feb02_suspend, mcp47feb02_resume);
[Severity: Low]
Does this macro export the PM ops symbol without the intended IIO_MCP47FEB02
namespace?
The driver establishes a dedicated namespace IIO_MCP47FEB02 for its core
exported symbols, but mcp47feb02_pm_ops is exported using
EXPORT_SIMPLE_DEV_PM_OPS, which places it into the global namespace.
Should this use EXPORT_NS_SIMPLE_DEV_PM_OPS(mcp47feb02_pm_ops,
mcp47feb02_suspend, mcp47feb02_resume, IIO_MCP47FEB02) instead to
maintain namespace encapsulation?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260918-mcp47feb02_refactor-v7-0-82ca794eafe2@microchip.com?part=9
next prev parent reply other threads:[~2026-09-18 9:28 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-18 9:06 [PATCH v7 00/11] Refactor Microchip MCP47FEB02 I2C driver in separate modules to add support for MCP48FEB02 SPI driver Ariana Lazar
2026-09-18 9:06 ` [PATCH v7 01/11] iio: dac: mcp47feb02: initialize dac_data field in channel data struct at probe Ariana Lazar
2026-09-18 9:48 ` Andy Shevchenko
2026-09-18 9:06 ` [PATCH v7 02/11] iio: dac: mcp47feb02: Fix gain field initialization for active channels Ariana Lazar
2026-09-18 9:48 ` Andy Shevchenko
2026-09-18 9:06 ` [PATCH v7 03/11] iio: dac: mcp47feb02: use field_get() instead of custom dynamic macros Ariana Lazar
2026-09-18 9:17 ` sashiko-bot
2026-09-18 9:46 ` Andy Shevchenko
2026-09-20 18:44 ` Jonathan Cameron
2026-09-18 9:06 ` [PATCH v7 04/11] iio: dac: mcp47feb02: Return len when disabling EEPROM store Ariana Lazar
2026-09-18 9:49 ` Andy Shevchenko
2026-09-18 9:06 ` [PATCH v7 05/11] iio: dac: mcp47feb02: Increase EEPROM Programming Write Cycle Time Ariana Lazar
2026-09-18 9:49 ` Andy Shevchenko
2026-09-18 9:06 ` [PATCH v7 06/11] iio: dac: mcp47feb02: Avoid unjustified probe error on missing label Ariana Lazar
2026-09-18 9:22 ` sashiko-bot
2026-09-18 9:50 ` Andy Shevchenko
2026-09-20 22:52 ` Jonathan Cameron
2026-09-18 9:06 ` [PATCH v7 07/11] iio: dac: mcp47feb02: correct typo from a comment Ariana Lazar
2026-09-18 9:51 ` Andy Shevchenko
2026-09-18 9:06 ` [PATCH v7 08/11] iio: dac: mcp47feb02: use field_prep() instead of custom dynamic macros Ariana Lazar
2026-09-18 9:06 ` [PATCH v7 09/11] iio: dac: mcp47feb02: refactor MCP47FEB02 I2C driver into two modules Ariana Lazar
2026-09-18 9:28 ` sashiko-bot [this message]
2026-09-20 22:52 ` Jonathan Cameron
2026-09-18 9:06 ` [PATCH v7 10/11] dt-bindings: iio: dac: add support for MCP48FEB02 SPI Ariana Lazar
2026-09-18 9:06 ` [PATCH v7 11/11] iio: dac: add support for Microchip MCP48FEB02 Ariana Lazar
2026-09-18 9:52 ` [PATCH v7 00/11] Refactor Microchip MCP47FEB02 I2C driver in separate modules to add support for MCP48FEB02 SPI driver Andy Shevchenko
2026-09-20 23:08 ` Jonathan Cameron
2026-09-21 14:16 ` Ariana.Lazar
2026-09-21 23:56 ` Jonathan Cameron
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=20260918092811.ACEB21F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=ariana.lazar@microchip.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.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