mtd: spi-nor: provide default erase_sector implementation
authorBrian Norris <computersforpeace@gmail.com>
Tue, 10 Nov 2015 20:15:27 +0000 (12:15 -0800)
committerBrian Norris <computersforpeace@gmail.com>
Thu, 19 Nov 2015 21:34:44 +0000 (13:34 -0800)
commitc67cbb839da9cc2757eabfa128556db6a2baf160
tree1a8f6a07ef4ec5af82bb9af9d04c309ca34bb7bb
parent1e6460abf739310fe695bafac30c2be39d18c8f9
mtd: spi-nor: provide default erase_sector implementation

Some spi-nor drivers perform sector erase by duplicating their
write_reg() command. Let's not require that the driver fill this out,
and provide a default instead.

Tested on m25p80.c and Medatek's MT8173 SPI NOR flash driver.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/spi-nor/spi-nor.c
include/linux/mtd/spi-nor.h