Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

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