diff options
| author | Michael Walle <[email protected]> | 2023-04-04 18:21:24 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2023-04-05 19:41:11 +0200 |
| commit | 345ec382cd4b736c36e01f155d08c913b225b736 (patch) | |
| tree | 07e3360c2883ae05009d36e45dc5427c91ad60f8 /include/linux | |
| parent | b1c37bec1ccfe5ccab72bc0ddc0dfa45c43e2de2 (diff) | |
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 <[email protected]>
Signed-off-by: Miquel Raynal <[email protected]>
Signed-off-by: Srinivas Kandagatla <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/nvmem-provider.h | 3 |
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; }; /** |