diff options
author | Michael Walle <michael@walle.cc> | 2021-04-24 13:06:08 +0200 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2021-05-10 12:42:55 +0200 |
commit | 4b361cfa862479fbb1d14ddf01de4dbc7146dcc5 (patch) | |
tree | 1ec73d3005420aa0edd81fa1b6ad3817a07896ff /include/linux/mtd | |
parent | dt-bindings: mtd: spi-nor: add otp property (diff) | |
download | linux-dev-4b361cfa862479fbb1d14ddf01de4dbc7146dcc5.tar.xz linux-dev-4b361cfa862479fbb1d14ddf01de4dbc7146dcc5.zip |
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
Diffstat (limited to 'include/linux/mtd')
-rw-r--r-- | include/linux/mtd/mtd.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index a89955f3cbc8..88227044fc86 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h @@ -380,6 +380,8 @@ struct mtd_info { int usecount; struct mtd_debug_info dbg; struct nvmem_device *nvmem; + struct nvmem_device *otp_user_nvmem; + struct nvmem_device *otp_factory_nvmem; /* * Parent device from the MTD partition point of view. |