Skip to contentSkip to conversation

Documentation: hwmon: lm75: document sysfs interface

PATCH Superseded Chen-Shi-Hong 2 participants 2 messages May 16

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Documentation: hwmon: lm75: document sysfs interface

Document the sysfs attributes supported by the lm75 driver.

The driver exposes temp1_input, temp1_max, temp1_max_hyst, and the standard update_interval attribute. Some chips also expose temp1_alarm.

Add a sysfs-Interface section to Documentation/hwmon/lm75.rst to describe the supported attributes and clarify that temp1_alarm and the write permissions of update_interval depend on the chip.

---
 Documentation/hwmon/lm75.rst | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
Documentation/hwmon/lm75.rst +18 -0
index 4269da04508e..cbf737948c1d 100644
@@ -181,3 +181,21 @@ is supported by this driver, other specific enhancements are not.
 
 The LM77 is not supported, contrary to what we pretended for a long time.
 Both chips are simply not compatible, value encoding differs.
+
+sysfs-Interface
+---------------
+
+================ ============================================
+temp1_input      temperature input
+temp1_max        maximum temperature
+temp1_max_hyst   maximum temperature hysteresis
+================ ============================================
+
+If supported by the chip, the following attribute is also available:
+
+================ ============================================
+temp1_alarm      temperature alarm
+================ ============================================
+
+The standard update_interval attribute is also supported. Its write
+permissions depend on the chip.
Signature · 1 line
2.53.0
#1 lore raw
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] The newly added sysfs-Interface documentation omits the `temp1_label` attribute. --

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The newly added sysfs-Interface documentation omits the temp1_label attribute. --

commit 9ea544e30685306c26501a73ae7941baf5244e12
Author: Chen-Shi-Hong <[email protected]>

Documentation: hwmon: lm75: document sysfs interface

This commit adds a new sysfs-Interface section to the lm75 driver documentation to describe the supported sysfs attributes.

Quoted 7 lines
Documentation/hwmon/lm75.rst +0 -0
index 4269da04508ef..cbf737948c1d8 100644
@@ -181,3 +181,21 @@ is supported by this driver, other specific enhancements are not.
 
 The LM77 is not supported, contrary to what we pretended for a long time.

Documentation/hwmon/lm75.rst is supported by this driver, other specific enhancements are not. · line 192

Quoted 10 lines
Documentation/hwmon/lm75.rst +9 -0
 Both chips are simply not compatible, value encoding differs.
+
+sysfs-Interface
+---------------
+
+================ ============================================
+temp1_input      temperature input
+temp1_max        maximum temperature
+temp1_max_hyst   maximum temperature hysteresis
+================ ============================================

Should this section also document the temp1_label attribute?

Looking at drivers/hwmon/lm75.c, the driver exposes the temp1_label attribute via HWMON_T_LABEL if a label device property is present.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1