Re: [PATCH 2/5] drivers: spi: spidev: add compatible for arduino spi mcu interface
From: Conor Dooley
Date: Tue Nov 11 2025 - 12:54:21 EST
On Tue, Nov 11, 2025 at 02:33:09PM +0100, Riccardo Mereu Linux Kernel wrote:
> On Fri, Nov 7, 2025 at 8:13 AM Krzysztof Kozlowski <krzk@xxxxxxxxxx> wrote:
> >
> > > ---
> > > drivers/spi/spidev.c | 2 ++
> > > 1 file changed, 2 insertions(+)
> > >
> > > diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
> > > index 5300c942a2a4..f0dd516c2083 100644
> > > --- a/drivers/spi/spidev.c
> > > +++ b/drivers/spi/spidev.c
> > > @@ -704,6 +704,7 @@ static const struct class spidev_class = {
> > > */
> > > static const struct spi_device_id spidev_spi_ids[] = {
> > > { .name = /* abb */ "spi-sensor" },
> > > + { .name = /* arduino */ "mcu" },
> > > { .name = /* cisco */ "spi-petra" },
> > > { .name = /* dh */ "dhcom-board" },
> > > { .name = /* elgin */ "jg10309-01" },
> > > @@ -737,6 +738,7 @@ static int spidev_of_check(struct device *dev)
> > >
> > > static const struct of_device_id spidev_dt_ids[] = {
> > > { .compatible = "abb,spi-sensor", .data = &spidev_of_check },
> > > + { .compatible = "arduino,mcu", .data = &spidev_of_check },
> >
> > That's way too generic, IMO. First, I am not aware of Arduino boards
> > mounted on top of regular development boards, so basically you are not
> > describing actual hardware setup but what could be potentially plugged
> > into box with Linux... and then it is like saying "you can plug
> > anything" because MCU covers everything, like calling it "Raspberry
> > Pi-clone".
>
> This is used to describe one of the interfaces between the
> microcontroller and the microprocessor on the Arduino UnoQ board.
> Since this could be used in other layouts in the future, we thought to
> keep it generic enough to reuse it.
If it is generic enough to reuse in the future, you can have a fallback
compatible. If it isn't used again with the exact same interface,
congrats you have avoided confusing compatible naming!
> If this isn't possible, do you have any suggestions?
arduino,unoq-mcu?
Then in the future if the duoq board comes along you can do
compatible = "arduino,duoq-mcu", "arduino,unoq-mcu";
btw, thanks for actually introducing a compatible for this, and not
pretending that you have rohm dac that doesn't even exist like a lot of
people :)
Cheers,
Conor.
Attachment:
signature.asc
Description: PGP signature