linux/drivers/w1/slaves
Akira Shimahara 57c76221d5 w1_therm: adding bulk read support to trigger multiple conversion on bus
Adding bulk read support:
Sending a 'trigger' command in the dedicated sysfs entry of 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.

The behavior of the sysfs reading temperature on the device is as follow:
 * If no bulk read pending, trigger a conversion on the device, wait for
 the conversion to be done, read the temperature in device RAM
 * If a bulk read has been trigger, access directly the device RAM
This behavior is the same on the 2 sysfs entries ('temperature' and
'w1_slave').

Reading the therm_bulk_read sysfs give the status of bulk operations:
 * '-1': conversion in progress on at least 1 sensor
 * '1': conversion complete but at least one sensor has not been read yet
 * '0': no bulk operation. Reading temperature on ecah device will trigger
a conversion

As not all devices support bulk read feature, it has been added in device
family structure.

The attribute is set at master level as soon as a supporting device is
discover. It is removed when the last supported device leave the bus.
The count of supported device is kept with the static counter
bulk_read_device_counter.

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 accordingly.

Signed-off-by: Akira Shimahara <akira215corp@gmail.com>
Link: https://lore.kernel.org/r/20200511203820.411483-1-akira215corp@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-15 16:29:00 +02:00
..
Kconfig w1: new driver. DS2430 chip 2019-11-14 13:06:33 +08:00
Makefile w1: new driver. DS2430 chip 2019-11-14 13:06:33 +08:00
w1_ds28e04.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 230 2019-06-19 17:09:06 +02:00
w1_ds28e17.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 230 2019-06-19 17:09:06 +02:00
w1_ds250x.c w1: add DS2501, DS2502, DS2505 EPROM device driver 2019-09-04 14:34:31 +02:00
w1_ds2405.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 144 2019-05-30 11:25:17 -07:00
w1_ds2406.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 230 2019-06-19 17:09:06 +02:00
w1_ds2408.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 230 2019-06-19 17:09:06 +02:00
w1_ds2413.c Merge 5.2-rc6 into char-misc-next 2019-06-23 09:23:33 +02:00
w1_ds2423.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 147 2019-05-30 11:25:18 -07:00
w1_ds2430.c w1: ds2430: fix eeprom size in driver description 2020-05-15 16:25:20 +02:00
w1_ds2431.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 230 2019-06-19 17:09:06 +02:00
w1_ds2433.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 230 2019-06-19 17:09:06 +02:00
w1_ds2438.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 230 2019-06-19 17:09:06 +02:00
w1_ds2780.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
w1_ds2780.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
w1_ds2781.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
w1_ds2781.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
w1_ds2805.c Merge 5.2-rc6 into char-misc-next 2019-06-23 09:23:33 +02:00
w1_smem.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 94 2019-05-24 17:37:53 +02:00
w1_therm.c w1_therm: adding bulk read support to trigger multiple conversion on bus 2020-05-15 16:29:00 +02:00