diff options
Diffstat (limited to 'drivers/mtd/spi/spi_flash_internal.h')
-rw-r--r-- | drivers/mtd/spi/spi_flash_internal.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/mtd/spi/spi_flash_internal.h b/drivers/mtd/spi/spi_flash_internal.h index f80f71771c..91e036a4e7 100644 --- a/drivers/mtd/spi/spi_flash_internal.h +++ b/drivers/mtd/spi/spi_flash_internal.h @@ -20,6 +20,7 @@ #define CMD_READ_ARRAY_LEGACY 0xe8 #define CMD_PAGE_PROGRAM 0x02 +#define CMD_WRITE_DISABLE 0x04 #define CMD_READ_STATUS 0x05 #define CMD_WRITE_ENABLE 0x06 @@ -62,6 +63,14 @@ static inline int spi_flash_cmd_write_enable(struct spi_flash *flash) } /* + * Disable writing on the SPI flash. + */ +static inline int spi_flash_cmd_write_disable(struct spi_flash *flash) +{ + return spi_flash_cmd(flash->spi, CMD_WRITE_DISABLE, NULL, 0); +} + +/* * Same as spi_flash_cmd_read() except it also claims/releases the SPI * bus. Used as common part of the ->read() operation. */ |