[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <57e25816-40bf-e7cb-89d6-3bad9e48d6e2@microchip.com>
Date: Wed, 5 Jan 2022 08:24:09 +0000
From: <Tudor.Ambarus@...rochip.com>
To: <boris.brezillon@...labora.com>, <a-nandan@...com>
CC: <miquel.raynal@...tlin.com>, <richard@....at>, <vigneshr@...com>,
<broonie@...nel.org>, <patrice.chotard@...s.st.com>,
<christophe.kerello@...s.st.com>, <daniel@...f.com>,
<alobakin@...me>, <linux-mtd@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <linux-spi@...r.kernel.org>,
<p.yadav@...com>
Subject: Re: [PATCH v3 01/17] spi: spi-mem: Add DTR templates for cmd,
address, dummy and data phase
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
Powered by blists - more mailing lists