summaryrefslogtreecommitdiff
path: root/drivers/nvmem
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2022-04-29 19:26:46 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-05-09 16:44:21 +0300
commitdbc2f62061c6bfba0aee93161ee3194dcee84bd0 (patch)
tree94dda301ed9a24d538c01b25a9ac4e249e00056a /drivers/nvmem
parenta15dac8b228677daf8ad7f9855d38734ffa0e7d9 (diff)
downloadlinux-dbc2f62061c6bfba0aee93161ee3194dcee84bd0.tar.xz
nvmem: core: support passing DT node in cell info
Some hardware may have NVMEM cells described in Device Tree using individual nodes. Let drivers pass such nodes to the NVMEM subsystem so they can be later used by NVMEM consumers. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220429162701.2222-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/nvmem')
-rw-r--r--drivers/nvmem/core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index f58d9bc7aa08..1e3c754efd0d 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -467,6 +467,7 @@ static int nvmem_cell_info_to_nvmem_cell_entry_nodup(struct nvmem_device *nvmem,
cell->bit_offset = info->bit_offset;
cell->nbits = info->nbits;
+ cell->np = info->np;
if (cell->nbits)
cell->bytes = DIV_ROUND_UP(cell->nbits + cell->bit_offset,