0001 ========================
0002 Kernel driver w1_ds28e17
0003 ========================
0004
0005 Supported chips:
0006
0007 * Maxim DS28E17 1-Wire-to-I2C Master Bridge
0008
0009 supported family codes:
0010
0011 ================= ====
0012 W1_FAMILY_DS28E17 0x19
0013 ================= ====
0014
0015 Author: Jan Kandziora <jjj@gmx.de>
0016
0017
0018 Description
0019 -----------
0020 The DS28E17 is a Onewire slave device which acts as an I2C bus master.
0021
0022 This driver creates a new I2C bus for any DS28E17 device detected. I2C buses
0023 come and go as the DS28E17 devices come and go. I2C slave devices connected to
0024 a DS28E17 can be accessed by the kernel or userspace tools as if they were
0025 connected to a "native" I2C bus master.
0026
0027
0028 An udev rule like the following::
0029
0030 SUBSYSTEM=="i2c-dev", KERNEL=="i2c-[0-9]*", ATTRS{name}=="w1-19-*", \
0031 SYMLINK+="i2c-$attr{name}"
0032
0033 may be used to create stable /dev/i2c- entries based on the unique id of the
0034 DS28E17 chip.
0035
0036
0037 Driver parameters are:
0038
0039 speed:
0040 This sets up the default I2C speed a DS28E17 get configured for as soon
0041 it is connected. The power-on default of the DS28E17 is 400kBaud, but
0042 chips may come and go on the Onewire bus without being de-powered and
0043 as soon the "w1_ds28e17" driver notices a freshly connected, or
0044 reconnected DS28E17 device on the Onewire bus, it will re-apply this
0045 setting.
0046
0047 Valid values are 100, 400, 900 [kBaud]. Any other value means to leave
0048 alone the current DS28E17 setting on detect. The default value is 100.
0049
0050 stretch:
0051 This sets up the default stretch value used for freshly connected
0052 DS28E17 devices. It is a multiplier used on the calculation of the busy
0053 wait time for an I2C transfer. This is to account for I2C slave devices
0054 which make heavy use of the I2C clock stretching feature and thus, the
0055 needed timeout cannot be pre-calculated correctly. As the w1_ds28e17
0056 driver checks the DS28E17's busy flag in a loop after the precalculated
0057 wait time, it should be hardly needed to tweak this setting.
0058
0059 Leave it at 1 unless you get ETIMEDOUT errors and a "w1_slave_driver
0060 19-00000002dbd8: busy timeout" in the kernel log.
0061
0062 Valid values are 1 to 9. The default is 1.
0063
0064
0065 The driver creates sysfs files /sys/bus/w1/devices/19-<id>/speed and
0066 /sys/bus/w1/devices/19-<id>/stretch for each device, preloaded with the default
0067 settings from the driver parameters. They may be changed anytime. In addition a
0068 directory /sys/bus/w1/devices/19-<id>/i2c-<nnn> for the I2C bus master sysfs
0069 structure is created.
0070
0071
0072 See https://github.com/ianka/w1_ds28e17 for even more information.