Hi
14.04.2020, 20:03, "Akira Shimahara" <akira215corp@xxxxxxxxx>:
From: Akira SHIMAHARA <akira215corp@xxxxxxxxx>
Patch for enhacement of w1_therm module. Added features :
Â- Bulk read : send one command for all the slaves
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂon the bus to trigger temperature conversion
Â- Optimized conversion time regarding to device resolution
Â- Dedicated sysfs entry for powering read,
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂresolution set/get, eeprom save/restore
Â- Alarms settings and reading
Â- Code optimization to mitigate bus traffic
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ(devices information are stored to avoid
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂinterrogating each device every-time)
Following sysfs entry are added :
Â- temperature (RO) : return the temperature in 1/1000Â
Â- ext_power (RO) : return the power status of the device
Â- resolution (RW) : get or set the device resolution (supported devices)
Â- eeprom (WO) :trigger a save or restore to/from device EEPROM
Â- alarms (RW) : read or write TH and TL in the device RAM
Â- therm_bulk_read (RW) : Attribute at master level to trigger
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂbulk read and to survey the progress of devices conversions
Â- w1_slave has been kept for compatibility
Main motivation was to improve temperature reading speed, which depend
on resolution settings of devices. The module store the powwer status and
the resolution of each device so that during reading operation, no
transaction is required on the bus, which improve speed.
The harware status is checked as soon as a new device is detected,
when a user change occured, or when the corresponding sys file is
accessed by user.
The bulk read allow to trigger convserion of all devices on the bus at
the same time. It will apply a strong pull up 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.
Please let me know any feedback you have on this patch.
Thanks ahead,
Signed-off-by: Akira Shimahara <akira215corp@xxxxxxxxx>
Looks good to me, thank you!
These are really good changes.
Greg, please pull it into your tree, thank you.
Acked-by: Evgeniy Polyakov <zbr@xxxxxxxxxxx>