w1_ds28e17.rst 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. ========================
  2. Kernel driver w1_ds28e17
  3. ========================
  4. Supported chips:
  5. * Maxim DS28E17 1-Wire-to-I2C Master Bridge
  6. supported family codes:
  7. ================= ====
  8. W1_FAMILY_DS28E17 0x19
  9. ================= ====
  10. Author: Jan Kandziora <[email protected]>
  11. Description
  12. -----------
  13. The DS28E17 is a Onewire slave device which acts as an I2C bus master.
  14. This driver creates a new I2C bus for any DS28E17 device detected. I2C buses
  15. come and go as the DS28E17 devices come and go. I2C slave devices connected to
  16. a DS28E17 can be accessed by the kernel or userspace tools as if they were
  17. connected to a "native" I2C bus master.
  18. An udev rule like the following::
  19. SUBSYSTEM=="i2c-dev", KERNEL=="i2c-[0-9]*", ATTRS{name}=="w1-19-*", \
  20. SYMLINK+="i2c-$attr{name}"
  21. may be used to create stable /dev/i2c- entries based on the unique id of the
  22. DS28E17 chip.
  23. Driver parameters are:
  24. speed:
  25. This sets up the default I2C speed a DS28E17 get configured for as soon
  26. it is connected. The power-on default of the DS28E17 is 400kBaud, but
  27. chips may come and go on the Onewire bus without being de-powered and
  28. as soon the "w1_ds28e17" driver notices a freshly connected, or
  29. reconnected DS28E17 device on the Onewire bus, it will re-apply this
  30. setting.
  31. Valid values are 100, 400, 900 [kBaud]. Any other value means to leave
  32. alone the current DS28E17 setting on detect. The default value is 100.
  33. stretch:
  34. This sets up the default stretch value used for freshly connected
  35. DS28E17 devices. It is a multiplier used on the calculation of the busy
  36. wait time for an I2C transfer. This is to account for I2C slave devices
  37. which make heavy use of the I2C clock stretching feature and thus, the
  38. needed timeout cannot be pre-calculated correctly. As the w1_ds28e17
  39. driver checks the DS28E17's busy flag in a loop after the precalculated
  40. wait time, it should be hardly needed to tweak this setting.
  41. Leave it at 1 unless you get ETIMEDOUT errors and a "w1_slave_driver
  42. 19-00000002dbd8: busy timeout" in the kernel log.
  43. Valid values are 1 to 9. The default is 1.
  44. The driver creates sysfs files /sys/bus/w1/devices/19-<id>/speed and
  45. /sys/bus/w1/devices/19-<id>/stretch for each device, preloaded with the default
  46. settings from the driver parameters. They may be changed anytime. In addition a
  47. directory /sys/bus/w1/devices/19-<id>/i2c-<nnn> for the I2C bus master sysfs
  48. structure is created.
  49. See https://github.com/ianka/w1_ds28e17 for even more information.