From: David Lechner <dlechner@baylibre.com>
To: Conor Dooley <conor@kernel.org>
Cc: Ariana.Lazar@microchip.com, andriy.shevchenko@intel.com,
nuno.sa@analog.com, linux-iio@vger.kernel.org,
devicetree@vger.kernel.org, robh@kernel.org, jic23@kernel.org,
andy@kernel.org, krzk+dt@kernel.org,
linux-kernel@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: iio: dac: add support for Microchip MCP48FEB02
Date: Mon, 16 Feb 2026 12:38:43 -0600 [thread overview]
Message-ID: <623dc31e-cfa9-4cf7-a6ca-5044333e47bb@baylibre.com> (raw)
In-Reply-To: <20260216-shiny-itunes-00a31d1f4db7@spud>
On 2/16/26 11:34 AM, Conor Dooley wrote:
> On Mon, Feb 16, 2026 at 09:37:35AM -0600, David Lechner wrote:
>> On 2/16/26 7:31 AM, Ariana.Lazar@microchip.com wrote:
>>> Hi all,
>>>
>>> Thank you for your reviews.
>>>
>>>
>>> On Thu, 2026-02-12 at 22:04 +0200, Andy Shevchenko wrote:
>>>> EXTERNAL EMAIL: Do not click links or open attachments unless you
>>>> know the content is safe
>>>>
>>>> On Thu, Feb 12, 2026 at 06:00:06PM +0000, Conor Dooley wrote:
>>>>> On Thu, Feb 12, 2026 at 02:48:34PM +0200, Ariana Lazar wrote:
>>>>>> This is the device tree schema for 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.
>>>>>>
>>>>>> Signed-off-by: Ariana Lazar <ariana.lazar@microchip.com>
>>>>>
>>>>> Other than the interface, what's actually different between this
>>>>> and the
>>>>> 47? Could they share the same binding?
>>>>
>>>> If that is the case, I don't think we even need a brand new driver,
>>>> the
>>>> existing one should be refactored to adapt SPI interface.
>>>>
>>>> --
>>>> With Best Regards,
>>>> Andy Shevchenko
>>>>
>>>>
>>>
>>>
>>> I have decided to submit two separate drivers, even though the chips
>>> share similar functionality, in order to make it easier for the client
>>> to identify the supported chips.
>>>
>>> For example the I2C family of devices has: 3 different resolutions,
>>> with 4 different channel numbers available for a particular part and
>>> most important you can get the same part with or without EEPROM.
>>> That means the I2C driver will cover 24 different devices. The SPI
>>> family follows the same pattern, covering another 24 devices.
>>>
>>> Microchip also has some devices (I2C and SPI) with Nonvolatile Memory
>>> (similar to EEPROM but limited to fewer than 32 writes) and I want to
>>> add these families to the existing drivers while maintaining the split
>>> by interface.
>>>
>>> Please tell me if you have anything against this approach (having 2
>>> different drivers split based on interface and each of them to support
>>> at least 24 different part numbers).
>>>
>>> Best regards,
>>> Ariana
>>
>> The usual way we support parts with the same register map that can have
>> an I2C or a SPI bus it to make three modules: <name>_core.c, <name>_i2c.c
>> and <name>_spi.c. If you look through the iio folders, you will see many
>> drivers like this.
>>
>> The _i2c.c and _spi.c files will just contain the chip info tables that
>> contain all of the differences between the chips and pass that to a
>> common probe function in the _core.c module.
>>
>> It seems like this approach should work in your case as well.
>
> These usually have merged bindings too, right? Only real difference is
> going to be that the spi devices will need
> spi-peripheral-properties.yaml which obviously the i2c ones wont.
Correct.
next prev parent reply other threads:[~2026-02-16 18:38 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-12 12:48 [PATCH 0/2] Add support for Microchip MCP48FxBy1/2/4/8 DAC with an SPI Interface Ariana Lazar
2026-02-12 12:48 ` [PATCH 1/2] dt-bindings: iio: dac: add support for Microchip MCP48FEB02 Ariana Lazar
2026-02-12 17:31 ` Rob Herring (Arm)
2026-02-12 18:00 ` Conor Dooley
2026-02-12 20:04 ` Andy Shevchenko
2026-02-16 13:31 ` Ariana.Lazar
2026-02-16 15:37 ` David Lechner
2026-02-16 17:34 ` Conor Dooley
2026-02-16 18:38 ` David Lechner [this message]
2026-02-12 12:48 ` [PATCH 2/2] " Ariana Lazar
2026-02-12 14:42 ` Andy Shevchenko
2026-02-16 14:29 ` Ariana.Lazar
2026-02-17 7:54 ` Andy Shevchenko
2026-02-17 11:38 ` Ariana.Lazar
2026-02-17 12:12 ` Andy Shevchenko
2026-02-15 17:58 ` Jonathan Cameron
2026-04-24 8:01 ` Ariana.Lazar
2026-04-24 10:19 ` Jonathan Cameron
2026-04-24 13:30 ` Ariana.Lazar
2026-04-24 16:48 ` Jonathan Cameron
2026-02-12 13:39 ` [PATCH 0/2] Add support for Microchip MCP48FxBy1/2/4/8 DAC with an SPI Interface Andy Shevchenko
2026-02-12 17:58 ` Conor Dooley
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=623dc31e-cfa9-4cf7-a6ca-5044333e47bb@baylibre.com \
--to=dlechner@baylibre.com \
--cc=Ariana.Lazar@microchip.com \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=conor@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
/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