mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 14:12:06 +00:00
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>
This commit is contained in:
parent
a15dac8b22
commit
dbc2f62061
@ -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,
|
||||
|
@ -25,6 +25,7 @@ struct nvmem_cell_info {
|
||||
unsigned int bytes;
|
||||
unsigned int bit_offset;
|
||||
unsigned int nbits;
|
||||
struct device_node *np;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user