xref: /linux-6.15/drivers/nvmem/internals.h (revision ec9c08a1)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 
3 #ifndef _LINUX_NVMEM_INTERNALS_H
4 #define _LINUX_NVMEM_INTERNALS_H
5 
6 #include <linux/device.h>
7 #include <linux/nvmem-consumer.h>
8 #include <linux/nvmem-provider.h>
9 
10 struct nvmem_device {
11 	struct module		*owner;
12 	struct device		dev;
13 	struct list_head	node;
14 	int			stride;
15 	int			word_size;
16 	int			id;
17 	struct kref		refcnt;
18 	size_t			size;
19 	bool			read_only;
20 	bool			root_only;
21 	int			flags;
22 	enum nvmem_type		type;
23 	struct bin_attribute	eeprom;
24 	struct device		*base_dev;
25 	struct list_head	cells;
26 	const struct nvmem_keepout *keepout;
27 	unsigned int		nkeepout;
28 	nvmem_reg_read_t	reg_read;
29 	nvmem_reg_write_t	reg_write;
30 	struct gpio_desc	*wp_gpio;
31 	struct nvmem_layout	*layout;
32 	void *priv;
33 };
34 
35 #endif  /* ifndef _LINUX_NVMEM_INTERNALS_H */
36