Home
last modified time | relevance | path

Searched full:nvmem (Results 1 – 25 of 164) sorted by relevance

1234567

/Linux-v5.4/drivers/nvmem/
Dcore.c3 * nvmem framework core.
16 #include <linux/nvmem-consumer.h>
17 #include <linux/nvmem-provider.h>
20 #include "nvmem.h"
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()
[all …]
Dnvmem-sysfs.c5 #include "nvmem.h"
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()
[all …]
DMakefile3 # Makefile for nvmem drivers.
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
[all …]
DKconfig2 menuconfig NVMEM config
3 bool "NVMEM Support"
5 Support for NVMEM(Non Volatile Memory) devices like EEPROM, EFUSES...
7 This framework is designed to provide a generic interface to NVMEM
15 if NVMEM
18 bool "/sys/bus/nvmem/devices/*/nvmem (sysfs interface)"
22 Say Y here to add a sysfs interface for NVMEM.
25 read/write directly into nvmem.
36 will be called nvmem-imx-iim.
48 will be called nvmem-imx-ocotp.
[all …]
Dnvmem.h10 #include <linux/nvmem-consumer.h>
11 #include <linux/nvmem-provider.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
Dzynqmp_nvmem.c7 #include <linux/nvmem-provider.h>
16 struct nvmem_device *nvmem; member
42 .name = "zynqmp-nvmem",
50 { .compatible = "xlnx,zynqmp-nvmem-fw", },
73 priv->nvmem = devm_nvmem_register(dev, &econfig); in zynqmp_nvmem_probe()
75 return PTR_ERR_OR_ZERO(priv->nvmem); in zynqmp_nvmem_probe()
81 .name = "zynqmp-nvmem",
89 MODULE_DESCRIPTION("ZynqMP NVMEM driver");
/Linux-v5.4/Documentation/driver-api/
Dnvmem.rst4 NVMEM Subsystem
9 This document explains the NVMEM Framework along with the APIs provided,
14 *NVMEM* is the abbreviation for Non Volatile Memory layer. It is used to
18 Before this framework existed, NVMEM drivers like eeprom were stored in
33 NVMEM Providers
36 NVMEM provider refers to an entity that implements methods to initialize, read
39 2. Registering/Unregistering the NVMEM provider
42 A NVMEM provider can register with NVMEM core by supplying relevant
43 nvmem configuration to nvmem_register(), on success core would return a valid
46 nvmem_unregister(nvmem) is used to unregister a previously registered provider.
[all …]
/Linux-v5.4/Documentation/devicetree/bindings/nvmem/
Dnvmem-consumer.yaml4 $id: http://devicetree.org/schemas/nvmem/nvmem-consumer.yaml#
7 title: NVMEM (Non Volatile Memory) Consumer Device Tree Bindings
15 nvmem:
18 List of phandle to the nvmem providers.
20 nvmem-cells:
23 List of phandle to the nvmem data cells.
25 nvmem-names:
28 Names for the each nvmem provider.
30 nvmem-cell-names:
33 Names for each nvmem-cells specified.
[all …]
Dxlnx,zynqmp-nvmem.txt2 = 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";
Dqfprom.txt11 bindings/nvmem/nvmem.txt
27 Are device nodes which consume nvmem data cells.
33 nvmem-cells = <&tsens_calibration>;
34 nvmem-cell-names = "calibration";
Damlogic-efuse.txt10 bindings/nvmem/nvmem.txt
34 Are device nodes which consume nvmem data cells.
40 nvmem-cells = <&eth_mac>;
41 nvmem-cell-names = "eth_mac";
Dmtk-efuse.txt14 bindings/nvmem/nvmem.txt
31 Are device nodes which consume nvmem data cells.
37 nvmem-cells = <&thermal_calibration>;
38 nvmem-cell-names = "calibration";
Duniphier-efuse.txt11 bindings/nvmem/nvmem.txt
41 Are device nodes which consume nvmem data cells.
47 nvmem-cells = <&usb_mon>;
48 nvmem-cell-names = "usb_mon";
Dsc27xx-efuse.txt15 bindings/nvmem/nvmem.txt
44 Are device nodes which consume nvmem data cells.
50 nvmem-cells = <&thermal_calib>;
51 nvmem-cell-names = "calibration";
/Linux-v5.4/include/linux/
Dnvmem-consumer.h3 * nvmem framework consumer.
34 * @cell_name: Name of the nvmem cell as defined in the name field of
67 /* direct nvmem device read/write interface */
71 void nvmem_device_put(struct nvmem_device *nvmem);
72 void devm_nvmem_device_put(struct device *dev, struct nvmem_device *nvmem);
73 int nvmem_device_read(struct nvmem_device *nvmem, unsigned int offset,
75 int nvmem_device_write(struct nvmem_device *nvmem, unsigned int offset,
77 ssize_t nvmem_device_cell_read(struct nvmem_device *nvmem,
79 int nvmem_device_cell_write(struct nvmem_device *nvmem,
82 const char *nvmem_dev_name(struct nvmem_device *nvmem);
[all …]
Dnvmem-provider.h3 * nvmem framework provider.
30 * struct nvmem_config - NVMEM device configuration
36 * @cells: Optional array of pre-defined NVMEM cells.
38 * @type: Type of the nvmem storage
49 * Note: A default "nvmem<id>" name will be assigned to the device if
79 * struct nvmem_cell_table - NVMEM cell definitions for given provider
87 * that don't can't access the nvmem provided structure but wish to register
100 void nvmem_unregister(struct nvmem_device *nvmem);
105 int devm_nvmem_unregister(struct device *dev, struct nvmem_device *nvmem);
117 static inline void nvmem_unregister(struct nvmem_device *nvmem) {} in nvmem_unregister() argument
[all …]
/Linux-v5.4/Documentation/devicetree/bindings/power/reset/
Dnvmem-reboot-mode.txt1 NVMEM reboot mode driver
4 and stores it in a NVMEM cell named "reboot-mode". Then the bootloader
9 - compatible: should be "nvmem-reboot-mode".
10 - nvmem-cells: A phandle to the reboot mode provided by a nvmem device.
11 - nvmem-cell-names: Should be "reboot-mode".
18 compatible = "nvmem-reboot-mode";
19 nvmem-cells = <&reboot_mode>;
20 nvmem-cell-names = "reboot-mode";
/Linux-v5.4/drivers/rtc/
Dnvmem.c3 * 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() argument
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()
[all …]
/Linux-v5.4/Documentation/devicetree/bindings/net/
Dnixge.txt15 - nvmem-cells: Phandle of nvmem cell containing the MAC address
16 - nvmem-cell-names: Should be "address"
31 nvmem-cells = <&eth1_addr>;
32 nvmem-cell-names = "address";
54 nvmem-cells = <&eth1_addr>;
55 nvmem-cell-names = "address";
70 nvmem-cells = <&eth1_addr>;
71 nvmem-cell-names = "address";
Dti-bluetooth.txt44 - nvmem-cells: phandle to nvmem data cell that contains a 6 byte BD address
46 - nvmem-cell-names: "bd-address" (required when nvmem-cells is specified)
58 nvmem-cells = <&bd_address>;
59 nvmem-cell-names = "bd-address";
/Linux-v5.4/Documentation/ABI/stable/
Dsysfs-bus-nvmem1 What: /sys/bus/nvmem/devices/.../nvmem
6 This file allows user to read/write the raw NVMEM contents.
7 Permissions for write to this file depends on the nvmem
13 hexdump /sys/bus/nvmem/devices/qfprom0/nvmem
/Linux-v5.4/Documentation/devicetree/bindings/thermal/
Dqcom-tsens.txt25 - Refer to Documentation/devicetree/bindings/nvmem/nvmem.txt to know how to specify
26 nvmem cells
32 nvmem-cells = <&tsens_caldata>, <&tsens_calsel>;
33 nvmem-cell-names = "caldata", "calsel";
51 nvmem-cells = <&tsens_caldata>;
52 nvmem-cell-names = "calib";
/Linux-v5.4/Documentation/devicetree/bindings/watchdog/
Dzii,rave-sp-wdt.txt18 - 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";
/Linux-v5.4/drivers/soc/ti/
Dpm33xx.c17 #include <linux/nvmem-consumer.h>
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
[all …]
/Linux-v5.4/Documentation/devicetree/bindings/phy/
Duniphier-usb3-hsphy.txt30 - nvmem-cells: Phandles to nvmem cell that contains the trimming data.
33 - nvmem-cell-names: Should be the following names, which correspond to
34 each nvmem-cells.
64 nvmem-cell-names = "rterm", "sel_t", "hs_i";
65 nvmem-cells = <&usb_rterm0>, <&usb_sel_t0>,

1234567