mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-08-22 00:42:01 +02:00

[ Upstream commit1172460e71
] This hook is meant to be used by any provider and instantiating a layout just for this is useless. Let's instead move this hook to the nvmem device and add it to the config structure to be easily shared by the providers. While at moving this hook, rename it ->fixup_dt_cell_info() to clarify its main intended purpose. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20231215111536.316972-6-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Stable-dep-of:391b06ecb6
("nvmem: imx-ocotp-ele: fix MAC address byte order") Signed-off-by: Sasha Levin <sashal@kernel.org>
38 lines
869 B
C
38 lines
869 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef _LINUX_NVMEM_INTERNALS_H
|
|
#define _LINUX_NVMEM_INTERNALS_H
|
|
|
|
#include <linux/device.h>
|
|
#include <linux/nvmem-consumer.h>
|
|
#include <linux/nvmem-provider.h>
|
|
|
|
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;
|
|
};
|
|
|
|
#endif /* ifndef _LINUX_NVMEM_INTERNALS_H */
|