Skip to contentSkip to conversation

w1_therm: adding eeprom sysfs entry

PATCH In review Akira Shimahara 1 participant 1 message May 11, 2020 W1 dallas's 1-wire bus

lore
Share & tools
lore
#0 lore raw

PATCH v7 6/9 w1_therm: adding eeprom sysfs entry

The driver implement 2 hardware functions to access device RAM:
* copy_scratchpad
* recall_scratchpad
They act according to device specifications.

As EEPROM operations are not device dependent (all w1_therm can perform EEPROM read/write operation following the same protocol), it is removed from device families structures.

Updating Documentation/ABI/testing/sysfs-driver-w1_therm accordingly.

---
Changes in v5:
- All patch serie in one .c file
- Correcting some comments
- adding <linux/string.h> include
Changes in v6:
- Formatting code comments according to kernel-doc requirements Changes in v7:
- Formatting code comments and correcting comments mistakes

 .../ABI/testing/sysfs-driver-w1_therm         |  14 ++
 drivers/w1/slaves/w1_therm.c                  | 175 ++++++++++++------
 2 files changed, 132 insertions(+), 57 deletions(-)
Documentation/ABI/testing/sysfs-driver-w1_therm +14 -0
index 7ed95e9..8b7ee89 100644
@@ -1,3 +1,17 @@
+What:		/sys/bus/w1/devices/.../eeprom
+Date:		May 2020
+Contact:	Akira Shimahara <[email protected]>
+Description:
+		(WO) writing that file will either trigger a save of the
+		device data to its embedded EEPROM, either restore data
+		embedded in device EEPROM. Be aware that devices support
+		limited EEPROM writing cycles (typical 50k)
+			* 'save': save device RAM to EEPROM
+			* 'restore': restore EEPROM data in device RAM
+Users:		any user space application which wants to communicate with
+		w1_term device
+
+
 What:		/sys/bus/w1/devices/.../ext_power
 Date:		May 2020
 Contact:	Akira Shimahara <[email protected]>
drivers/w1/slaves/w1_therm.c +118 -57

312 lines not on this page · raw message

Signature · 1 line
2.26.2