Re: [PATCH v3 01/17] spi: spi-mem: Add DTR templates for cmd, address, dummy and data phase

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

 



On 1/4/22 5:31 PM, Boris Brezillon wrote:
> -#define SPI_MEM_OP_DATA_IN(__nbytes, __buf, __buswidth)                \
> +#define SPI_MEM_OP_DATA_IN(__nbytes, __buf, __buswidth, ...)   \
>         {                                                       \
>                 .dir = SPI_MEM_DATA_IN,                         \
>                 .nbytes = __nbytes,                             \
>                 .buf.in = __buf,                                \
>                 .buswidth = __buswidth,                         \
> +               __VA_ARGS__                                     \
>         }
> 
> -#define SPI_MEM_OP_DATA_OUT(__nbytes, __buf, __buswidth)       \
> +#define SPI_MEM_OP_DATA_OUT(__nbytes, __buf, __buswidth, ...)  \
>         {                                                       \
>                 .dir = SPI_MEM_DATA_OUT,                        \
>                 .nbytes = __nbytes,                             \
>                 .buf.out = __buf,                               \
>                 .buswidth = __buswidth,                         \
> +               __VA_ARGS__                                   

I like it too. This also comes in handy when we'll have to differentiate
between register and memory accesses.

Cheers,
ta




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux