summaryrefslogtreecommitdiff
path: root/include/linux/nvmem-provider.h
diff options
context:
space:
mode:
authorMichael Walle <michael@walle.cc>2023-04-04 20:21:24 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-04-05 20:41:11 +0300
commit345ec382cd4b736c36e01f155d08c913b225b736 (patch)
tree07e3360c2883ae05009d36e45dc5427c91ad60f8 /include/linux/nvmem-provider.h
parentb1c37bec1ccfe5ccab72bc0ddc0dfa45c43e2de2 (diff)
downloadlinux-345ec382cd4b736c36e01f155d08c913b225b736.tar.xz
nvmem: core: add per-cell post processing
Instead of relying on the name the consumer is using for the cell, like it is done for the nvmem .cell_post_process configuration parameter, provide a per-cell post processing hook. This can then be populated by the NVMEM provider (or the NVMEM layout) when adding the cell. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20230404172148.82422-17-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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/nvmem-provider.h b/include/linux/nvmem-provider.h
index 535c5f9f3309..3bfc23553a9e 100644
--- a/include/linux/nvmem-provider.h
+++ b/include/linux/nvmem-provider.h
@@ -54,6 +54,8 @@ struct nvmem_keepout {
* @bit_offset: Bit offset if cell is smaller than a byte.
* @nbits: Number of bits.
* @np: Optional device_node pointer.
+ * @read_post_process: Callback for optional post processing of cell data
+ * on reads.
*/
struct nvmem_cell_info {
const char *name;
@@ -62,6 +64,7 @@ struct nvmem_cell_info {
unsigned int bit_offset;
unsigned int nbits;
struct device_node *np;
+ nvmem_cell_post_process_t read_post_process;
};
/**