drivers/nvmem/internals.h
Source file repositories/reference/linux-study-clean/drivers/nvmem/internals.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/nvmem/internals.h- Extension
.h- Size
- 1438 bytes
- Lines
- 60
- Domain
- Driver Families
- Bucket
- drivers/nvmem
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/device.hlinux/nvmem-consumer.hlinux/nvmem-provider.h
Detected Declarations
struct nvmem_devicefunction nvmem_layout_bus_registerfunction nvmem_layout_bus_unregisterfunction nvmem_destroy_layout
Annotated Snippet
struct nvmem_device {
struct module *owner;
struct device dev;
struct list_head node;
int stride;
int word_size;
int id;
struct kref refcnt;
size_t size;
bool read_only;
bool root_only;
int flags;
enum nvmem_type type;
struct bin_attribute eeprom;
struct device *base_dev;
struct list_head cells;
void (*fixup_dt_cell_info)(struct nvmem_device *nvmem,
struct nvmem_cell_info *cell);
const struct nvmem_keepout *keepout;
unsigned int nkeepout;
nvmem_reg_read_t reg_read;
nvmem_reg_write_t reg_write;
struct gpio_desc *wp_gpio;
struct nvmem_layout *layout;
void *priv;
bool sysfs_cells_populated;
};
#if IS_ENABLED(CONFIG_OF)
int nvmem_layout_bus_register(void);
void nvmem_layout_bus_unregister(void);
int nvmem_populate_layout(struct nvmem_device *nvmem);
void nvmem_destroy_layout(struct nvmem_device *nvmem);
#else /* CONFIG_OF */
static inline int nvmem_layout_bus_register(void)
{
return 0;
}
static inline void nvmem_layout_bus_unregister(void) {}
static inline int nvmem_populate_layout(struct nvmem_device *nvmem)
{
return 0;
}
static inline void nvmem_destroy_layout(struct nvmem_device *nvmem) { }
#endif /* CONFIG_OF */
#endif /* ifndef _LINUX_NVMEM_INTERNALS_H */
Annotation
- Immediate include surface: `linux/device.h`, `linux/nvmem-consumer.h`, `linux/nvmem-provider.h`.
- Detected declarations: `struct nvmem_device`, `function nvmem_layout_bus_register`, `function nvmem_layout_bus_unregister`, `function nvmem_destroy_layout`.
- Atlas domain: Driver Families / drivers/nvmem.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.