OSDN Git Service

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)
commit4b361cfa862479fbb1d14ddf01de4dbc7146dcc5
tree1ec73d3005420aa0edd81fa1b6ad3817a07896ff
parent96d3af22f87c81f21bd4c79b257e205240157ae0
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