OSDN Git Service

mtd: add support for reading MTD devices via the nvmem API
authorAlban Bedel <albeu@free.fr>
Tue, 13 Nov 2018 14:01:10 +0000 (15:01 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Dec 2018 14:48:54 +0000 (15:48 +0100)
commitc4dfa25ab307a277eafa7067cd927fbe4d9be4ba
tree4f10063c263283167e308490ad538e325b57249e
parent517f14d9cf3533d5ab4fded195ab6f80a92e378f
mtd: add support for reading MTD devices via the nvmem API

Allow drivers that use the nvmem API to read data stored on MTD devices.
For this the mtd devices are registered as read-only NVMEM providers.

We don't support device tree systems for now.

Signed-off-by: Alban Bedel <albeu@free.fr>
[Bartosz:
  - include linux/nvmem-provider.h
  - set the name of the nvmem provider
  - set no_of_node to true in nvmem_config
  - don't check the return value of nvmem_unregister() - it cannot fail
  - tweaked the commit message]
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/Kconfig
drivers/mtd/mtdcore.c
include/linux/mtd/mtd.h