Lines Matching refs:nvmem
79 static int nvmem_layout_create_device(struct nvmem_device *nvmem, in nvmem_layout_create_device() argument
91 layout->nvmem = nvmem; in nvmem_layout_create_device()
92 nvmem->layout = layout; in nvmem_layout_create_device()
97 dev->parent = &nvmem->dev; in nvmem_layout_create_device()
120 static int nvmem_layout_bus_populate(struct nvmem_device *nvmem, in nvmem_layout_bus_populate() argument
146 ret = nvmem_layout_create_device(nvmem, layout_dn); in nvmem_layout_bus_populate()
155 struct device_node *of_nvmem_layout_get_container(struct nvmem_device *nvmem) in of_nvmem_layout_get_container() argument
157 return of_get_child_by_name(nvmem->dev.of_node, "nvmem-layout"); in of_nvmem_layout_get_container()
165 int nvmem_populate_layout(struct nvmem_device *nvmem) in nvmem_populate_layout() argument
170 layout_dn = of_nvmem_layout_get_container(nvmem); in nvmem_populate_layout()
176 ret = nvmem_layout_bus_populate(nvmem, layout_dn); in nvmem_populate_layout()
183 void nvmem_destroy_layout(struct nvmem_device *nvmem) in nvmem_destroy_layout() argument
187 if (!nvmem->layout) in nvmem_destroy_layout()
190 dev = &nvmem->layout->dev; in nvmem_destroy_layout()