diff options
author | Brian Norris <computersforpeace@gmail.com> | 2015-09-01 12:57:12 -0700 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2015-10-13 18:22:54 -0700 |
commit | 5bf0e69b67a5600ea7ef178acd57606d1fc2c134 (patch) | |
tree | 55ed326fe52f7d4b006a07ccf68fcd8edbbf9d61 /include | |
parent | 62593cf40b23b523b9fc9334ca61ba6c595ebb09 (diff) |
mtd: spi-nor: add mtd_is_locked() support
This enables ioctl(MEMISLOCKED). Status can now be reported in the
mtdinfo or flash_lock utilities found in mtd-utils.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mtd/spi-nor.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h index 75eb1a079f75..c8723b62c4cd 100644 --- a/include/linux/mtd/spi-nor.h +++ b/include/linux/mtd/spi-nor.h @@ -147,6 +147,8 @@ struct mtd_info; * at the offset @offs * @flash_lock: [FLASH-SPECIFIC] lock a region of the SPI NOR * @flash_unlock: [FLASH-SPECIFIC] unlock a region of the SPI NOR + * @flash_is_locked: [FLASH-SPECIFIC] check if a region of the SPI NOR is + * completely locked * @priv: the private data */ struct spi_nor { @@ -178,6 +180,7 @@ struct spi_nor { int (*flash_lock)(struct spi_nor *nor, loff_t ofs, uint64_t len); int (*flash_unlock)(struct spi_nor *nor, loff_t ofs, uint64_t len); + int (*flash_is_locked)(struct spi_nor *nor, loff_t ofs, uint64_t len); void *priv; }; |