]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: core: add OTP nvmem provider support
authorMichael Walle <michael@walle.cc>
Sat, 24 Apr 2021 11:06:08 +0000 (13:06 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 10 May 2021 10:42:55 +0000 (12:42 +0200)
commit23fc7ca741a24fe8292aa35e0727a49916ae340f
tree1ec73d3005420aa0edd81fa1b6ad3817a07896ff
parent017b9934dbe49f714737c13471e0a92f5b183be1
mtd: core: add OTP nvmem provider support

Flash OTP regions can already be read via user space. Some boards have
their serial number or MAC addresses stored in the OTP regions. Add
support for them being a (read-only) nvmem provider.

The API to read the OTP data is already in place. It distinguishes
between factory and user OTP, thus there are up to two different
providers.

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20210424110608.15748-6-michael@walle.cc
drivers/mtd/mtdcore.c
include/linux/mtd/mtd.h