Re: [PATCH 02/21] mtd: spinand: Use more specific naming for the write enable/disable op
From: Miquel Raynal
Date: Fri Mar 07 2025 - 10:50:00 EST
On 07/03/2025 at 15:39:43 GMT, Tudor Ambarus <tudor.ambarus@xxxxxxxxxx> wrote:
> On 3/7/25 3:08 PM, Miquel Raynal wrote:
>> -#define SPINAND_WR_EN_DIS_OP(enable) \
>> +#define SPINAND_WR_EN_DIS_1S_0_0_OP(enable) \
>> SPI_MEM_OP(SPI_MEM_OP_CMD((enable) ? 0x06 : 0x04, 1), \
>> SPI_MEM_OP_NO_ADDR, \
>> SPI_MEM_OP_NO_DUMMY, \
>
> here too, I lean towards keeping the name as it was, but maybe others
> can jump in.
These are indeed the three commands with just a command cycle. But then
we have eg. page data reads which have no data: 1s-1s-0 (or 8d-8d-0)
makes sense to me because it is clear that there is no data cycle. Or
even worse, a read ID instruction can be 1s-0-1s (or, again,
8d-0-8d). Removing the 0 in the middle would definitely not make sense,
and to keep something clear I would actually prefer to keep these three
members for clarity, even though in this case they will remain 0.