diff options
author | Leonard Crestez <leonard.crestez@nxp.com> | 2017-07-26 12:34:46 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-08-28 18:33:23 +0300 |
commit | d026d70a2e9460dc701d20b48672b80a2656006d (patch) | |
tree | 24acc74a69f48c4f163b75c9764305f19f33da68 /include/linux/nvmem-consumer.h | |
parent | 5f214ccdd1cab5cdfbd15bf08124d456c7fd8eec (diff) | |
download | linux-d026d70a2e9460dc701d20b48672b80a2656006d.tar.xz |
nvmem: core: Add nvmem_cell_read_u32
This function does a quick and easy read of an u32 value without any
kind of resource management code on the consumer side.
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/nvmem-consumer.h')
-rw-r--r-- | include/linux/nvmem-consumer.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/nvmem-consumer.h b/include/linux/nvmem-consumer.h index c2256d746543..efafccffaee8 100644 --- a/include/linux/nvmem-consumer.h +++ b/include/linux/nvmem-consumer.h @@ -35,6 +35,7 @@ void nvmem_cell_put(struct nvmem_cell *cell); void devm_nvmem_cell_put(struct device *dev, struct nvmem_cell *cell); void *nvmem_cell_read(struct nvmem_cell *cell, size_t *len); int nvmem_cell_write(struct nvmem_cell *cell, void *buf, size_t len); +int nvmem_cell_read_u32(struct device *dev, const char *cell_id, u32 *val); /* direct nvmem device read/write interface */ struct nvmem_device *nvmem_device_get(struct device *dev, const char *name); @@ -85,6 +86,12 @@ static inline int nvmem_cell_write(struct nvmem_cell *cell, return -ENOSYS; } +static inline int nvmem_cell_read_u32(struct device *dev, + const char *cell_id, u32 *val) +{ + return -ENOSYS; +} + static inline struct nvmem_device *nvmem_device_get(struct device *dev, const char *name) { |