/linux-master/drivers/rtc/ |
H A D | nvmem.c | 3 * RTC subsystem, nvmem interface 10 #include <linux/nvmem-consumer.h> 17 struct nvmem_device *nvmem; local 25 nvmem = devm_nvmem_register(dev, nvmem_config); 26 if (IS_ERR(nvmem)) 27 dev_err(dev, "failed to register nvmem device for RTC\n"); 29 return PTR_ERR_OR_ZERO(nvmem);
|
/linux-master/drivers/nvmem/ |
H A D | core.c | 3 * nvmem framework core. 16 #include <linux/nvmem-consumer.h> 17 #include <linux/nvmem-provider.h> 37 struct nvmem_device *nvmem; member in struct:nvmem_cell_entry 58 static int __nvmem_reg_read(struct nvmem_device *nvmem, unsigned int offset, argument 61 if (nvmem->reg_read) 62 return nvmem->reg_read(nvmem->priv, offset, val, bytes); 67 static int __nvmem_reg_write(struct nvmem_device *nvmem, unsigned int offset, argument 72 if (nvmem 82 nvmem_access_with_keepouts(struct nvmem_device *nvmem, unsigned int offset, void *val, size_t bytes, int write) argument 146 nvmem_reg_read(struct nvmem_device *nvmem, unsigned int offset, void *val, size_t bytes) argument 155 nvmem_reg_write(struct nvmem_device *nvmem, unsigned int offset, void *val, size_t bytes) argument 180 struct nvmem_device *nvmem = to_nvmem_device(dev); local 197 struct nvmem_device *nvmem; local 237 struct nvmem_device *nvmem; local 272 nvmem_bin_attr_get_umode(struct nvmem_device *nvmem) argument 295 struct nvmem_device *nvmem = to_nvmem_device(dev); local 388 nvmem_sysfs_setup_compat(struct nvmem_device *nvmem, const struct nvmem_config *config) argument 423 nvmem_sysfs_remove_compat(struct nvmem_device *nvmem, const struct nvmem_config *config) argument 430 nvmem_populate_sysfs_cells(struct nvmem_device *nvmem) argument 495 nvmem_sysfs_setup_compat(struct nvmem_device *nvmem, const struct nvmem_config *config) argument 500 nvmem_sysfs_remove_compat(struct nvmem_device *nvmem, const struct nvmem_config *config) argument 509 struct nvmem_device *nvmem = to_nvmem_device(dev); local 535 nvmem_device_remove_all_cells(const struct nvmem_device *nvmem) argument 551 nvmem_cell_info_to_nvmem_cell_entry_nodup(struct nvmem_device *nvmem, const struct nvmem_cell_info *info, struct nvmem_cell_entry *cell) argument 581 nvmem_cell_info_to_nvmem_cell_entry(struct nvmem_device *nvmem, const struct nvmem_cell_info *info, struct nvmem_cell_entry *cell) argument 606 nvmem_add_one_cell(struct nvmem_device *nvmem, const struct nvmem_cell_info *info) argument 637 nvmem_add_cells(struct nvmem_device *nvmem, const struct nvmem_cell_info *info, int ncells) argument 678 nvmem_add_cells_from_table(struct nvmem_device *nvmem) argument 714 nvmem_find_cell_entry_by_name(struct nvmem_device *nvmem, const char *cell_id) argument 730 nvmem_validate_keepouts(struct nvmem_device *nvmem) argument 783 nvmem_add_cells_from_dt(struct nvmem_device *nvmem, struct device_node *np) argument 833 nvmem_add_cells_from_legacy_of(struct nvmem_device *nvmem) argument 838 nvmem_add_cells_from_fixed_layout(struct nvmem_device *nvmem) argument 897 struct nvmem_device *nvmem; local 1050 struct nvmem_device *nvmem; local 1069 nvmem_unregister(struct nvmem_device *nvmem) argument 1076 devm_nvmem_unregister(void *nvmem) argument 1095 struct nvmem_device *nvmem; local 1113 struct nvmem_device *nvmem = NULL; local 1138 __nvmem_device_put(struct nvmem_device *nvmem) argument 1159 struct nvmem_device *nvmem; local 1188 struct nvmem_device *nvmem; local 1219 struct nvmem_device **nvmem = res; local 1239 devm_nvmem_device_put(struct device *dev, struct nvmem_device *nvmem) argument 1255 nvmem_device_put(struct nvmem_device *nvmem) argument 1273 struct nvmem_device **ptr, *nvmem; local 1322 struct nvmem_device *nvmem; local 1362 nvmem_layout_module_put(struct nvmem_device *nvmem) argument 1370 nvmem_find_cell_entry_by_node(struct nvmem_device *nvmem, struct device_node *np) argument 1386 nvmem_layout_module_get_optional(struct nvmem_device *nvmem) argument 1413 struct nvmem_device *nvmem; local 1589 struct nvmem_device *nvmem = cell->entry->nvmem; local 1633 __nvmem_cell_read(struct nvmem_device *nvmem, struct nvmem_cell_entry *cell, void *buf, size_t *len, const char *id, int index) argument 1674 struct nvmem_device *nvmem = entry->nvmem; local 1698 struct nvmem_device *nvmem = cell->nvmem; local 1750 struct nvmem_device *nvmem = cell->nvmem; local 1992 nvmem_device_cell_read(struct nvmem_device *nvmem, struct nvmem_cell_info *info, void *buf) argument 2023 nvmem_device_cell_write(struct nvmem_device *nvmem, struct nvmem_cell_info *info, void *buf) argument 2051 nvmem_device_read(struct nvmem_device *nvmem, unsigned int offset, size_t bytes, void *buf) argument 2079 nvmem_device_write(struct nvmem_device *nvmem, unsigned int offset, size_t bytes, void *buf) argument 2166 nvmem_dev_name(struct nvmem_device *nvmem) argument 2179 nvmem_dev_size(struct nvmem_device *nvmem) argument [all...] |
H A D | internals.h | 7 #include <linux/nvmem-consumer.h> 8 #include <linux/nvmem-provider.h> 26 void (*fixup_dt_cell_info)(struct nvmem_device *nvmem, 41 int nvmem_populate_layout(struct nvmem_device *nvmem); 42 void nvmem_destroy_layout(struct nvmem_device *nvmem); 51 static inline int nvmem_populate_layout(struct nvmem_device *nvmem) argument 56 static inline void nvmem_destroy_layout(struct nvmem_device *nvmem) { } argument
|
H A D | Makefile | 3 # Makefile for nvmem drivers. 13 obj-$(CONFIG_NVMEM_APPLE_EFUSES) += nvmem-apple-efuses.o 14 nvmem-apple-efuses-y := apple-efuses.o 15 obj-$(CONFIG_NVMEM_BCM_OCOTP) += nvmem-bcm-ocotp.o 16 nvmem-bcm-ocotp-y := bcm-ocotp.o 19 obj-$(CONFIG_NVMEM_IMX_IIM) += nvmem-imx-iim.o 20 nvmem-imx-iim-y := imx-iim.o 21 obj-$(CONFIG_NVMEM_IMX_OCOTP) += nvmem-imx-ocotp.o 22 nvmem-imx-ocotp-y := imx-ocotp.o 23 obj-$(CONFIG_NVMEM_IMX_OCOTP_ELE) += nvmem [all...] |
H A D | layouts.c | 11 #include <linux/nvmem-consumer.h> 12 #include <linux/nvmem-provider.h> 49 .name = "nvmem-layout", 77 static int nvmem_layout_create_device(struct nvmem_device *nvmem, argument 89 layout->nvmem = nvmem; 90 nvmem->layout = layout; 95 dev->parent = &nvmem->dev; 118 static int nvmem_layout_bus_populate(struct nvmem_device *nvmem, argument 144 ret = nvmem_layout_create_device(nvmem, layout_d 153 of_nvmem_layout_get_container(struct nvmem_device *nvmem) argument 163 nvmem_populate_layout(struct nvmem_device *nvmem) argument 181 nvmem_destroy_layout(struct nvmem_device *nvmem) argument [all...] |
H A D | qoriq-efuse.c | 10 #include <linux/nvmem-provider.h> 43 struct nvmem_device *nvmem; local 56 nvmem = devm_nvmem_register(config.dev, &config); 58 return PTR_ERR_OR_ZERO(nvmem);
|
H A D | uniphier-efuse.c | 12 #include <linux/nvmem-provider.h> 36 struct nvmem_device *nvmem; local 56 nvmem = devm_nvmem_register(dev, &econfig); 58 return PTR_ERR_OR_ZERO(nvmem);
|
H A D | u-boot-env.c | 12 #include <linux/nvmem-consumer.h> 13 #include <linux/nvmem-provider.h> 26 struct nvmem_device *nvmem; member in struct:u_boot_env 94 struct nvmem_device *nvmem = priv->nvmem; local 122 nvmem_add_one_cell(nvmem, &info); 130 struct nvmem_device *nvmem = priv->nvmem; local 145 dev_size = nvmem_dev_size(nvmem); 153 bytes = nvmem_device_read(nvmem, [all...] |
H A D | lpc18xx_otp.c | 15 #include <linux/nvmem-provider.h> 68 struct nvmem_device *nvmem; local 83 nvmem = devm_nvmem_register(&pdev->dev, &lpc18xx_otp_nvmem_config); 85 return PTR_ERR_OR_ZERO(nvmem);
|
H A D | sec-qfprom.c | 8 #include <linux/nvmem-provider.h> 57 struct nvmem_device *nvmem; local 77 nvmem = devm_nvmem_register(dev, &econfig); 79 return PTR_ERR_OR_ZERO(nvmem);
|
H A D | meson-efuse.c | 11 #include <linux/nvmem-provider.h> 46 struct nvmem_device *nvmem; local 85 nvmem = devm_nvmem_register(&pdev->dev, econfig); 87 return PTR_ERR_OR_ZERO(nvmem);
|
H A D | mtk-efuse.c | 11 #include <linux/nvmem-provider.h> 48 static void mtk_efuse_fixup_dt_cell_info(struct nvmem_device *nvmem, argument 67 struct nvmem_device *nvmem; local 91 nvmem = devm_nvmem_register(dev, &econfig); 92 if (IS_ERR(nvmem)) 93 return PTR_ERR(nvmem);
|
H A D | layerscape-sfp.c | 13 #include <linux/nvmem-provider.h> 50 struct nvmem_device *nvmem; local 76 nvmem = devm_nvmem_register(&pdev->dev, &layerscape_sfp_nvmem_config); 78 return PTR_ERR_OR_ZERO(nvmem);
|
H A D | nintendo-otp.c | 19 #include <linux/nvmem-provider.h> 79 struct nvmem_device *nvmem; local 107 nvmem = devm_nvmem_register(dev, &config); 109 return PTR_ERR_OR_ZERO(nvmem);
|
H A D | imx-iim.c | 15 #include <linux/nvmem-provider.h> 100 struct nvmem_device *nvmem; local 127 nvmem = devm_nvmem_register(dev, &cfg); 129 return PTR_ERR_OR_ZERO(nvmem);
|
/linux-master/include/linux/ |
H A D | nvmem-provider.h | 3 * nvmem framework provider. 91 * @type: Type of the nvmem storage 102 * @layout: Fixed layout associated with this nvmem device. 104 * Note: A default "nvmem<id>" name will be assigned to the device if 119 void (*fixup_dt_cell_info)(struct nvmem_device *nvmem, 149 * that don't can't access the nvmem provided structure but wish to register 163 * @nvmem: The underlying NVMEM device 164 * @add_cells: Will be called if a nvmem device is found which 168 * A nvmem device can hold a well defined structure which can just be 170 * pairs. A nvmem layou 175 struct nvmem_device *nvmem; member in struct:nvmem_layout 215 nvmem_unregister(struct nvmem_device *nvmem) argument 225 nvmem_add_one_cell(struct nvmem_device *nvmem, const struct nvmem_cell_info *info) argument 254 of_nvmem_layout_get_container(struct nvmem_device *nvmem) argument [all...] |
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); 181 nvmem_device_put(struct nvmem_device *nvmem) argument 185 devm_nvmem_device_put(struct device *dev, struct nvmem_device *nvmem) argument 190 nvmem_device_cell_read(struct nvmem_device *nvmem, struct nvmem_cell_info *info, void *buf) argument 197 nvmem_device_cell_write(struct nvmem_device *nvmem, struct nvmem_cell_info *info, void *buf) argument 204 nvmem_device_read(struct nvmem_device *nvmem, unsigned int offset, size_t bytes, void *buf) argument 211 nvmem_device_write(struct nvmem_device *nvmem, unsigned int offset, size_t bytes, void *buf) argument 218 nvmem_dev_name(struct nvmem_device *nvmem) argument [all...] |
H A D | davinci_emac.h | 15 #include <linux/nvmem-consumer.h>
|
/linux-master/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) argument 65 ret = nvmem_device_read(nvmem, 0, sizeof(data_v1), &data_v1); 85 struct nvmem_device *nvmem = layout->nvmem; local 94 ret = nvmem_device_read(nvmem, 0, sizeof(hdr), &hdr); 110 ret = sl28vpd_v1_check_crc(dev, nvmem); 114 layout_np = of_nvmem_layout_get_container(nvmem); 127 ret = nvmem_add_one_cell(nvmem, [all...] |
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, argument 108 layout = of_nvmem_layout_get_container(nvmem); 129 ret = nvmem_add_one_cell(nvmem, &cell); 187 struct nvmem_device *nvmem = layout->nvmem; local 194 ret = nvmem_device_read(nvmem, 0, sizeof(hdr), &hdr); 215 ret = nvmem_device_read(nvmem, [all...] |
/linux-master/drivers/soc/atmel/ |
H A D | sfr.c | 10 #include <linux/nvmem-provider.h> 45 struct nvmem_device *nvmem; local 63 nvmem = devm_nvmem_register(dev, &atmel_sfr_nvmem_config); 64 if (IS_ERR(nvmem)) { 65 dev_err(dev, "error registering nvmem config\n"); 66 return PTR_ERR(nvmem);
|
/linux-master/drivers/soc/tegra/fuse/ |
H A D | fuse-tegra.c | 13 #include <linux/nvmem-consumer.h> 14 #include <linux/nvmem-provider.h> 143 struct nvmem_config nvmem; local 210 memset(&nvmem, 0, sizeof(nvmem)); 211 nvmem.dev = &pdev->dev; 212 nvmem.name = "fuse"; 213 nvmem.id = -1; 214 nvmem.owner = THIS_MODULE; 215 nvmem [all...] |
/linux-master/drivers/mtd/ubi/ |
H A D | nvmem.c | 8 #include <linux/nvmem-provider.h> 16 struct nvmem_device *nvmem; member in struct:ubi_nvmem 71 if (!of_get_child_by_name(np, "nvmem-layout")) 99 unv->nvmem = nvmem_register(&config); 100 if (IS_ERR(unv->nvmem)) { 101 ret = dev_err_probe(vi->dev, PTR_ERR(unv->nvmem), 132 nvmem_unregister(unv->nvmem); 178 nvmem_unregister(unv->nvmem);
|
H A D | Makefile | 10 obj-$(CONFIG_MTD_UBI_NVMEM) += nvmem.o
|
/linux-master/drivers/soc/ti/ |
H A D | pm33xx.c | 17 #include <linux/nvmem-consumer.h> 276 struct nvmem_device *nvmem; local 279 nvmem = devm_nvmem_device_get(&omap_rtc->dev, 281 if (!IS_ERR(nvmem)) 282 nvmem_device_write(nvmem, RTC_SCRATCH_MAGIC_REG * 4, 4, 306 struct nvmem_device *nvmem; local 308 nvmem = devm_nvmem_device_get(&omap_rtc->dev, "omap_rtc_scratch0"); 309 if (IS_ERR(nvmem)) 327 nvmem_device_write(nvmem, RTC_SCRATCH_MAGIC_REG * 4, 4, 440 struct nvmem_device *nvmem; local [all...] |