From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oa1-f51.google.com (mail-oa1-f51.google.com [209.85.160.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D3E0245031 for ; Sat, 4 Apr 2026 13:49:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775310601; cv=none; b=SItQUcQZISVivvoWouApMTtNmexPcoA79W5r8kqLTQ/feDXEk5GEcRTlWFspoWEP5RPYMCoNDrdDQ0RAUtj9kpLk+MDF/3rRgpFDk6QEejhnZpk9taC718AP//5Yn4o+O/g5NyYWoK5WiEuqxA6eoJHvmH6QK/JaF0AATpVj1lY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775310601; c=relaxed/simple; bh=ZRPIOngPQqPu5nK5SdxVdEth9J3ofsOv3/LQED0NPug=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=XxqtnL+SG1kR+dyRhzlytvzGb7heo7J9xoFO/O4t4UW/c6dYTFTv3i/grTsfcrR+Omn4SDAwo4Q8Lo49iTFvDv8hc5hXNoHBY2ej2zoGwQmiy1GZ6aURberPFpzEWA/r5d1HdSbHNBZlXQd6B16W30FAgTLLNU2Ba/rk4cWmXFY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20251104.gappssmtp.com header.i=@baylibre-com.20251104.gappssmtp.com header.b=ZMfPlG9G; arc=none smtp.client-ip=209.85.160.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20251104.gappssmtp.com header.i=@baylibre-com.20251104.gappssmtp.com header.b="ZMfPlG9G" Received: by mail-oa1-f51.google.com with SMTP id 586e51a60fabf-42306f82341so1212716fac.2 for ; Sat, 04 Apr 2026 06:49:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20251104.gappssmtp.com; s=20251104; t=1775310597; x=1775915397; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=6M9b8o09OMGhGzqfrb7bU4Z45lKmeNQHUj4rfqjUhME=; b=ZMfPlG9GXWS6x9AhykwYqWS/pHr2hkb8fzOebEXFqf0cYmSofSkskdRDqzK9Uxbqmf V/9GG2Hd7dkukKyKAdSkScTz8ejQkbUCHgroYaJuySbix66HXV8Z7stMGd7zNd6FzW9K TVyG/WjDxXotCtfZYNvqsRgRyzpWoOhChBkp7XkTfUiOyRkNEyNjd+S/yMEfIa/Sk7Zl km3moA/Vh3kav31TtT4qyFt6gXXOtZGpxEzG0zJmiAsx6ixqP2ZiDQ9wewi/KGIGsIjs ItI73+7CpU3fbjfiA4qE7F17b9D2FPwToj0gDXqZy4JSbcTzPPF2AVmS0SfywAk3ahbv 1CuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775310597; x=1775915397; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6M9b8o09OMGhGzqfrb7bU4Z45lKmeNQHUj4rfqjUhME=; b=JAe5RSBjez+UIbsTHcGhLH1FqR1mhu5gMGNMeHxweTt2j/CtesEdAC0/Mj3R/7lYB3 pCkg4ybIh/hsdPRvf8Q9MMD5P/j00ApSdeaEoY4yzke20GB0e8cfujss9lQpa9BNaSpc De+dVZ3h3NlX1lTnc05TV1to/XaeuqEiVW8HZPEtoFuhQPGENAO1r+/BH59MFz4NRVaY DWmpqrFe3w2EPEcGKPdn28McfMyOp2fMwLfWolNNdlIijRo8v8Tah4G7LRXB9k22tHbs 7f2xH2pzFMgMBr6dkqMGMJbVCV5wdXTghwRSPTYjOvuLyJPwJibIxSqZfALU9K0oJmTT 7u+w== X-Forwarded-Encrypted: i=1; AJvYcCVlZ6FpuMnlmoDFCJrAXpBKYjcf2snym8cRAYHyaWOYk0Tg1rSuqRDfVBxHZDPO1fFneH2o1Y43VRtC/tw=@vger.kernel.org X-Gm-Message-State: AOJu0YyzznNdlcjs6JPEGty0TYWe1BbYcCQRZ+w99tf55S5swGFtrexU gyOcqEySzgjODm1jkxQlXiGTeGDV0CcE0ec1XCxdCILnAg7rDSK8hxanqswW4emHaUO4irLvhbd mRvBi X-Gm-Gg: AeBDiesK09QXPsSdybFQBsjifPvezlpQC3f6793ANF3p7rEf88hor/r6MEVCb1mQ2qv eIe3U3WTswY7lQhul2FSwOH3IRdA1EMBJyfrs2C7FIq7VT9ISK1YbsNJL2pDFMDeia7fMVitwgz d30+MC8V2LhwT0Kr6q3LZJ/77vgiRrLzEf1KdFrQA5fo3aNT2pct2bEjvnzK8ifbQvBiyc1LEKP a1HHlxBU1fEX2M2Sd73IHzm7o3riW8wm2BO9JrwoaqEt3L1sNGPB64kHsVb6eVGUqdr/ZNQfZe0 60ezLSq7L//44fyyf9fjKSuzt7/PaytkJG2ySJQ+NSt8DZoAt8/UnJRCna8w3gXBvJs4rokNTHi nnhuIP242xYpIFBN55Tq7Q8rIe7852YwgrCHQ5TgoThdbS7XE8W5t8axKGZOuN0bumtXpw2hlRd ZY2Y4RcCR2mPGfZfDCOGtU7o3VdVEfZaUdBYVH6D1/DRdiDhrCaEXgYNYz0R9kGVxjQKuF6qm4e Q== X-Received: by 2002:a05:6870:b1c1:b0:3f1:6d93:4386 with SMTP id 586e51a60fabf-4230fc7bed0mr3574752fac.1.1775310597071; Sat, 04 Apr 2026 06:49:57 -0700 (PDT) Received: from ?IPV6:2600:8803:e7e4:500:e14e:bcc6:3f95:26eb? ([2600:8803:e7e4:500:e14e:bcc6:3f95:26eb]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-422eb42db1bsm7906203fac.17.2026.04.04.06.49.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 04 Apr 2026 06:49:56 -0700 (PDT) Message-ID: <1e05b8f9-e95e-458d-9179-ac8268023ae5@baylibre.com> Date: Sat, 4 Apr 2026 08:49:55 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] iio: dac: mcp47feb02: add MCP48FEB02 SPI driver to MCP47FEB02 I2C driver To: Ariana Lazar , Jonathan Cameron , =?UTF-8?Q?Nuno_S=C3=A1?= , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Jonathan Cameron , Conor Dooley , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260403-mcp47feb02-fix2-v1-0-da60c773550e@microchip.com> <20260403-mcp47feb02-fix2-v1-2-da60c773550e@microchip.com> Content-Language: en-US From: David Lechner In-Reply-To: <20260403-mcp47feb02-fix2-v1-2-da60c773550e@microchip.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 4/3/26 5:50 AM, 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 on top of MCP47FEB02. The families support up to 8 > output channels and have 8-bit, 10-bit or 12-bit resolution. > > The MCP47FEB02 driver was split into three modules: mcp47feb02-core.c, > mcp47feb02-i2c.c and mcp47feb02-spi.c in order to support both DAC families > - I2C (MCP47F(E/V)BXX) and SPI (MCP48F(E/V)BXX). > > Fixes: bf394cc80369 ("iio: dac: adding support for Microchip MCP47FEB02") > Signed-off-by: Ariana Lazar > Link: https://lore.kernel.org/all/aY4yaVP2TQFRI1E4@smile.fi.intel.com/ > --- > MAINTAINERS | 4 + > drivers/iio/dac/Kconfig | 29 +- > drivers/iio/dac/Makefile | 3 + > drivers/iio/dac/mcp47feb02-core.c | 845 ++++++++++++++++++++++++++++++++++++++ > drivers/iio/dac/mcp47feb02-i2c.c | 145 +++++++ > drivers/iio/dac/mcp47feb02-spi.c | 145 +++++++ > drivers/iio/dac/mcp47feb02.h | 158 +++++++ > 7 files changed, 1328 insertions(+), 1 deletion(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 5997cf04b0732beaf69ac78cb762c42c56e4fcd6..af747c5449681807d3d74014dc11dffea5acc012 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -15850,6 +15850,10 @@ M: Ariana Lazar > L: linux-iio@vger.kernel.org > S: Supported > F: Documentation/devicetree/bindings/iio/dac/microchip,mcp47feb02.yaml > +F: drivers/iio/dac/mcp47feb02-core.c > +F: drivers/iio/dac/mcp47feb02-i2c.c > +F: drivers/iio/dac/mcp47feb02-spi.c > +F: drivers/iio/dac/mcp47feb02.h > > MCP4821 DAC DRIVER > M: Anshul Dalal > diff --git a/drivers/iio/dac/Kconfig b/drivers/iio/dac/Kconfig > index cd4870b654153e91c3c44860be43d231ee3b5519..5bec52552d263532ffe357666a64a1c6bb968d85 100644 > --- a/drivers/iio/dac/Kconfig > +++ b/drivers/iio/dac/Kconfig > @@ -539,8 +539,12 @@ config MCP4728 > will be called mcp4728. > > config MCP47FEB02 > + tristate > + > +config MCP47FEB02_I2C > tristate "MCP47F(E/V)B01/02/04/08/11/12/14/18/21/22/24/28 DAC driver" > depends on I2C > + select MCP47FEB02 > help > Say yes here if you want to build the driver for the Microchip: > - 8-bit DAC: > @@ -556,7 +560,30 @@ config MCP47FEB02 > (DAC) with I2C interface. > > To compile this driver as a module, choose M here: the module > - will be called mcp47feb02. > + will be called mcp47feb02_i2c and you will also get > + mcp47feb02_core for the core module. > + > +config MCP47FEB02_SPI > + tristate "MCP48F(E/V)B01/02/04/08/11/12/14/18/21/22/24/28 DAC driver" > + depends on SPI > + select MCP47FEB02 > + help > + Say yes here if you want to build the driver for the Microchip: > + - 8-bit DAC: > + MCP48FEB01, MCP48FEB02, MCP48FEB04, MCP48FEB08, > + MCP48FVB01, MCP48FVB02, MCP48FVB04, MCP48FVB08 > + - 10-bit DAC: > + MCP48FEB11, MCP48FEB12, MCP48FEB14, MCP48FEB18, > + MCP48FVB11, MCP48FVB12, MCP48FVB14, MCP48FVB18 > + - 12-bit DAC: > + MCP48FEB21, MCP48FEB22, MCP48FEB24, MCP48FEB28, > + MCP48FVB21, MCP48FVB22, MCP48FVB24, MCP48FVB28 > + having 1 to 8 channels, 8/10/12-bit digital-to-analog converter > + (DAC) with SPI interface. > + > + To compile this driver as a module, choose M here: the module > + will be called mcp47feb02_spi and you will also get > + mcp47feb02_core for the core module. > > config MCP4821 > tristate "MCP4801/02/11/12/21/22 DAC driver" > diff --git a/drivers/iio/dac/Makefile b/drivers/iio/dac/Makefile > index 2a80bbf4e80ad557da79ed916027cedff286984b..d2a2279b15499e1b43ed0e3e1f180b5b1ff72785 100644 > --- a/drivers/iio/dac/Makefile > +++ b/drivers/iio/dac/Makefile > @@ -54,6 +54,9 @@ obj-$(CONFIG_MAX5821) += max5821.o > obj-$(CONFIG_MCP4725) += mcp4725.o > obj-$(CONFIG_MCP4728) += mcp4728.o > obj-$(CONFIG_MCP47FEB02) += mcp47feb02.o Shouldn't we be removing this old file? The patch series would be eaiser to understand if it was split into one commit to split the existing driver into two files and then another commit to add support for the new parts. > +mcp47feb02-objs := mcp47feb02-core.o > +obj-$(CONFIG_MCP47FEB02_I2C) += mcp47feb02-i2c.o > +obj-$(CONFIG_MCP47FEB02_SPI) += mcp47feb02-spi.o > obj-$(CONFIG_MCP4821) += mcp4821.o > obj-$(CONFIG_MCP4922) += mcp4922.o > obj-$(CONFIG_STM32_DAC_CORE) += stm32-dac-core.o