]> 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)
commit489af5af168e457c660ebdf5016715c9de3f0089
tree1ec73d3005420aa0edd81fa1b6ad3817a07896ff
parent2a574c277e87848268e083ecbd99eee905ad7878
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