w1_therm: adding bulk read support. Updating docs in w1_therm.rst and sysfs-driver-w1_therm
Subsystems (2)
PATCH v3 5/5 w1_therm: adding bulk read support. Updating docs in w1_therm.rst and sysfs-driver-w1_therm
Patch for enhacement of w1_therm module. Adding bulk read support. Sending a 'trigger' command in the dedicated sysfs entry of the bus master device send a conversion command for all the slaves on the bus. The sysfs entry is added as soon as at least one device supporting this feature is detected on the bus.
A strong pull up is apply on the line if at least one device required it. The duration of the pull up is the max time required by a device on the line, which depends on the resolution settings of each device. The strong pull up could be adjust with the a module parameter.
Updating documentation in Documentation/ABI/testing/sysfs-driver-w1_therm and Documentation/w1/slaves/w1_therm.rst
--- .../ABI/testing/sysfs-driver-w1_therm | 36 ++- Documentation/w1/slaves/w1_therm.rst | 50 +++- drivers/w1/slaves/w1_therm.c | 217 +++++++++++++++++- drivers/w1/slaves/w1_therm.h | 47 ++++ 4 files changed, 335 insertions(+), 15 deletions(-)
Documentation/ABI/testing/sysfs-driver-w1_therm +32 -4
@@ -61,9 +61,16 @@ Date: Apr 2020 Contact: Akira Shimahara <[email protected]> Description: (RO) return the temperature in 1/1000 degC. - Note that the conversion duration depend on the resolution (if - device support this feature). It takes 94ms in 9bits - resolution, 750ms for 12bits. + * If a bulk read has been triggered, it will directly + return the temperature computed when the bulk read + occurred, if available. If not yet available, nothing + is returned (a debug kernel message is sent), you + should retry later on. + * If no bulk read has been triggered, it will trigger + a conversion and send the result. Note that the + conversion duration depend on the resolution (if + device support this feature). It takes 94ms in 9bits + resolution, 750ms for 12bits. Users: any user space application which wants to communicate with w1_term device
@@ -84,4 +91,25 @@ Description: refer to Documentation/w1/slaves/w1_therm.rst for detailed information. Users: any user space application which wants to communicate with - w1_term device + w1_term device + + +What: /sys/bus/w1/devices/w1_bus_masterXX/therm_bulk_read +Date: Apr 2020 +Contact: Akira Shimahara <[email protected]> +Description: + (RW) trigger a bulk read conversion. read the status + *read*: + * `-1`: conversion in progress on at least 1 sensor + * `1` : conversion complete but at least one sensor + value has not been read yet + * `0` : no bulk operation. Reading temperature will + trigger a conversion on each device + *write*: `trigger`: trigger a bulk read on all supporting + devices on the bus + Note that if a bulk read is sent but one sensor is not read + immediately, the next access to temperature on this device + will return the temperature measured at the time of issue + of the bulk read command (not the current temperature). +Users: any user space application which wants to communicate with + w1_term device
Documentation/w1/slaves/w1_therm.rst +41 -9
67 lines not on this page · raw message
drivers/w1/slaves/w1_therm.c +215 -2
301 lines not on this page · raw message
drivers/w1/slaves/w1_therm.h +47 -0
95 lines not on this page · raw message
Signature · 1 line
2.25.4