/drivers/nvmem/ |
D | core.c | 29 struct nvmem_device *nvmem; member 45 static int nvmem_reg_read(struct nvmem_device *nvmem, unsigned int offset, in nvmem_reg_read() argument 48 if (nvmem->reg_read) in nvmem_reg_read() 49 return nvmem->reg_read(nvmem->priv, offset, val, bytes); in nvmem_reg_read() 54 static int nvmem_reg_write(struct nvmem_device *nvmem, unsigned int offset, in nvmem_reg_write() argument 57 if (nvmem->reg_write) in nvmem_reg_write() 58 return nvmem->reg_write(nvmem->priv, offset, val, bytes); in nvmem_reg_write() 65 struct nvmem_device *nvmem = to_nvmem_device(dev); in nvmem_release() local 67 ida_simple_remove(&nvmem_ida, nvmem->id); in nvmem_release() 68 kfree(nvmem); in nvmem_release() [all …]
|
D | nvmem-sysfs.c | 21 struct nvmem_device *nvmem = to_nvmem_device(dev); in type_show() local 23 return sprintf(buf, "%s\n", nvmem_type_str[nvmem->type]); in type_show() 38 struct nvmem_device *nvmem; in bin_attr_nvmem_read() local 45 nvmem = to_nvmem_device(dev); in bin_attr_nvmem_read() 48 if (pos >= nvmem->size) in bin_attr_nvmem_read() 51 if (count < nvmem->word_size) in bin_attr_nvmem_read() 54 if (pos + count > nvmem->size) in bin_attr_nvmem_read() 55 count = nvmem->size - pos; in bin_attr_nvmem_read() 57 count = round_down(count, nvmem->word_size); in bin_attr_nvmem_read() 59 rc = nvmem->reg_read(nvmem->priv, pos, buf, count); in bin_attr_nvmem_read() [all …]
|
D | Makefile | 10 nvmem_sysfs-y := nvmem-sysfs.o 13 obj-$(CONFIG_NVMEM_BCM_OCOTP) += nvmem-bcm-ocotp.o 14 nvmem-bcm-ocotp-y := bcm-ocotp.o 15 obj-$(CONFIG_NVMEM_IMX_IIM) += nvmem-imx-iim.o 16 nvmem-imx-iim-y := imx-iim.o 17 obj-$(CONFIG_NVMEM_IMX_OCOTP) += nvmem-imx-ocotp.o 18 nvmem-imx-ocotp-y := imx-ocotp.o 19 obj-$(CONFIG_NVMEM_IMX_OCOTP_SCU) += nvmem-imx-ocotp-scu.o 20 nvmem-imx-ocotp-scu-y := imx-ocotp-scu.o 25 obj-$(CONFIG_NVMEM_MXS_OCOTP) += nvmem-mxs-ocotp.o [all …]
|
D | nvmem.h | 37 struct nvmem_device *nvmem, 39 int nvmem_sysfs_setup_compat(struct nvmem_device *nvmem, 41 void nvmem_sysfs_remove_compat(struct nvmem_device *nvmem, 45 struct nvmem_device *nvmem, in nvmem_sysfs_get_groups() argument 51 static inline int nvmem_sysfs_setup_compat(struct nvmem_device *nvmem, in nvmem_sysfs_setup_compat() argument 56 static inline void nvmem_sysfs_remove_compat(struct nvmem_device *nvmem, in nvmem_sysfs_remove_compat() argument
|
D | Kconfig | 18 bool "/sys/bus/nvmem/devices/*/nvmem (sysfs interface)" 25 read/write directly into nvmem. 36 will be called nvmem-imx-iim. 48 will be called nvmem-imx-ocotp. 87 will be called nvmem-mxs-ocotp. 106 functions for QFPROM data to rest of the drivers via nvmem interface. 132 will be called nvmem-bcm-ocotp. 142 will be called nvmem-stm32-romem. 163 will be called nvmem-uniphier-efuse. 174 be called nvmem-vf610-ocotp. [all …]
|
D | sunxi_sid.c | 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()
|
D | mxs-ocotp.c | 33 struct nvmem_device *nvmem; member 168 otp->nvmem = devm_nvmem_register(dev, &ocotp_config); in mxs_ocotp_probe() 169 if (IS_ERR(otp->nvmem)) { in mxs_ocotp_probe() 170 ret = PTR_ERR(otp->nvmem); in mxs_ocotp_probe()
|
D | zynqmp_nvmem.c | 16 struct nvmem_device *nvmem; member 73 priv->nvmem = devm_nvmem_register(dev, &econfig); in zynqmp_nvmem_probe() 75 return PTR_ERR_OR_ZERO(priv->nvmem); in zynqmp_nvmem_probe()
|
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()
|
D | lpc18xx_otp.c | 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()
|
D | qfprom.c | 55 struct nvmem_device *nvmem; in qfprom_probe() local 71 nvmem = devm_nvmem_register(dev, &econfig); in qfprom_probe() 73 return PTR_ERR_OR_ZERO(nvmem); in qfprom_probe()
|
D | meson-efuse.c | 40 struct nvmem_device *nvmem; in meson_efuse_probe() local 85 nvmem = devm_nvmem_register(&pdev->dev, econfig); in meson_efuse_probe() 87 return PTR_ERR_OR_ZERO(nvmem); in meson_efuse_probe()
|
D | mtk-efuse.c | 48 struct nvmem_device *nvmem; in mtk_efuse_probe() local 68 nvmem = devm_nvmem_register(dev, &econfig); in mtk_efuse_probe() 70 return PTR_ERR_OR_ZERO(nvmem); in mtk_efuse_probe()
|
D | imx-iim.c | 102 struct nvmem_device *nvmem; in imx_iim_probe() local 133 nvmem = devm_nvmem_register(dev, &cfg); in imx_iim_probe() 135 return PTR_ERR_OR_ZERO(nvmem); in imx_iim_probe()
|
D | lpc18xx_eeprom.c | 48 struct nvmem_device *nvmem; member 236 eeprom->nvmem = devm_nvmem_register(dev, &lpc18xx_nvmem_config); in lpc18xx_eeprom_probe() 237 if (IS_ERR(eeprom->nvmem)) { in lpc18xx_eeprom_probe() 238 ret = PTR_ERR(eeprom->nvmem); in lpc18xx_eeprom_probe()
|
D | sc27xx-efuse.c | 188 struct nvmem_device *nvmem; in sc27xx_efuse_probe() local 232 nvmem = devm_nvmem_register(&pdev->dev, &econfig); in sc27xx_efuse_probe() 233 if (IS_ERR(nvmem)) { in sc27xx_efuse_probe() 236 return PTR_ERR(nvmem); in sc27xx_efuse_probe()
|
D | snvs_lpgpr.c | 95 struct nvmem_device *nvmem; in snvs_lpgpr_probe() local 131 nvmem = devm_nvmem_register(dev, cfg); in snvs_lpgpr_probe() 133 return PTR_ERR_OR_ZERO(nvmem); in snvs_lpgpr_probe()
|
D | imx-ocotp-scu.c | 136 struct nvmem_device *nvmem; in imx_scu_ocotp_probe() local 152 nvmem = devm_nvmem_register(dev, &imx_scu_ocotp_nvmem_config); in imx_scu_ocotp_probe() 154 return PTR_ERR_OR_ZERO(nvmem); in imx_scu_ocotp_probe()
|
D | bcm-ocotp.c | 259 struct nvmem_device *nvmem; in bcm_otpc_probe() local 306 nvmem = devm_nvmem_register(dev, &bcm_otpc_nvmem_config); in bcm_otpc_probe() 307 if (IS_ERR(nvmem)) { in bcm_otpc_probe() 309 return PTR_ERR(nvmem); in bcm_otpc_probe()
|
D | vf610-ocotp.c | 93 struct nvmem_device *nvmem; member 240 ocotp_dev->nvmem = devm_nvmem_register(dev, &ocotp_config); in vf610_ocotp_probe() 242 return PTR_ERR_OR_ZERO(ocotp_dev->nvmem); in vf610_ocotp_probe()
|
D | rave-sp-eeprom.c | 294 struct nvmem_device *nvmem; in rave_sp_eeprom_probe() local 337 nvmem = devm_nvmem_register(dev, &config); in rave_sp_eeprom_probe() 339 return PTR_ERR_OR_ZERO(nvmem); in rave_sp_eeprom_probe()
|
D | meson-mx-efuse.c | 47 struct nvmem_device *nvmem; member 229 efuse->nvmem = devm_nvmem_register(&pdev->dev, &efuse->config); in meson_mx_efuse_probe() 231 return PTR_ERR_OR_ZERO(efuse->nvmem); in meson_mx_efuse_probe()
|
/drivers/soc/ti/ |
D | pm33xx.c | 250 struct nvmem_device *nvmem; in am33xx_pm_begin() local 253 nvmem = devm_nvmem_device_get(&omap_rtc->dev, in am33xx_pm_begin() 255 if (!IS_ERR(nvmem)) in am33xx_pm_begin() 256 nvmem_device_write(nvmem, RTC_SCRATCH_MAGIC_REG * 4, 4, in am33xx_pm_begin() 278 struct nvmem_device *nvmem; in am33xx_pm_end() local 280 nvmem = devm_nvmem_device_get(&omap_rtc->dev, "omap_rtc_scratch0"); in am33xx_pm_end() 281 if (IS_ERR(nvmem)) in am33xx_pm_end() 299 nvmem_device_write(nvmem, RTC_SCRATCH_MAGIC_REG * 4, 4, in am33xx_pm_end() 410 struct nvmem_device *nvmem; in am33xx_pm_rtc_setup() local 421 nvmem = devm_nvmem_device_get(&omap_rtc->dev, in am33xx_pm_rtc_setup() [all …]
|
/drivers/rtc/ |
D | nvmem.c | 42 struct nvmem_device *nvmem, size_t size) in rtc_nvram_register() argument 52 rtc->nvram->private = nvmem; in rtc_nvram_register() 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() 96 rtc_nvram_register(rtc, nvmem, nvmem_config->size); in rtc_nvmem_register()
|
/drivers/misc/eeprom/ |
D | at25.c | 33 struct nvmem_device *nvmem; member 365 at25->nvmem = devm_nvmem_register(&spi->dev, &at25->nvmem_config); in at25_probe() 366 if (IS_ERR(at25->nvmem)) in at25_probe() 367 return PTR_ERR(at25->nvmem); in at25_probe()
|