Re: [PATCH] sh: ecovec24: Make SPI mode explicit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Adrian,

On Fri, 2 May 2025 at 13:18, John Paul Adrian Glaubitz
<glaubitz@xxxxxxxxxxxxxxxxxxx> wrote:
> On Fri, 2025-05-02 at 13:13 +0200, Geert Uytterhoeven wrote:
> > Commit cf9e4784f3bde3e4 ("spi: sh-msiof: Add slave mode support") added
> > a new mode member to the sh_msiof_spi_info structure, but did not update
> > any board files.  Hence all users in board files rely on the default
> > being host mode.
> >
> > Make this unambiguous by configuring host mode explicitly.
> >
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> > ---
> >  arch/sh/boards/mach-ecovec24/setup.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
> > index 6f13557eecd6bb21..a641e26f8fdf7369 100644
> > --- a/arch/sh/boards/mach-ecovec24/setup.c
> > +++ b/arch/sh/boards/mach-ecovec24/setup.c
> > @@ -825,6 +825,7 @@ static struct spi_board_info spi_bus[] = {
> >  /* MSIOF0 */
> >  static struct sh_msiof_spi_info msiof0_data = {
> >       .num_chipselect = 1,
> > +     .mode = MSIOF_SPI_HOST,
> >  };
> >
> >  static struct resource msiof0_resources[] = {
>
> Is MSIOF_SPI_HOST actually the correct identifier?
>
> I'm asking because the commit above lists only MISOF_SPI_MASTER and _SLAVE:
>
> enum {
>         MSIOF_SPI_MASTER,
>         MSIOF_SPI_SLAVE,
> };
>
> Unless the identifiers were renamed a few years later to avoid political issues.

They were indeed renamed in commit 1cb3ebc417fe6cc5 ("spi:
sh-msiof: switch to use modern name") in v6.6.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux