[PATCH 2/2] mtd: spi-nor: Rename spi_nor_spimem_check_op()
Tudor Ambarus
tudor.ambarus at linaro.org
Tue Mar 17 04:39:36 PDT 2026
On 3/17/26 11:33 AM, Miquel Raynal wrote:
>
>>> -static int spi_nor_spimem_check_op(struct spi_nor *nor,
>>> - struct spi_mem_op *op)
>>> +static int spi_nor_spimem_check_page_op(struct spi_nor *nor,
>>> + struct spi_mem_op *op)
>>
>> page is a bit misleading as it can indicate it's used just for page
>> programs. We need to focus on operations that need address bytes,
>> reads, pp, page scrub, erase, write/read any register, etc.
>
> This helper is only used for reads and page programs. The point is
> to not use it when reading/writing registers.
>
you're right, it comes from hwcaps, where we verify the reads and pp.
> What about spi_nor_spimem_check_io_op() ? or _iorw_op() ?
spi_nor_spimem_check_hwcaps_op?
IO is involved with read/write any reg.
rw may work, but it can be applied to registers too.
or maybe spi_nor_spimem_check_read_pp_op?
I'm sure you'll choose the best, go ahead with what works for you.
Cheers,
ta
More information about the linux-mtd
mailing list