/kernel/linux/linux-5.10/drivers/nvmem/ |
H A D | core.c | 3 * nvmem framework core. 16 #include <linux/nvmem-consumer.h> 17 #include <linux/nvmem-provider.h> 54 struct nvmem_device *nvmem; member 69 static int nvmem_reg_read(struct nvmem_device *nvmem, unsigned int offset, in nvmem_reg_read() argument 72 if (nvmem->reg_read) in nvmem_reg_read() 73 return nvmem->reg_read(nvmem->priv, offset, val, bytes); in nvmem_reg_read() 78 static int nvmem_reg_write(struct nvmem_device *nvmem, unsigned int offset, in nvmem_reg_write() argument 83 if (nvmem in nvmem_reg_write() 108 struct nvmem_device *nvmem = to_nvmem_device(dev); type_show() local 125 struct nvmem_device *nvmem; bin_attr_nvmem_read() local 165 struct nvmem_device *nvmem; bin_attr_nvmem_write() local 200 nvmem_bin_attr_get_umode(struct nvmem_device *nvmem) nvmem_bin_attr_get_umode() argument 223 struct nvmem_device *nvmem = to_nvmem_device(dev); nvmem_bin_attr_is_visible() local 269 nvmem_sysfs_setup_compat(struct nvmem_device *nvmem, const struct nvmem_config *config) nvmem_sysfs_setup_compat() argument 301 nvmem_sysfs_remove_compat(struct nvmem_device *nvmem, const struct nvmem_config *config) nvmem_sysfs_remove_compat() argument 310 nvmem_sysfs_setup_compat(struct nvmem_device *nvmem, const struct nvmem_config *config) nvmem_sysfs_setup_compat() argument 315 nvmem_sysfs_remove_compat(struct nvmem_device *nvmem, const struct nvmem_config *config) nvmem_sysfs_remove_compat() argument 324 struct nvmem_device *nvmem = to_nvmem_device(dev); nvmem_release() local 350 nvmem_device_remove_all_cells(const struct nvmem_device *nvmem) nvmem_device_remove_all_cells() argument 366 nvmem_cell_info_to_nvmem_cell_nodup(struct nvmem_device *nvmem, const struct nvmem_cell_info *info, struct nvmem_cell *cell) nvmem_cell_info_to_nvmem_cell_nodup() argument 392 nvmem_cell_info_to_nvmem_cell(struct nvmem_device *nvmem, const struct nvmem_cell_info *info, struct nvmem_cell *cell) nvmem_cell_info_to_nvmem_cell() argument 418 nvmem_add_cells(struct nvmem_device *nvmem, const struct nvmem_cell_info *info, int ncells) nvmem_add_cells() argument 484 nvmem_add_cells_from_table(struct nvmem_device *nvmem) nvmem_add_cells_from_table() argument 522 nvmem_find_cell_by_name(struct nvmem_device *nvmem, const char *cell_id) nvmem_find_cell_by_name() argument 538 nvmem_add_cells_from_of(struct nvmem_device *nvmem) nvmem_add_cells_from_of() argument 609 struct nvmem_device *nvmem; nvmem_register() local 729 struct nvmem_device *nvmem; nvmem_device_release() local 747 nvmem_unregister(struct nvmem_device *nvmem) nvmem_unregister() argument 772 struct nvmem_device **ptr, *nvmem; devm_nvmem_register() local 807 devm_nvmem_unregister(struct device *dev, struct nvmem_device *nvmem) devm_nvmem_unregister() argument 816 struct nvmem_device *nvmem = NULL; __nvmem_device_get() local 841 __nvmem_device_put(struct nvmem_device *nvmem) __nvmem_device_put() argument 862 struct nvmem_device *nvmem; of_nvmem_device_get() local 891 struct nvmem_device *nvmem; nvmem_device_get() local 922 struct nvmem_device **nvmem = res; devm_nvmem_device_match() local 942 devm_nvmem_device_put(struct device *dev, struct nvmem_device *nvmem) devm_nvmem_device_put() argument 958 nvmem_device_put(struct nvmem_device *nvmem) nvmem_device_put() argument 976 struct nvmem_device **ptr, *nvmem; devm_nvmem_device_get() local 999 struct nvmem_device *nvmem; nvmem_cell_get_from_lookup() local 1037 nvmem_find_cell_by_node(struct nvmem_device *nvmem, struct device_node *np) nvmem_find_cell_by_node() argument 1068 struct nvmem_device *nvmem; of_nvmem_cell_get() local 1200 struct nvmem_device *nvmem = cell->nvmem; nvmem_cell_put() local 1239 __nvmem_cell_read(struct nvmem_device *nvmem, struct nvmem_cell *cell, void *buf, size_t *len) __nvmem_cell_read() argument 1272 struct nvmem_device *nvmem = cell->nvmem; nvmem_cell_read() local 1296 struct nvmem_device *nvmem = cell->nvmem; nvmem_cell_prepare_write_buffer() local 1357 struct nvmem_device *nvmem = cell->nvmem; nvmem_cell_write() local 1481 nvmem_device_cell_read(struct nvmem_device *nvmem, struct nvmem_cell_info *info, void *buf) nvmem_device_cell_read() argument 1512 nvmem_device_cell_write(struct nvmem_device *nvmem, struct nvmem_cell_info *info, void *buf) nvmem_device_cell_write() argument 1540 nvmem_device_read(struct nvmem_device *nvmem, unsigned int offset, size_t bytes, void *buf) nvmem_device_read() argument 1568 nvmem_device_write(struct nvmem_device *nvmem, unsigned int offset, size_t bytes, void *buf) nvmem_device_write() argument 1655 nvmem_dev_name(struct nvmem_device *nvmem) nvmem_dev_name() argument [all...] |
H A D | Makefile | 3 # Makefile for nvmem drivers. 10 obj-$(CONFIG_NVMEM_BCM_OCOTP) += nvmem-bcm-ocotp.o 11 nvmem-bcm-ocotp-y := bcm-ocotp.o 12 obj-$(CONFIG_NVMEM_IMX_IIM) += nvmem-imx-iim.o 13 nvmem-imx-iim-y := imx-iim.o 14 obj-$(CONFIG_NVMEM_IMX_OCOTP) += nvmem-imx-ocotp.o 15 nvmem-imx-ocotp-y := imx-ocotp.o 16 obj-$(CONFIG_NVMEM_IMX_OCOTP_SCU) += nvmem-imx-ocotp-scu.o 17 nvmem-imx-ocotp-scu-y := imx-ocotp-scu.o 24 obj-$(CONFIG_NVMEM_MXS_OCOTP) += nvmem [all...] |
H A D | sunxi_sid.c | 13 #include <linux/nvmem-provider.h> 117 struct nvmem_device *nvmem; in sunxi_sid_probe() local 155 nvmem = devm_nvmem_register(dev, nvmem_cfg); in sunxi_sid_probe() 156 if (IS_ERR(nvmem)) in sunxi_sid_probe() 157 return PTR_ERR(nvmem); in sunxi_sid_probe() 167 platform_set_drvdata(pdev, nvmem); in sunxi_sid_probe()
|
H A D | lpc18xx_otp.c | 15 #include <linux/nvmem-provider.h> 69 struct nvmem_device *nvmem; in lpc18xx_otp_probe() local 86 nvmem = devm_nvmem_register(&pdev->dev, &lpc18xx_otp_nvmem_config); in lpc18xx_otp_probe() 88 return PTR_ERR_OR_ZERO(nvmem); in lpc18xx_otp_probe()
|
H A D | mtk-efuse.c | 11 #include <linux/nvmem-provider.h> 35 struct nvmem_device *nvmem; in mtk_efuse_probe() local 54 nvmem = devm_nvmem_register(dev, &econfig); in mtk_efuse_probe() 56 return PTR_ERR_OR_ZERO(nvmem); in mtk_efuse_probe()
|
H A D | uniphier-efuse.c | 12 #include <linux/nvmem-provider.h> 36 struct nvmem_device *nvmem; in uniphier_efuse_probe() local 56 nvmem = devm_nvmem_register(dev, &econfig); in uniphier_efuse_probe() 58 return PTR_ERR_OR_ZERO(nvmem); in uniphier_efuse_probe()
|
H A D | zynqmp_nvmem.c | 7 #include <linux/nvmem-provider.h> 16 struct nvmem_device *nvmem; member 37 .name = "zynqmp-nvmem", 45 { .compatible = "xlnx,zynqmp-nvmem-fw", }, 64 priv->nvmem = devm_nvmem_register(dev, &econfig); in zynqmp_nvmem_probe() 66 return PTR_ERR_OR_ZERO(priv->nvmem); in zynqmp_nvmem_probe() 72 .name = "zynqmp-nvmem",
|
/kernel/linux/linux-6.6/drivers/nvmem/ |
H A D | core.c | 3 * nvmem framework core. 16 #include <linux/nvmem-consumer.h> 17 #include <linux/nvmem-provider.h> 59 struct nvmem_device *nvmem; member 83 static int __nvmem_reg_read(struct nvmem_device *nvmem, unsigned int offset, in __nvmem_reg_read() argument 86 if (nvmem->reg_read) in __nvmem_reg_read() 87 return nvmem->reg_read(nvmem->priv, offset, val, bytes); in __nvmem_reg_read() 92 static int __nvmem_reg_write(struct nvmem_device *nvmem, unsigned int offset, in __nvmem_reg_write() argument 97 if (nvmem in __nvmem_reg_write() 107 nvmem_access_with_keepouts(struct nvmem_device *nvmem, unsigned int offset, void *val, size_t bytes, int write) nvmem_access_with_keepouts() argument 171 nvmem_reg_read(struct nvmem_device *nvmem, unsigned int offset, void *val, size_t bytes) nvmem_reg_read() argument 180 nvmem_reg_write(struct nvmem_device *nvmem, unsigned int offset, void *val, size_t bytes) nvmem_reg_write() argument 205 struct nvmem_device *nvmem = to_nvmem_device(dev); type_show() local 222 struct nvmem_device *nvmem; bin_attr_nvmem_read() local 262 struct nvmem_device *nvmem; bin_attr_nvmem_write() local 297 nvmem_bin_attr_get_umode(struct nvmem_device *nvmem) nvmem_bin_attr_get_umode() argument 320 struct nvmem_device *nvmem = to_nvmem_device(dev); nvmem_bin_attr_is_visible() local 366 nvmem_sysfs_setup_compat(struct nvmem_device *nvmem, const struct nvmem_config *config) nvmem_sysfs_setup_compat() argument 401 nvmem_sysfs_remove_compat(struct nvmem_device *nvmem, const struct nvmem_config *config) nvmem_sysfs_remove_compat() argument 410 nvmem_sysfs_setup_compat(struct nvmem_device *nvmem, const struct nvmem_config *config) nvmem_sysfs_setup_compat() argument 415 nvmem_sysfs_remove_compat(struct nvmem_device *nvmem, const struct nvmem_config *config) nvmem_sysfs_remove_compat() argument 424 struct nvmem_device *nvmem = to_nvmem_device(dev); nvmem_release() local 450 nvmem_device_remove_all_cells(const struct nvmem_device *nvmem) nvmem_device_remove_all_cells() argument 466 nvmem_cell_info_to_nvmem_cell_entry_nodup(struct nvmem_device *nvmem, const struct nvmem_cell_info *info, struct nvmem_cell_entry *cell) nvmem_cell_info_to_nvmem_cell_entry_nodup() argument 496 nvmem_cell_info_to_nvmem_cell_entry(struct nvmem_device *nvmem, const struct nvmem_cell_info *info, struct nvmem_cell_entry *cell) nvmem_cell_info_to_nvmem_cell_entry() argument 521 nvmem_add_one_cell(struct nvmem_device *nvmem, const struct nvmem_cell_info *info) nvmem_add_one_cell() argument 552 nvmem_add_cells(struct nvmem_device *nvmem, const struct nvmem_cell_info *info, int ncells) nvmem_add_cells() argument 593 nvmem_add_cells_from_table(struct nvmem_device *nvmem) nvmem_add_cells_from_table() argument 629 nvmem_find_cell_entry_by_name(struct nvmem_device *nvmem, const char *cell_id) nvmem_find_cell_entry_by_name() argument 645 nvmem_validate_keepouts(struct nvmem_device *nvmem) nvmem_validate_keepouts() argument 698 nvmem_add_cells_from_dt(struct nvmem_device *nvmem, struct device_node *np) nvmem_add_cells_from_dt() argument 744 nvmem_add_cells_from_legacy_of(struct nvmem_device *nvmem) nvmem_add_cells_from_legacy_of() argument 749 nvmem_add_cells_from_fixed_layout(struct nvmem_device *nvmem) nvmem_add_cells_from_fixed_layout() argument 790 nvmem_layout_get(struct nvmem_device *nvmem) nvmem_layout_get() argument 835 nvmem_add_cells_from_layout(struct nvmem_device *nvmem) nvmem_add_cells_from_layout() argument 858 of_nvmem_layout_get_container(struct nvmem_device *nvmem) of_nvmem_layout_get_container() argument 865 nvmem_layout_get_match_data(struct nvmem_device *nvmem, struct nvmem_layout *layout) nvmem_layout_get_match_data() argument 890 struct nvmem_device *nvmem; nvmem_register() local 1043 struct nvmem_device *nvmem; nvmem_device_release() local 1062 nvmem_unregister(struct nvmem_device *nvmem) nvmem_unregister() argument 1069 devm_nvmem_unregister(void *nvmem) devm_nvmem_unregister() argument 1088 struct nvmem_device *nvmem; devm_nvmem_register() local 1106 struct nvmem_device *nvmem = NULL; __nvmem_device_get() local 1131 __nvmem_device_put(struct nvmem_device *nvmem) __nvmem_device_put() argument 1152 struct nvmem_device *nvmem; of_nvmem_device_get() local 1181 struct nvmem_device *nvmem; nvmem_device_get() local 1212 struct nvmem_device **nvmem = res; devm_nvmem_device_match() local 1232 devm_nvmem_device_put(struct device *dev, struct nvmem_device *nvmem) devm_nvmem_device_put() argument 1248 nvmem_device_put(struct nvmem_device *nvmem) nvmem_device_put() argument 1266 struct nvmem_device **ptr, *nvmem; devm_nvmem_device_get() local 1315 struct nvmem_device *nvmem; nvmem_cell_get_from_lookup() local 1357 nvmem_find_cell_entry_by_node(struct nvmem_device *nvmem, struct device_node *np) nvmem_find_cell_entry_by_node() argument 1388 struct nvmem_device *nvmem; of_nvmem_cell_get() local 1551 struct nvmem_device *nvmem = cell->entry->nvmem; nvmem_cell_put() local 1594 __nvmem_cell_read(struct nvmem_device *nvmem, struct nvmem_cell_entry *cell, void *buf, size_t *len, const char *id, int index) __nvmem_cell_read() argument 1635 struct nvmem_device *nvmem = entry->nvmem; nvmem_cell_read() local 1659 struct nvmem_device *nvmem = cell->nvmem; nvmem_cell_prepare_write_buffer() local 1711 struct nvmem_device *nvmem = cell->nvmem; __nvmem_cell_entry_write() local 1953 nvmem_device_cell_read(struct nvmem_device *nvmem, struct nvmem_cell_info *info, void *buf) nvmem_device_cell_read() argument 1984 nvmem_device_cell_write(struct nvmem_device *nvmem, struct nvmem_cell_info *info, void *buf) nvmem_device_cell_write() argument 2012 nvmem_device_read(struct nvmem_device *nvmem, unsigned int offset, size_t bytes, void *buf) nvmem_device_read() argument 2040 nvmem_device_write(struct nvmem_device *nvmem, unsigned int offset, size_t bytes, void *buf) nvmem_device_write() argument 2127 nvmem_dev_name(struct nvmem_device *nvmem) nvmem_dev_name() argument [all...] |
H A D | Makefile | 3 # Makefile for nvmem drivers. 11 obj-$(CONFIG_NVMEM_APPLE_EFUSES) += nvmem-apple-efuses.o 12 nvmem-apple-efuses-y := apple-efuses.o 13 obj-$(CONFIG_NVMEM_BCM_OCOTP) += nvmem-bcm-ocotp.o 14 nvmem-bcm-ocotp-y := bcm-ocotp.o 17 obj-$(CONFIG_NVMEM_IMX_IIM) += nvmem-imx-iim.o 18 nvmem-imx-iim-y := imx-iim.o 19 obj-$(CONFIG_NVMEM_IMX_OCOTP) += nvmem-imx-ocotp.o 20 nvmem-imx-ocotp-y := imx-ocotp.o 21 obj-$(CONFIG_NVMEM_IMX_OCOTP_ELE) += nvmem [all...] |
H A D | mtk-efuse.c | 11 #include <linux/nvmem-provider.h> 48 static void mtk_efuse_fixup_cell_info(struct nvmem_device *nvmem, in mtk_efuse_fixup_cell_info() argument 72 struct nvmem_device *nvmem; in mtk_efuse_probe() local 94 nvmem = devm_nvmem_register(dev, &econfig); in mtk_efuse_probe() 96 return PTR_ERR_OR_ZERO(nvmem); in mtk_efuse_probe()
|
/kernel/linux/linux-5.10/include/linux/ |
H A D | nvmem-consumer.h | 3 * nvmem framework consumer. 34 * @cell_name: Name of the nvmem cell as defined in the name field of 69 /* direct nvmem device read/write interface */ 73 void nvmem_device_put(struct nvmem_device *nvmem); 74 void devm_nvmem_device_put(struct device *dev, struct nvmem_device *nvmem); 75 int nvmem_device_read(struct nvmem_device *nvmem, unsigned int offset, 77 int nvmem_device_write(struct nvmem_device *nvmem, unsigned int offset, 79 ssize_t nvmem_device_cell_read(struct nvmem_device *nvmem, 81 int nvmem_device_cell_write(struct nvmem_device *nvmem, 84 const char *nvmem_dev_name(struct nvmem_device *nvmem); 161 nvmem_device_put(struct nvmem_device *nvmem) nvmem_device_put() argument 165 devm_nvmem_device_put(struct device *dev, struct nvmem_device *nvmem) devm_nvmem_device_put() argument 170 nvmem_device_cell_read(struct nvmem_device *nvmem, struct nvmem_cell_info *info, void *buf) nvmem_device_cell_read() argument 177 nvmem_device_cell_write(struct nvmem_device *nvmem, struct nvmem_cell_info *info, void *buf) nvmem_device_cell_write() argument 184 nvmem_device_read(struct nvmem_device *nvmem, unsigned int offset, size_t bytes, void *buf) nvmem_device_read() argument 191 nvmem_device_write(struct nvmem_device *nvmem, unsigned int offset, size_t bytes, void *buf) nvmem_device_write() argument 198 nvmem_dev_name(struct nvmem_device *nvmem) nvmem_dev_name() argument [all...] |
H A D | nvmem-provider.h | 3 * nvmem framework provider. 42 * @type: Type of the nvmem storage 54 * Note: A default "nvmem<id>" name will be assigned to the device if 93 * that don't can't access the nvmem provided structure but wish to register 106 void nvmem_unregister(struct nvmem_device *nvmem); 111 int devm_nvmem_unregister(struct device *dev, struct nvmem_device *nvmem); 123 static inline void nvmem_unregister(struct nvmem_device *nvmem) {} in nvmem_unregister() argument 132 devm_nvmem_unregister(struct device *dev, struct nvmem_device *nvmem) in devm_nvmem_unregister() argument
|
/kernel/linux/linux-6.6/include/linux/ |
H A D | nvmem-consumer.h | 3 * nvmem framework consumer. 27 * @cell_name: Name of the nvmem cell as defined in the name field of 68 /* direct nvmem device read/write interface */ 72 void nvmem_device_put(struct nvmem_device *nvmem); 73 void devm_nvmem_device_put(struct device *dev, struct nvmem_device *nvmem); 74 int nvmem_device_read(struct nvmem_device *nvmem, unsigned int offset, 76 int nvmem_device_write(struct nvmem_device *nvmem, unsigned int offset, 78 ssize_t nvmem_device_cell_read(struct nvmem_device *nvmem, 80 int nvmem_device_cell_write(struct nvmem_device *nvmem, 83 const char *nvmem_dev_name(struct nvmem_device *nvmem); 174 nvmem_device_put(struct nvmem_device *nvmem) nvmem_device_put() argument 178 devm_nvmem_device_put(struct device *dev, struct nvmem_device *nvmem) devm_nvmem_device_put() argument 183 nvmem_device_cell_read(struct nvmem_device *nvmem, struct nvmem_cell_info *info, void *buf) nvmem_device_cell_read() argument 190 nvmem_device_cell_write(struct nvmem_device *nvmem, struct nvmem_cell_info *info, void *buf) nvmem_device_cell_write() argument 197 nvmem_device_read(struct nvmem_device *nvmem, unsigned int offset, size_t bytes, void *buf) nvmem_device_read() argument 204 nvmem_device_write(struct nvmem_device *nvmem, unsigned int offset, size_t bytes, void *buf) nvmem_device_write() argument 211 nvmem_dev_name(struct nvmem_device *nvmem) nvmem_dev_name() argument 259 of_nvmem_layout_get_container(struct nvmem_device *nvmem) of_nvmem_layout_get_container() argument [all...] |
H A D | nvmem-provider.h | 3 * nvmem framework provider. 87 * @type: Type of the nvmem storage 99 * @layout: Fixed layout associated with this nvmem device. 101 * Note: A default "nvmem<id>" name will be assigned to the device if 144 * that don't can't access the nvmem provided structure but wish to register 159 * @add_cells: Will be called if a nvmem device is found which 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, 215 nvmem_unregister(struct nvmem_device *nvmem) nvmem_unregister() argument 225 nvmem_add_one_cell(struct nvmem_device *nvmem, const struct nvmem_cell_info *info) nvmem_add_one_cell() argument 239 nvmem_layout_get_match_data(struct nvmem_device *nvmem, struct nvmem_layout *layout) nvmem_layout_get_match_data() argument [all...] |
/kernel/linux/linux-6.6/drivers/soc/tegra/fuse/ |
H A D | fuse-tegra.c | 11 #include <linux/nvmem-consumer.h> 12 #include <linux/nvmem-provider.h> 119 struct nvmem_config nvmem; in tegra_fuse_probe() local 155 memset(&nvmem, 0, sizeof(nvmem)); in tegra_fuse_probe() 156 nvmem.dev = &pdev->dev; in tegra_fuse_probe() 157 nvmem.name = "fuse"; in tegra_fuse_probe() 158 nvmem.id = -1; in tegra_fuse_probe() 159 nvmem.owner = THIS_MODULE; in tegra_fuse_probe() 160 nvmem in tegra_fuse_probe() [all...] |
/kernel/linux/linux-5.10/drivers/thunderbolt/ |
H A D | nvm.c | 60 struct nvmem_device *nvmem; in tb_nvm_add_active() local 75 nvmem = nvmem_register(&config); in tb_nvm_add_active() 76 if (IS_ERR(nvmem)) in tb_nvm_add_active() 77 return PTR_ERR(nvmem); in tb_nvm_add_active() 79 nvm->active = nvmem; in tb_nvm_add_active() 125 struct nvmem_device *nvmem; in tb_nvm_add_non_active() local 140 nvmem = nvmem_register(&config); in tb_nvm_add_non_active() 141 if (IS_ERR(nvmem)) in tb_nvm_add_non_active() 142 return PTR_ERR(nvmem); in tb_nvm_add_non_active() 144 nvm->non_active = nvmem; in tb_nvm_add_non_active() [all...] |
/kernel/linux/linux-5.10/drivers/soc/tegra/fuse/ |
H A D | fuse-tegra.c | 11 #include <linux/nvmem-consumer.h> 12 #include <linux/nvmem-provider.h> 186 struct nvmem_config nvmem; in tegra_fuse_probe() local 219 memset(&nvmem, 0, sizeof(nvmem)); in tegra_fuse_probe() 220 nvmem.dev = &pdev->dev; in tegra_fuse_probe() 221 nvmem.name = "fuse"; in tegra_fuse_probe() 222 nvmem.id = -1; in tegra_fuse_probe() 223 nvmem.owner = THIS_MODULE; in tegra_fuse_probe() 224 nvmem in tegra_fuse_probe() [all...] |
/kernel/linux/linux-6.6/drivers/nvmem/layouts/ |
H A D | sl28vpd.c | 5 #include <linux/nvmem-consumer.h> 6 #include <linux/nvmem-provider.h> 56 static int sl28vpd_v1_check_crc(struct device *dev, struct nvmem_device *nvmem) in sl28vpd_v1_check_crc() argument 65 ret = nvmem_device_read(nvmem, 0, sizeof(data_v1), &data_v1); in sl28vpd_v1_check_crc() 83 static int sl28vpd_add_cells(struct device *dev, struct nvmem_device *nvmem, in sl28vpd_add_cells() argument 93 ret = nvmem_device_read(nvmem, 0, sizeof(hdr), &hdr); in sl28vpd_add_cells() 109 ret = sl28vpd_v1_check_crc(dev, nvmem); in sl28vpd_add_cells() 113 layout_np = of_nvmem_layout_get_container(nvmem); in sl28vpd_add_cells() 126 ret = nvmem_add_one_cell(nvmem, &info); in sl28vpd_add_cells()
|
H A D | onie-tlv.c | 7 * Based on the nvmem driver written by: Vadym Kochan <vadym.kochan@plvision.eu> 13 #include <linux/nvmem-consumer.h> 14 #include <linux/nvmem-provider.h> 98 static int onie_tlv_add_cells(struct device *dev, struct nvmem_device *nvmem, in onie_tlv_add_cells() argument 108 layout = of_nvmem_layout_get_container(nvmem); in onie_tlv_add_cells() 129 ret = nvmem_add_one_cell(nvmem, &cell); in onie_tlv_add_cells() 185 static int onie_tlv_parse_table(struct device *dev, struct nvmem_device *nvmem, in onie_tlv_parse_table() argument 193 ret = nvmem_device_read(nvmem, 0, sizeof(hdr), &hdr); in onie_tlv_parse_table() 214 ret = nvmem_device_read(nvmem, 0, table_len, table); in onie_tlv_parse_table() 222 ret = onie_tlv_add_cells(dev, nvmem, data_le in onie_tlv_parse_table() [all...] |
/kernel/linux/linux-5.10/drivers/rtc/ |
H A D | nvmem.c | 3 * RTC subsystem, nvmem interface 10 #include <linux/nvmem-consumer.h> 19 static const char nvram_warning[] = "Deprecated ABI, please use nvmem"; 42 struct nvmem_device *nvmem, size_t size) in rtc_nvram_register() 52 rtc->nvram->private = nvmem; in rtc_nvram_register() 78 * New ABI, uses nvmem 83 struct nvmem_device *nvmem; in rtc_nvmem_register() local 90 nvmem = devm_nvmem_register(rtc->dev.parent, nvmem_config); in rtc_nvmem_register() 91 if (IS_ERR(nvmem)) in rtc_nvmem_register() 92 return PTR_ERR(nvmem); in rtc_nvmem_register() 41 rtc_nvram_register(struct rtc_device *rtc, struct nvmem_device *nvmem, size_t size) rtc_nvram_register() argument [all...] |
/kernel/linux/linux-6.6/drivers/rtc/ |
H A D | nvmem.c | 3 * RTC subsystem, nvmem interface 10 #include <linux/nvmem-consumer.h> 17 struct nvmem_device *nvmem; in devm_rtc_nvmem_register() local 24 nvmem = devm_nvmem_register(dev, nvmem_config); in devm_rtc_nvmem_register() 25 if (IS_ERR(nvmem)) in devm_rtc_nvmem_register() 26 dev_err(dev, "failed to register nvmem device for RTC\n"); in devm_rtc_nvmem_register() 28 return PTR_ERR_OR_ZERO(nvmem); in devm_rtc_nvmem_register()
|
/kernel/linux/linux-5.10/drivers/soc/atmel/ |
H A D | sfr.c | 10 #include <linux/nvmem-provider.h> 46 struct nvmem_device *nvmem; in atmel_sfr_probe() local 64 nvmem = devm_nvmem_register(dev, &atmel_sfr_nvmem_config); in atmel_sfr_probe() 65 if (IS_ERR(nvmem)) { in atmel_sfr_probe() 66 dev_err(dev, "error registering nvmem config\n"); in atmel_sfr_probe() 67 return PTR_ERR(nvmem); in atmel_sfr_probe()
|
/kernel/linux/linux-6.6/drivers/soc/atmel/ |
H A D | sfr.c | 10 #include <linux/nvmem-provider.h> 45 struct nvmem_device *nvmem; in atmel_sfr_probe() local 63 nvmem = devm_nvmem_register(dev, &atmel_sfr_nvmem_config); in atmel_sfr_probe() 64 if (IS_ERR(nvmem)) { in atmel_sfr_probe() 65 dev_err(dev, "error registering nvmem config\n"); in atmel_sfr_probe() 66 return PTR_ERR(nvmem); in atmel_sfr_probe()
|
/kernel/linux/linux-5.10/drivers/soc/ti/ |
H A D | pm33xx.c | 17 #include <linux/nvmem-consumer.h> 278 struct nvmem_device *nvmem; in am33xx_pm_begin() local 281 nvmem = devm_nvmem_device_get(&omap_rtc->dev, in am33xx_pm_begin() 283 if (!IS_ERR(nvmem)) in am33xx_pm_begin() 284 nvmem_device_write(nvmem, RTC_SCRATCH_MAGIC_REG * 4, 4, in am33xx_pm_begin() 308 struct nvmem_device *nvmem; in am33xx_pm_end() local 310 nvmem = devm_nvmem_device_get(&omap_rtc->dev, "omap_rtc_scratch0"); in am33xx_pm_end() 311 if (IS_ERR(nvmem)) in am33xx_pm_end() 329 nvmem_device_write(nvmem, RTC_SCRATCH_MAGIC_REG * 4, 4, in am33xx_pm_end() 442 struct nvmem_device *nvmem; in am33xx_pm_rtc_setup() local [all...] |
/kernel/linux/linux-6.6/drivers/soc/ti/ |
H A D | pm33xx.c | 17 #include <linux/nvmem-consumer.h> 276 struct nvmem_device *nvmem; in am33xx_pm_begin() local 279 nvmem = devm_nvmem_device_get(&omap_rtc->dev, in am33xx_pm_begin() 281 if (!IS_ERR(nvmem)) in am33xx_pm_begin() 282 nvmem_device_write(nvmem, RTC_SCRATCH_MAGIC_REG * 4, 4, in am33xx_pm_begin() 306 struct nvmem_device *nvmem; in am33xx_pm_end() local 308 nvmem = devm_nvmem_device_get(&omap_rtc->dev, "omap_rtc_scratch0"); in am33xx_pm_end() 309 if (IS_ERR(nvmem)) in am33xx_pm_end() 327 nvmem_device_write(nvmem, RTC_SCRATCH_MAGIC_REG * 4, 4, in am33xx_pm_end() 440 struct nvmem_device *nvmem; in am33xx_pm_rtc_setup() local [all...] |