Re: [PATCH v5 08/10] iio: dac: mcp47feb02: refactor MCP47FEB02 I2C driver into two modules

From: Jonathan Cameron

Date: Sun Sep 13 2026 - 17:51:22 EST


On Wed, 9 Sep 2026 17:18:51 +0300
Ariana Lazar <ariana.lazar@xxxxxxxxxxxxx> wrote:

> Prepare the driver for the bus-specific code by refactoring into separate
> files. The renamed file will contain the common DAC functionality shared by
> the MCP47FxBy1/2/4/8 I2C and MCP48FxBy1/2/4/8 SPI drivers. The MCP47FEB02
> driver was refactored into two modules: mcp47feb02-core.c and
> mcp47feb02-i2c.c in order to prepare the support for SPI MCP48FxBy1/2/4/8
> DAC family on top of the current implementation.
>
> Signed-off-by: Ariana Lazar <ariana.lazar@xxxxxxxxxxxxx>

One thing inline.

> 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 fb66bd2664a9e6dd938eacc90547403041e258a4..4ef64a3408033501c724c7c52fd20686cc53722a 100644
> --- a/drivers/iio/dac/mcp47feb02.c
> +++ b/drivers/iio/dac/mcp47feb02-core.c
> @@ -1,8 +1,8 @@
> // SPDX-License-Identifier: GPL-2.0+
> /*
> - * IIO driver for MCP47FEB02 Multi-Channel DAC with I2C interface
> + * IIO driver for MCP47FEB02 Multi-Channel DAC with I2C and SPI interface
> *
> - * Copyright (C) 2025 Microchip Technology Inc. and its subsidiaries
> + * Copyright (C) 2025-2026 Microchip Technology Inc. and its subsidiaries
> *
> * Author: Ariana Lazar <ariana.lazar@xxxxxxxxxxxxx>
> *
> @@ -16,12 +16,10 @@
> #include <linux/bitfield.h>
> #include <linux/delay.h>
> #include <linux/err.h>
> -#include <linux/i2c.h>
> #include <linux/iio/iio.h>
> #include <linux/iio/sysfs.h>
> #include <linux/kstrtox.h>
> #include <linux/module.h>
> -#include <linux/mod_devicetable.h>
This surprised me because I thought this was no longer included
from any drivers using i2c. Indeed it is gone since :
995832b2cebe "(Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files)")

Hence please rebase on 7.3-rc1. I don't think we have anything
more recent that touches this driver and a mainline rc is an
easy base to deal with.


> #include <linux/mutex.h>
> #include <linux/property.h>
> #include <linux/regmap.h>
> @@ -30,6 +28,8 @@
> #include <linux/types.h>
> #include <linux/units.h>
>
> +#include "mcp47feb02.h"