brintos

brintos / linux-shallow public Read only

0
0
Text · 2.4 KiB · e2d9f96 Raw
73 lines · plain
1========================2Kernel driver w1_ds28e173========================4 5Supported chips:6 7  * Maxim DS28E17 1-Wire-to-I2C Master Bridge8 9supported family codes:10 11        =================  ====12	W1_FAMILY_DS28E17  0x1913        =================  ====14 15Author: Jan Kandziora <jjj@gmx.de>16 17 18Description19-----------20The DS28E17 is a Onewire slave device which acts as an I2C bus master.21 22This driver creates a new I2C bus for any DS28E17 device detected. I2C buses23come and go as the DS28E17 devices come and go. I2C slave devices connected to24a DS28E17 can be accessed by the kernel or userspace tools as if they were25connected to a "native" I2C bus master.26 27 28An udev rule like the following::29 30  SUBSYSTEM=="i2c-dev", KERNEL=="i2c-[0-9]*", ATTRS{name}=="w1-19-*", \31          SYMLINK+="i2c-$attr{name}"32 33may be used to create stable /dev/i2c- entries based on the unique id of the34DS28E17 chip.35 36 37Driver parameters are:38 39speed:40	This sets up the default I2C speed a DS28E17 get configured for as soon41	it is connected. The power-on default	of the DS28E17 is 400kBaud, but42	chips may come and go on the Onewire bus without being de-powered and43	as soon the "w1_ds28e17" driver notices a freshly connected, or44	reconnected DS28E17 device on the Onewire bus, it will re-apply this45	setting.46 47	Valid values are 100, 400, 900 [kBaud]. Any other value means to leave48	alone the current DS28E17 setting on detect. The default value is 100.49 50stretch:51	This sets up the default stretch value used for freshly connected52	DS28E17 devices. It is a multiplier used on the calculation of the busy53	wait time for an I2C transfer. This is to account for I2C slave devices54	which make heavy use of the I2C clock stretching feature and thus, the55	needed timeout cannot be pre-calculated correctly. As the w1_ds28e1756	driver checks the DS28E17's busy flag in a loop after the precalculated57	wait time, it should be hardly needed to tweak this setting.58 59	Leave it at 1 unless you get ETIMEDOUT errors and a "w1_slave_driver60	19-00000002dbd8: busy timeout" in the kernel log.61 62	Valid values are 1 to 9. The default is 1.63 64 65The driver creates sysfs files /sys/bus/w1/devices/19-<id>/speed and66/sys/bus/w1/devices/19-<id>/stretch for each device, preloaded with the default67settings from the driver parameters. They may be changed anytime. In addition a68directory /sys/bus/w1/devices/19-<id>/i2c-<nnn> for the I2C bus master sysfs69structure is created.70 71 72See https://github.com/ianka/w1_ds28e17 for even more information.73