summaryrefslogtreecommitdiffstats
path: root/include/linux/nvmem-provider.h
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2023-12-15 11:15:31 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-12-15 13:30:07 +0100
commit1172460e716784ac7e1049a537bdca8edbf97360 (patch)
tree5ac6a2b6f600055605e66f92ae40e2f2be7f0539 /include/linux/nvmem-provider.h
parent1b7c298a4ecbc28cc6ee94005734bff55eb83d22 (diff)
downloadlinux-stable-1172460e716784ac7e1049a537bdca8edbf97360.tar.gz
linux-stable-1172460e716784ac7e1049a537bdca8edbf97360.tar.bz2
linux-stable-1172460e716784ac7e1049a537bdca8edbf97360.zip
nvmem: Move and rename ->fixup_cell_info()
This hook is meant to be used by any provider and instantiating a layout just for this is useless. Let's instead move this hook to the nvmem device and add it to the config structure to be easily shared by the providers. While at moving this hook, rename it ->fixup_dt_cell_info() to clarify its main intended purpose. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20231215111536.316972-6-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.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/linux/nvmem-provider.h b/include/linux/nvmem-provider.h
index 3939991b3c5f..36415a602d9e 100644
--- a/include/linux/nvmem-provider.h
+++ b/include/linux/nvmem-provider.h
@@ -83,6 +83,8 @@ struct nvmem_cell_info {
* @cells: Optional array of pre-defined NVMEM cells.
* @ncells: Number of elements in cells.
* @add_legacy_fixed_of_cells: Read fixed NVMEM cells from old OF syntax.
+ * @fixup_dt_cell_info: Will be called before a cell is added. Can be
+ * used to modify the nvmem_cell_info.
* @keepout: Optional array of keepout ranges (sorted ascending by start).
* @nkeepout: Number of elements in the keepout array.
* @type: Type of the nvmem storage
@@ -113,6 +115,8 @@ struct nvmem_config {
const struct nvmem_cell_info *cells;
int ncells;
bool add_legacy_fixed_of_cells;
+ void (*fixup_dt_cell_info)(struct nvmem_device *nvmem,
+ struct nvmem_cell_info *cell);
const struct nvmem_keepout *keepout;
unsigned int nkeepout;
enum nvmem_type type;
@@ -158,8 +162,6 @@ struct nvmem_cell_table {
* @of_match_table: Open firmware match table.
* @add_cells: Called to populate the layout using
* nvmem_add_one_cell().
- * @fixup_cell_info: Will be called before a cell is added. Can be
- * used to modify the nvmem_cell_info.
* @owner: Pointer to struct module.
* @node: List node.
*
@@ -172,9 +174,6 @@ struct nvmem_layout {
const char *name;
const struct of_device_id *of_match_table;
int (*add_cells)(struct device *dev, struct nvmem_device *nvmem);
- void (*fixup_cell_info)(struct nvmem_device *nvmem,
- struct nvmem_layout *layout,
- struct nvmem_cell_info *cell);
/* private */
struct module *owner;