| /drivers/nvmem/ |
| A D | core.c | 267 if (!nvmem->reg_write || nvmem->read_only) in bin_attr_nvmem_write() 429 nvmem->eeprom.size = nvmem->size; in nvmem_sysfs_setup_compat() 433 nvmem->eeprom.private = &nvmem->dev; in nvmem_sysfs_setup_compat() 582 cell->nvmem = nvmem; in nvmem_cell_info_to_nvmem_cell_entry_nodup() 828 nvmem->fixup_dt_cell_info(nvmem, &info); in nvmem_add_cells_from_dt() 914 nvmem = kzalloc(sizeof(*nvmem), GFP_KERNEL); in nvmem_register() 1225 if (WARN_ON(!nvmem || !*nvmem)) in devm_nvmem_device_match() 1686 struct nvmem_device *nvmem = entry->nvmem; in nvmem_cell_read() local 1710 struct nvmem_device *nvmem = cell->nvmem; in nvmem_cell_prepare_write_buffer() local 1762 struct nvmem_device *nvmem = cell->nvmem; in __nvmem_cell_entry_write() local [all …]
|
| A D | Makefile | 14 nvmem-apple-efuses-y := apple-efuses.o 16 apple_nvmem_spmi-y := apple-spmi-nvmem.o 18 nvmem-bcm-ocotp-y := bcm-ocotp.o 22 nvmem-imx-iim-y := imx-iim.o 24 nvmem-imx-ocotp-y := imx-ocotp.o 32 nvmem-lan9662-otpc-y := lan9662-otpc.o 40 nvmem-max77759-y := max77759-nvmem.o 50 nvmem-mxs-ocotp-y := mxs-ocotp.o 60 nvmem-rcar-efuse-y := rcar-efuse.o 62 nvmem-rmem-y := rmem.o [all …]
|
| A D | layouts.c | 79 static int nvmem_layout_create_device(struct nvmem_device *nvmem, in nvmem_layout_create_device() argument 91 layout->nvmem = nvmem; in nvmem_layout_create_device() 92 nvmem->layout = layout; in nvmem_layout_create_device() 97 dev->parent = &nvmem->dev; in nvmem_layout_create_device() 146 ret = nvmem_layout_create_device(nvmem, layout_dn); in nvmem_layout_bus_populate() 165 int nvmem_populate_layout(struct nvmem_device *nvmem) in nvmem_populate_layout() argument 170 layout_dn = of_nvmem_layout_get_container(nvmem); in nvmem_populate_layout() 176 ret = nvmem_layout_bus_populate(nvmem, layout_dn); in nvmem_populate_layout() 183 void nvmem_destroy_layout(struct nvmem_device *nvmem) in nvmem_destroy_layout() argument 187 if (!nvmem->layout) in nvmem_destroy_layout() [all …]
|
| A D | max77759-nvmem.c | 36 struct max77759_nvmem *nvmem = priv; in max77759_nvmem_reg_read() local 48 ret = max77759_maxq_command(nvmem->max77759, cmd, rsp); in max77759_nvmem_reg_read() 53 dev_warn(nvmem->dev, "protocol error (read)\n"); in max77759_nvmem_reg_read() 65 struct max77759_nvmem *nvmem = priv; in max77759_nvmem_reg_write() local 84 dev_warn(nvmem->dev, "protocol error (write)\n"); in max77759_nvmem_reg_write() 105 struct max77759_nvmem *nvmem; in max77759_nvmem_probe() local 107 nvmem = devm_kzalloc(&pdev->dev, sizeof(*nvmem), GFP_KERNEL); in max77759_nvmem_probe() 108 if (!nvmem) in max77759_nvmem_probe() 111 nvmem->dev = &pdev->dev; in max77759_nvmem_probe() 112 nvmem->max77759 = dev_get_drvdata(pdev->dev.parent); in max77759_nvmem_probe() [all …]
|
| A D | internals.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) in nvmem_populate_layout() argument 56 static inline void nvmem_destroy_layout(struct nvmem_device *nvmem) { } in nvmem_destroy_layout() argument
|
| A D | Kconfig | 16 bool "/sys/bus/nvmem/devices/*/nvmem (sysfs interface)" 23 read/write directly into nvmem. 27 source "drivers/nvmem/layouts/Kconfig" 40 be called nvmem-apple-efuses. 53 will be called apple-nvmem-spmi. 65 will be called nvmem-bcm-ocotp. 85 will be called nvmem-imx-iim. 97 will be called nvmem-imx-ocotp. 293 will be called nvmem-rmem. 364 called nvmem-stm32-romem. [all …]
|
| A D | u-boot-env.c | 18 struct nvmem_device *nvmem; member 73 priv->nvmem = devm_nvmem_register(dev, &config); in u_boot_env_probe() 74 if (IS_ERR(priv->nvmem)) in u_boot_env_probe() 75 return PTR_ERR(priv->nvmem); in u_boot_env_probe() 77 return u_boot_env_parse(dev, priv->nvmem, priv->format); in u_boot_env_probe()
|
| A D | mtk-efuse.c | 48 static void mtk_efuse_fixup_dt_cell_info(struct nvmem_device *nvmem, in mtk_efuse_fixup_dt_cell_info() argument 67 struct nvmem_device *nvmem; in mtk_efuse_probe() local 91 nvmem = devm_nvmem_register(dev, &econfig); in mtk_efuse_probe() 92 if (IS_ERR(nvmem)) in mtk_efuse_probe() 93 return PTR_ERR(nvmem); in mtk_efuse_probe()
|
| A D | sunxi_sid.c | 128 struct nvmem_device *nvmem; in sunxi_sid_probe() local 167 nvmem = devm_nvmem_register(dev, nvmem_cfg); in sunxi_sid_probe() 168 if (IS_ERR(nvmem)) in sunxi_sid_probe() 169 return PTR_ERR(nvmem); in sunxi_sid_probe() 179 platform_set_drvdata(pdev, nvmem); in sunxi_sid_probe()
|
| A D | rcar-efuse.c | 19 struct nvmem_device *nvmem; member 91 fuse->nvmem = devm_nvmem_register(dev, &config); in rcar_fuse_probe() 92 if (IS_ERR(fuse->nvmem)) in rcar_fuse_probe() 93 return dev_err_probe(dev, PTR_ERR(fuse->nvmem), in rcar_fuse_probe()
|
| A D | imx-ocotp-ele.c | 131 static void imx_ocotp_fixup_dt_cell_info(struct nvmem_device *nvmem, in imx_ocotp_fixup_dt_cell_info() argument 141 struct nvmem_device *nvmem; in imx_ele_ocotp_probe() local 167 nvmem = devm_nvmem_register(dev, &priv->config); in imx_ele_ocotp_probe() 168 if (IS_ERR(nvmem)) in imx_ele_ocotp_probe() 169 return PTR_ERR(nvmem); in imx_ele_ocotp_probe()
|
| A D | sunplus-ocotp.c | 160 struct nvmem_device *nvmem; in sp_ocotp_probe() local 192 nvmem = devm_nvmem_register(dev, &sp_ocotp_nvmem_config); in sp_ocotp_probe() 193 if (IS_ERR(nvmem)) { in sp_ocotp_probe() 194 ret = dev_err_probe(&pdev->dev, PTR_ERR(nvmem), in sp_ocotp_probe() 199 platform_set_drvdata(pdev, nvmem); in sp_ocotp_probe()
|
| A D | mxs-ocotp.c | 34 struct nvmem_device *nvmem; member 175 otp->nvmem = devm_nvmem_register(dev, &ocotp_config); in mxs_ocotp_probe() 176 if (IS_ERR(otp->nvmem)) in mxs_ocotp_probe() 177 return PTR_ERR(otp->nvmem); in mxs_ocotp_probe()
|
| A D | qoriq-efuse.c | 43 struct nvmem_device *nvmem; in qoriq_efuse_probe() local 56 nvmem = devm_nvmem_register(config.dev, &config); in qoriq_efuse_probe() 58 return PTR_ERR_OR_ZERO(nvmem); in qoriq_efuse_probe()
|
| A D | uniphier-efuse.c | 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()
|
| /drivers/soc/tegra/fuse/ |
| A D | fuse-tegra.c | 143 struct nvmem_config nvmem; in tegra_fuse_probe() local 210 memset(&nvmem, 0, sizeof(nvmem)); in tegra_fuse_probe() 211 nvmem.dev = &pdev->dev; in tegra_fuse_probe() 212 nvmem.name = "fuse"; in tegra_fuse_probe() 213 nvmem.id = -1; in tegra_fuse_probe() 220 nvmem.read_only = true; in tegra_fuse_probe() 221 nvmem.root_only = false; in tegra_fuse_probe() 224 nvmem.word_size = 4; in tegra_fuse_probe() 225 nvmem.stride = 4; in tegra_fuse_probe() 226 nvmem.priv = fuse; in tegra_fuse_probe() [all …]
|
| /drivers/soc/ti/ |
| A D | pm33xx.c | 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() 306 struct nvmem_device *nvmem; in am33xx_pm_end() local 309 if (IS_ERR(nvmem)) in am33xx_pm_end() 430 struct nvmem_device *nvmem; in am33xx_pm_rtc_setup() local 455 nvmem = devm_nvmem_device_get(&omap_rtc->dev, in am33xx_pm_rtc_setup() 457 if (!IS_ERR(nvmem)) { in am33xx_pm_rtc_setup() 458 nvmem_device_read(nvmem, RTC_SCRATCH_MAGIC_REG * 4, in am33xx_pm_rtc_setup() 463 nvmem_device_write(nvmem, RTC_SCRATCH_MAGIC_REG * 4, in am33xx_pm_rtc_setup() [all …]
|
| /drivers/nvmem/layouts/ |
| A D | sl28vpd.c | 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() 85 struct nvmem_device *nvmem = layout->nvmem; in sl28vpd_add_cells() local 94 ret = nvmem_device_read(nvmem, 0, sizeof(hdr), &hdr); in sl28vpd_add_cells() 110 ret = sl28vpd_v1_check_crc(dev, nvmem); in sl28vpd_add_cells() 114 layout_np = of_nvmem_layout_get_container(nvmem); in sl28vpd_add_cells() 127 ret = nvmem_add_one_cell(nvmem, &info); in sl28vpd_add_cells()
|
| A D | onie-tlv.c | 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() 187 struct nvmem_device *nvmem = layout->nvmem; in onie_tlv_parse_table() local 194 ret = nvmem_device_read(nvmem, 0, sizeof(hdr), &hdr); in onie_tlv_parse_table() 215 ret = nvmem_device_read(nvmem, 0, table_len, table); in onie_tlv_parse_table() 223 ret = onie_tlv_add_cells(dev, nvmem, data_len, data); in onie_tlv_parse_table()
|
| A D | u-boot-env.c | 54 static int u_boot_env_parse_cells(struct device *dev, struct nvmem_device *nvmem, uint8_t *buf, in u_boot_env_parse_cells() argument 83 nvmem_add_one_cell(nvmem, &info); in u_boot_env_parse_cells() 89 int u_boot_env_parse(struct device *dev, struct nvmem_device *nvmem, in u_boot_env_parse() argument 105 dev_size = nvmem_dev_size(nvmem); in u_boot_env_parse() 113 bytes = nvmem_device_read(nvmem, 0, dev_size, buf); in u_boot_env_parse() 159 err = u_boot_env_parse_cells(dev, nvmem, buf, data_offset, data_len); in u_boot_env_parse() 175 return u_boot_env_parse(dev, layout->nvmem, format); in u_boot_env_add_cells()
|
| /drivers/misc/keba/ |
| A D | cp500.c | 131 struct nvmem_device *nvmem; member 585 ret = nvmem_device_read(nvmem->base_nvmem, nvmem->offset + offset, in cp500_nvmem_read() 599 ret = nvmem_device_write(nvmem->base_nvmem, nvmem->offset + offset, in cp500_nvmem_write() 638 cp500->nvmem_cpu.nvmem = tmp; in cp500_nvmem_register() 648 cp500->nvmem_cpu.nvmem = NULL; in cp500_nvmem_register() 652 cp500->nvmem_user.nvmem = tmp; in cp500_nvmem_register() 661 if (cp500->nvmem_user.nvmem) { in cp500_nvmem_unregister() 665 if (cp500->nvmem_cpu.nvmem) { in cp500_nvmem_unregister() 696 struct nvmem_device *nvmem; in cp500_nvmem() local 713 if (IS_ERR_OR_NULL(nvmem)) in cp500_nvmem() [all …]
|
| /drivers/rtc/ |
| A D | nvmem.c | 17 struct nvmem_device *nvmem; in devm_rtc_nvmem_register() local 25 nvmem = devm_nvmem_register(dev, nvmem_config); in devm_rtc_nvmem_register() 26 if (IS_ERR(nvmem)) in devm_rtc_nvmem_register() 29 return PTR_ERR_OR_ZERO(nvmem); in devm_rtc_nvmem_register()
|
| /drivers/mtd/ubi/ |
| A D | nvmem.c | 15 struct nvmem_device *nvmem; member 99 unv->nvmem = nvmem_register(&config); in ubi_nvmem_add() 100 if (IS_ERR(unv->nvmem)) { in ubi_nvmem_add() 101 ret = dev_err_probe(vi->dev, PTR_ERR(unv->nvmem), in ubi_nvmem_add() 132 nvmem_unregister(unv->nvmem); in ubi_nvmem_remove() 178 nvmem_unregister(unv->nvmem); in ubi_nvmem_exit()
|
| /drivers/thunderbolt/ |
| A D | nvm.c | 431 struct nvmem_device *nvmem; in tb_nvm_add_active() local 446 nvmem = nvmem_register(&config); in tb_nvm_add_active() 447 if (IS_ERR(nvmem)) in tb_nvm_add_active() 448 return PTR_ERR(nvmem); in tb_nvm_add_active() 450 nvm->active = nvmem; in tb_nvm_add_active() 496 struct nvmem_device *nvmem; in tb_nvm_add_non_active() local 511 nvmem = nvmem_register(&config); in tb_nvm_add_non_active() 512 if (IS_ERR(nvmem)) in tb_nvm_add_non_active() 513 return PTR_ERR(nvmem); in tb_nvm_add_non_active() 515 nvm->non_active = nvmem; in tb_nvm_add_non_active()
|
| /drivers/soc/atmel/ |
| A D | sfr.c | 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() 66 return PTR_ERR(nvmem); in atmel_sfr_probe()
|