diff options
author | Andrew Lunn <andrew@lunn.ch> | 2018-05-11 14:06:56 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-05-14 17:20:48 +0300 |
commit | b3db17e4b864e46ad150ebef69c0e0130a1c5fca (patch) | |
tree | af1a8b70ae44d4f73aa91c98e33489651cc2a418 /include/linux/nvmem-provider.h | |
parent | 40fe78a242dd39f36e51907129831500f90d7d5b (diff) | |
download | linux-b3db17e4b864e46ad150ebef69c0e0130a1c5fca.tar.xz |
drivers: nvmem: Export nvmem_add_cells()
Not all platforms use device tree. It is useful to be able to add
cells to a NVMEM device from code. Export nvmem_add_cells() so making
this possible.
This required changing the parameters a bit, so that just the cells
and the number of cells are passed, not the whole nvmem config
structure.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/nvmem-provider.h')
-rw-r--r-- | include/linux/nvmem-provider.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/nvmem-provider.h b/include/linux/nvmem-provider.h index f89598bc4e1c..24def6ad09bb 100644 --- a/include/linux/nvmem-provider.h +++ b/include/linux/nvmem-provider.h @@ -77,6 +77,9 @@ struct nvmem_device *devm_nvmem_register(struct device *dev, int devm_nvmem_unregister(struct device *dev, struct nvmem_device *nvmem); +int nvmem_add_cells(struct nvmem_device *nvmem, + const struct nvmem_cell_info *info, + int ncells); #else static inline struct nvmem_device *nvmem_register(const struct nvmem_config *c) @@ -99,6 +102,14 @@ static inline int devm_nvmem_unregister(struct device *dev, struct nvmem_device *nvmem) { return nvmem_unregister(nvmem); + +} + +static inline int nvmem_add_cells(struct nvmem_device *nvmem, + const struct nvmem_cell_info *info, + int ncells) +{ + return -ENOSYS; } #endif /* CONFIG_NVMEM */ |