mtd: add OTP (one-time-programmable) erase ioctl
authorMichael Walle <michael@walle.cc>
Wed, 3 Mar 2021 20:18:19 +0000 (21:18 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Sun, 28 Mar 2021 17:24:54 +0000 (19:24 +0200)
commite3c1f1c92d6ede3cfa09d6a103d3d1c1ef645e35
tree3349a378304c85ffac78c3c2de03c6824ba23c95
parent1e97743fd180981bef5f01402342bb54bf1c6366
mtd: add OTP (one-time-programmable) erase ioctl

This may sound like a contradiction but some SPI-NOR flashes really
support erasing their OTP region until it is finally locked. Having the
possibility to erase an OTP region might come in handy during
development.

The ioctl argument follows the OTPLOCK style.

Signed-off-by: Michael Walle <michael@walle.cc>
Acked-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20210303201819.2752-1-michael@walle.cc
drivers/mtd/mtdchar.c
drivers/mtd/mtdcore.c
include/linux/mtd/mtd.h
include/uapi/mtd/mtd-abi.h