Re: [PATCH v5 10/10] iio: dac: add support for Microchip MCP48FEB02

From: Andy Shevchenko

Date: Thu Sep 10 2026 - 02:19:02 EST


On Wed, Sep 09, 2026 at 05:18:53PM +0300, Ariana Lazar wrote:
> This is the IIO driver for Microchip MCP48FxBy1/2/4/8 series of buffered
> voltage output Digital-to-Analog Converters with nonvolatile or volatile
> memory and an SPI Interface.
>
> The families support up to 8 output channels.
>
> The devices can be 8-bit, 10-bit and 12-bit.

...

> +static int mcp47feb02_spi_probe(struct spi_device *spi)
> +{
> + const struct mcp47feb02_features *chip_features;
> + struct device *dev = &spi->dev;
> + struct regmap *regmap;
> +
> + chip_features = spi_get_device_match_data(spi);
> + if (!chip_features)
> + return dev_err_probe(dev, -ENODEV, "No SPI device found\n");

-ENODATA and fix the message accordingly.

> + if (chip_features->have_eeprom)
> + regmap = devm_regmap_init_spi(spi, &mcp47feb02_regmap_config);
> + else
> + regmap = devm_regmap_init_spi(spi, &mcp47fvb02_regmap_config);
> +
> + if (IS_ERR(regmap))
> + return dev_err_probe(dev, PTR_ERR(regmap), "Error initializing SPI regmap\n");
> +
> + return mcp47feb02_common_probe(chip_features, regmap);
> +}

--
With Best Regards,
Andy Shevchenko