Lines Matching +full:nvmem +full:- +full:layout

1 /* SPDX-License-Identifier: GPL-2.0 */
3 * nvmem framework provider.
6 * Copyright (C) 2013 Maxime Ripard <maxime.ripard@free-electrons.com>
36 #define NVMEM_DEVID_NONE (-1)
37 #define NVMEM_DEVID_AUTO (-2)
40 * struct nvmem_keepout - NVMEM register keepout range.
53 * struct nvmem_cell_info - NVMEM cell description
55 * @offset: Offset within the NVMEM device.
78 * struct nvmem_config - NVMEM device configuration
84 * @cells: Optional array of pre-defined NVMEM cells.
86 * @add_legacy_fixed_of_cells: Read fixed NVMEM cells from old OF syntax.
91 * @type: Type of the nvmem storage
92 * @read_only: Device is read-only.
102 * @layout: Fixed layout associated with this nvmem device.
104 * Note: A default "nvmem<id>" name will be assigned to the device if
108 * Note: Specifying name and setting id to -1 implies a unique device
109 * whose name is provided as-is (kept unaltered).
119 void (*fixup_dt_cell_info)(struct nvmem_device *nvmem,
127 struct nvmem_layout *layout; member
141 * struct nvmem_cell_table - NVMEM cell definitions for given provider
149 * that don't can't access the nvmem provided structure but wish to register
160 * struct nvmem_layout - NVMEM layout definitions
162 * @dev: Device-model layout device.
163 * @nvmem: The underlying NVMEM device
164 * @add_cells: Will be called if a nvmem device is found which
165 * has this layout. The function will add layout
168 * A nvmem device can hold a well defined structure which can just be
170 * pairs. A nvmem layout can parse the nvmem device and add appropriate
175 struct nvmem_device *nvmem; member
176 int (*add_cells)(struct nvmem_layout *layout);
181 int (*probe)(struct nvmem_layout *layout);
182 void (*remove)(struct nvmem_layout *layout);
188 void nvmem_unregister(struct nvmem_device *nvmem);
196 int nvmem_add_one_cell(struct nvmem_device *nvmem,
199 int nvmem_layout_register(struct nvmem_layout *layout);
200 void nvmem_layout_unregister(struct nvmem_layout *layout);
215 return ERR_PTR(-EOPNOTSUPP); in nvmem_register()
218 static inline void nvmem_unregister(struct nvmem_device *nvmem) {} in nvmem_unregister() argument
228 static inline int nvmem_add_one_cell(struct nvmem_device *nvmem, in nvmem_add_one_cell() argument
231 return -EOPNOTSUPP; in nvmem_add_one_cell()
234 static inline int nvmem_layout_register(struct nvmem_layout *layout) in nvmem_layout_register() argument
236 return -EOPNOTSUPP; in nvmem_layout_register()
239 static inline void nvmem_layout_unregister(struct nvmem_layout *layout) {} in nvmem_layout_unregister() argument
246 * of_nvmem_layout_get_container() - Get OF node of layout container
248 * @nvmem: nvmem device
253 struct device_node *of_nvmem_layout_get_container(struct nvmem_device *nvmem);
257 static inline struct device_node *of_nvmem_layout_get_container(struct nvmem_device *nvmem) in of_nvmem_layout_get_container() argument