mtd: spi-nor: Prepare the introduction of a new locking mechanism
authorMiquel Raynal <miquel.raynal@bootlin.com>
Tue, 28 Mar 2023 15:41:02 +0000 (17:41 +0200)
committerTudor Ambarus <tudor.ambarus@linaro.org>
Wed, 29 Mar 2023 10:46:07 +0000 (13:46 +0300)
commite96d4605b024495d42279ae8e899969b29f7ce5f
tree30fa109c081f4df05b4ebd7c5c4081386d335b3a
parentc154dbd28003d8fcc857d88596b2f0383617d1e7
mtd: spi-nor: Prepare the introduction of a new locking mechanism

This commit alone just introduces two new "prepare and lock" pairs of
helpers which do the exact same thing as before. They will soon be
improved in a followup commit which actually brings the logic, but I
figured out it was more readable to do it this way.

One new pair is suffixed _pe which stands for "program and erase" and
hence is being called by spi_nor_write() and spi_nor_erase().

The other pair is suffixed _rd which stands for "read" and hence is
being called by spi_nor_read().

One note however, these extra helpers will need to know the operation
range, so they come with two new parameters to define it. Otherwise
there is no functional change.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/r/20230328154105.448540-6-miquel.raynal@bootlin.com
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
drivers/mtd/spi-nor/core.c