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>
35 #define NVMEM_DEVID_NONE (-1)
36 #define NVMEM_DEVID_AUTO (-2)
39 * struct nvmem_keepout - NVMEM register keepout range.
52 * struct nvmem_cell_info - NVMEM cell description
54 * @offset: Offset within the NVMEM device.
77 * struct nvmem_config - NVMEM device configuration
83 * @cells: Optional array of pre-defined NVMEM cells.
87 * @type: Type of the nvmem storage
88 * @read_only: Device is read-only.
99 * @layout: Fixed layout associated with this nvmem device.
101 * Note: A default "nvmem<id>" name will be assigned to the device if
105 * Note: Specifying name and setting id to -1 implies a unique device
106 * whose name is provided as-is (kept unaltered).
121 struct nvmem_layout *layout; member
136 * struct nvmem_cell_table - NVMEM cell definitions for given provider
144 * that don't can't access the nvmem provided structure but wish to register
155 * struct nvmem_layout - NVMEM layout definitions
157 * @name: Layout name.
159 * @add_cells: Will be called if a nvmem device is found which
160 * has this layout. The function will add layout
167 * A nvmem device can hold a well defined structure which can just be
169 * pairs. A nvmem layout can parse the nvmem device and add appropriate
175 int (*add_cells)(struct device *dev, struct nvmem_device *nvmem,
176 struct nvmem_layout *layout);
177 void (*fixup_cell_info)(struct nvmem_device *nvmem,
178 struct nvmem_layout *layout,
189 void nvmem_unregister(struct nvmem_device *nvmem);
197 int nvmem_add_one_cell(struct nvmem_device *nvmem,
200 int __nvmem_layout_register(struct nvmem_layout *layout, struct module *owner);
201 #define nvmem_layout_register(layout) \ argument
202 __nvmem_layout_register(layout, THIS_MODULE)
203 void nvmem_layout_unregister(struct nvmem_layout *layout);
205 const void *nvmem_layout_get_match_data(struct nvmem_device *nvmem,
206 struct nvmem_layout *layout);
212 return ERR_PTR(-EOPNOTSUPP); in nvmem_register()
215 static inline void nvmem_unregister(struct nvmem_device *nvmem) {} in nvmem_unregister() argument
225 static inline int nvmem_add_one_cell(struct nvmem_device *nvmem, in nvmem_add_one_cell() argument
228 return -EOPNOTSUPP; in nvmem_add_one_cell()
231 static inline int nvmem_layout_register(struct nvmem_layout *layout) in nvmem_layout_register() argument
233 return -EOPNOTSUPP; in nvmem_layout_register()
236 static inline void nvmem_layout_unregister(struct nvmem_layout *layout) {} in nvmem_layout_unregister() argument
239 nvmem_layout_get_match_data(struct nvmem_device *nvmem, in nvmem_layout_get_match_data() argument
240 struct nvmem_layout *layout) in nvmem_layout_get_match_data() argument