w1_ds28e17 2.5 KB

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