Thread (24 messages) 24 messages, 3 authors, 2021-09-23
STALE1720d
Revisions (2)
  1. v1 current
  2. v2 [diff vs current]

[PATCH 2/6] nvmem: core: parse nvmem cell-type from device tree

From: Joakim Zhang <hidden>
Date: 2021-09-08 10:03:58
Also in: lkml
Subsystem: nvmem framework, the rest · Maintainers: Srinivas Kandagatla, Linus Torvalds

From: Srinivas Kandagatla <redacted>

get nvmem cell-type from device tree

Signed-off-by: Srinivas Kandagatla <redacted>
Signed-off-by: Joakim Zhang <redacted>
---
 drivers/nvmem/core.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index 3d87fadaa160..23c08dbaf45e 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -52,6 +52,7 @@ struct nvmem_cell {
 	int			bytes;
 	int			bit_offset;
 	int			nbits;
+	u32			type;
 	struct device_node	*np;
 	struct nvmem_device	*nvmem;
 	struct list_head	node;
@@ -726,6 +727,8 @@ static int nvmem_add_cells_from_of(struct nvmem_device *nvmem)
 			return -EINVAL;
 		}
 
+		of_property_read_u32(child, "cell-type", &cell->type);
+
 		cell->np = of_node_get(child);
 		nvmem_cell_add(cell);
 	}
-- 
2.17.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help