/openbmc/linux/drivers/nvmem/ |
H A D | core.c | 37 struct nvmem_device *nvmem; member 61 static int __nvmem_reg_read(struct nvmem_device *nvmem, unsigned int offset, in __nvmem_reg_read() argument 64 if (nvmem->reg_read) in __nvmem_reg_read() 65 return nvmem->reg_read(nvmem->priv, offset, val, bytes); in __nvmem_reg_read() 70 static int __nvmem_reg_write(struct nvmem_device *nvmem, unsigned int offset, in __nvmem_reg_write() argument 75 if (nvmem->reg_write) { in __nvmem_reg_write() 76 gpiod_set_value_cansleep(nvmem->wp_gpio, 0); in __nvmem_reg_write() 77 ret = nvmem->reg_write(nvmem->priv, offset, val, bytes); in __nvmem_reg_write() 78 gpiod_set_value_cansleep(nvmem->wp_gpio, 1); in __nvmem_reg_write() 85 static int nvmem_access_with_keepouts(struct nvmem_device *nvmem, in nvmem_access_with_keepouts() argument [all …]
|
H A D | Makefile | 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-imx-ocotp-ele.o 22 nvmem-imx-ocotp-ele-y := imx-ocotp-ele.o [all …]
|
H A D | u-boot-env.c | 26 struct nvmem_device *nvmem; member 94 struct nvmem_device *nvmem = priv->nvmem; in u_boot_env_add_cells() local 122 nvmem_add_one_cell(nvmem, &info); in u_boot_env_add_cells() 130 struct nvmem_device *nvmem = priv->nvmem; in u_boot_env_parse() local 145 dev_size = nvmem_dev_size(nvmem); in u_boot_env_parse() 153 bytes = nvmem_device_read(nvmem, 0, dev_size, buf); in u_boot_env_parse() 234 priv->nvmem = devm_nvmem_register(dev, &config); in u_boot_env_probe() 235 if (IS_ERR(priv->nvmem)) in u_boot_env_probe() 236 return PTR_ERR(priv->nvmem); in u_boot_env_probe()
|
H A D | Kconfig | 15 bool "/sys/bus/nvmem/devices/*/nvmem (sysfs interface)" 22 read/write directly into nvmem. 26 source "drivers/nvmem/layouts/Kconfig" 40 be called nvmem-apple-efuses. 52 will be called nvmem-bcm-ocotp. 72 will be called nvmem-imx-iim. 84 will be called nvmem-imx-ocotp. 204 will be called nvmem-mxs-ocotp. 216 will be called nvmem-nintendo-otp. 224 functions for QFPROM data to rest of the drivers via nvmem interface. [all …]
|
/openbmc/linux/include/linux/ |
H A D | nvmem-consumer.h | 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); 84 size_t nvmem_dev_size(struct nvmem_device *nvmem); 175 static inline void nvmem_device_put(struct nvmem_device *nvmem) in nvmem_device_put() argument 180 struct nvmem_device *nvmem) in devm_nvmem_device_put() argument [all …]
|
H A D | nvmem-provider.h | 119 void (*fixup_dt_cell_info)(struct nvmem_device *nvmem, 178 int (*add_cells)(struct device *dev, struct nvmem_device *nvmem); 188 void nvmem_unregister(struct nvmem_device *nvmem); 196 int nvmem_add_one_cell(struct nvmem_device *nvmem, 204 const void *nvmem_layout_get_match_data(struct nvmem_device *nvmem, 214 static inline void nvmem_unregister(struct nvmem_device *nvmem) {} in nvmem_unregister() argument 224 static inline int nvmem_add_one_cell(struct nvmem_device *nvmem, in nvmem_add_one_cell() argument 238 nvmem_layout_get_match_data(struct nvmem_device *nvmem, in nvmem_layout_get_match_data() argument
|
/openbmc/linux/arch/arm64/boot/dts/freescale/ |
H A D | fsl-ls1028a-kontron-kbox-a-230-ls.dts | 59 nvmem-cells = <&base_mac_address 2>; 60 nvmem-cell-names = "mac-address"; 65 nvmem-cells = <&base_mac_address 3>; 66 nvmem-cell-names = "mac-address"; 87 nvmem-cells = <&base_mac_address 4>; 88 nvmem-cell-names = "mac-address"; 97 nvmem-cells = <&base_mac_address 5>; 98 nvmem-cell-names = "mac-address"; 107 nvmem-cells = <&base_mac_address 6>; 108 nvmem-cell-names = "mac-address"; [all …]
|
H A D | fsl-ls1028a-kontron-sl28-var2.dts | 39 nvmem-cells = <&base_mac_address 2>; 40 nvmem-cell-names = "mac-address"; 45 nvmem-cells = <&base_mac_address 3>; 46 nvmem-cell-names = "mac-address"; 59 nvmem-cells = <&base_mac_address 0>; 60 nvmem-cell-names = "mac-address"; 69 nvmem-cells = <&base_mac_address 1>; 70 nvmem-cell-names = "mac-address";
|
/openbmc/linux/Documentation/devicetree/bindings/nvmem/ |
H A D | xlnx,zynqmp-nvmem.txt | 2 = Zynq UltraScale+ MPSoC nvmem firmware driver binding = 8 - compatible: should be "xlnx,zynqmp-nvmem-fw" 12 bindings/nvmem/nvmem.txt 23 compatible = "xlnx,zynqmp-nvmem-fw"; 36 Are device nodes which consume nvmem data cells. 42 nvmem-cells = <&soc_revision>; 43 nvmem-cell-names = "soc_revision";
|
H A D | sprd-efuse.txt | 12 bindings/nvmem/nvmem.txt 30 Are device nodes which consume nvmem data cells. 37 nvmem-cells = <&thermal_calib>; 38 nvmem-cell-names = "calibration";
|
H A D | sc27xx-efuse.txt | 15 bindings/nvmem/nvmem.txt 44 Are device nodes which consume nvmem data cells. 50 nvmem-cells = <&thermal_calib>; 51 nvmem-cell-names = "calibration";
|
/openbmc/linux/drivers/soc/tegra/fuse/ |
H A D | fuse-tegra.c | 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.cells = fuse->soc->cells; in tegra_fuse_probe() 161 nvmem.ncells = fuse->soc->num_cells; in tegra_fuse_probe() 162 nvmem.keepout = fuse->soc->keepouts; in tegra_fuse_probe() 163 nvmem.nkeepout = fuse->soc->num_keepouts; in tegra_fuse_probe() [all …]
|
/openbmc/linux/Documentation/driver-api/ |
H A D | nvmem.rst | 41 nvmem configuration to nvmem_register(), on success core would return a valid 44 nvmem_unregister(nvmem) is used to unregister a previously registered provider. 62 Users of board files can define and register nvmem cells using the 81 Additionally it is possible to create nvmem cell lookup entries and register 82 them with the nvmem framework from machine code as shown in the example below:: 114 `*nvmem_cell_get()` apis will get a reference to nvmem cell for a given id, 130 void nvmem_device_put(struct nvmem_device *nvmem); 131 int nvmem_device_read(struct nvmem_device *nvmem, unsigned int offset, 133 int nvmem_device_write(struct nvmem_device *nvmem, unsigned int offset, 135 int nvmem_device_cell_read(struct nvmem_device *nvmem, [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/net/ |
H A D | nixge.txt | 15 - nvmem-cells: Phandle of nvmem cell containing the MAC address 16 - nvmem-cell-names: Should be "address" 31 nvmem-cells = <ð1_addr>; 32 nvmem-cell-names = "address"; 54 nvmem-cells = <ð1_addr>; 55 nvmem-cell-names = "address"; 70 nvmem-cells = <ð1_addr>; 71 nvmem-cell-names = "address";
|
/openbmc/linux/drivers/soc/ti/ |
H 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() 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 465 nvmem = devm_nvmem_device_get(&omap_rtc->dev, in am33xx_pm_rtc_setup() [all …]
|
/openbmc/linux/Documentation/ABI/stable/ |
H A D | sysfs-bus-nvmem | 1 What: /sys/bus/nvmem/devices/.../nvmem 7 Permissions for write to this file depends on the nvmem 14 hexdump /sys/bus/nvmem/devices/qfprom0/nvmem
|
/openbmc/linux/drivers/nvmem/layouts/ |
H 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() 83 static int sl28vpd_add_cells(struct device *dev, struct nvmem_device *nvmem) in sl28vpd_add_cells() argument 92 ret = nvmem_device_read(nvmem, 0, sizeof(hdr), &hdr); in sl28vpd_add_cells() 108 ret = sl28vpd_v1_check_crc(dev, nvmem); in sl28vpd_add_cells() 112 layout_np = of_nvmem_layout_get_container(nvmem); in sl28vpd_add_cells() 125 ret = nvmem_add_one_cell(nvmem, &info); in sl28vpd_add_cells()
|
H 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() 185 static int onie_tlv_parse_table(struct device *dev, struct nvmem_device *nvmem) in onie_tlv_parse_table() argument 192 ret = nvmem_device_read(nvmem, 0, sizeof(hdr), &hdr); in onie_tlv_parse_table() 213 ret = nvmem_device_read(nvmem, 0, table_len, table); in onie_tlv_parse_table() 221 ret = onie_tlv_add_cells(dev, nvmem, data_len, data); in onie_tlv_parse_table()
|
/openbmc/linux/drivers/rtc/ |
H 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()
|
/openbmc/linux/Documentation/devicetree/bindings/watchdog/ |
H A D | zii,rave-sp-wdt.txt | 18 - wdt-timeout: Two byte nvmem cell specified as per 19 Documentation/devicetree/bindings/nvmem/nvmem.txt 35 nvmem-cells = <&wdt_timeout>; 36 nvmem-cell-names = "wdt-timeout";
|
/openbmc/linux/arch/arm/boot/dts/broadcom/ |
H A D | bcm47094-luxul-xbr-4500.dts | 30 #nvmem-cell-cells = <1>; 69 nvmem-cells = <&et0macaddr 0>; 70 nvmem-cell-names = "mac-address"; 87 nvmem-cells = <&et0macaddr 1>; 88 nvmem-cell-names = "mac-address";
|
H A D | bcm47094-luxul-abr-4500.dts | 30 #nvmem-cell-cells = <1>; 69 nvmem-cells = <&et0macaddr 0>; 70 nvmem-cell-names = "mac-address"; 87 nvmem-cells = <&et0macaddr 1>; 88 nvmem-cell-names = "mac-address";
|
H A D | bcm47094-luxul-xwr-3100.dts | 30 #nvmem-cell-cells = <1>; 109 nvmem-cells = <&et0macaddr 0>; 110 nvmem-cell-names = "mac-address"; 143 nvmem-cells = <&et0macaddr 5>; 144 nvmem-cell-names = "mac-address";
|
/openbmc/linux/arch/arm64/boot/dts/marvell/ |
H A D | armada-3720-gl-mv1000.dts | 184 nvmem-cells = <&macaddr_factory_6>; 185 nvmem-cell-names = "mac-address"; 193 nvmem-cells = <&macaddr_factory_6>; 194 nvmem-cell-names = "mac-address"; 216 nvmem-cells = <&macaddr_factory_0>; 217 nvmem-cell-names = "mac-address"; 228 compatible = "nvmem-cells";
|
/openbmc/linux/drivers/soc/atmel/ |
H 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()
|