Summary: | [PATCH] Update i2c(8) to use the I2CRDRW ioctl | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Emmanuel Vadot <manu> | ||||||||
Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> | ||||||||
Status: | Closed Not A Bug | ||||||||||
Severity: | Affects Only Me | Keywords: | patch | ||||||||
Priority: | --- | ||||||||||
Version: | CURRENT | ||||||||||
Hardware: | Any | ||||||||||
OS: | Any | ||||||||||
Attachments: |
|
Created attachment 158368 [details]
New patch
I've rewritten the patch so i2c still use the I2CREAD/I2CWRITE/... by default but uses the I2CRDRW with the newly added -x switch.
Cheers,
Created attachment 158475 [details]
i2c_patch_3
As seen with loos :
- update to support 8-bits addresses
- scan mimic the linux command i2cdetect(8)
Patch is on phab now : https://reviews.freebsd.org/D5470 |
Created attachment 154684 [details] patch i2c(8) This patch updates i2c(8) to use the I2CRDRW ioctl instead of the old start / stop /read / write method. i2c_read and i2c_write have been merged to one function. Scanning works now on beaglebone : $ i2c -s Scanning I2C devices on /dev/iic0: 0x24 0x34 0x50 And dumping the on-board eeprom works too : $ i2c -a 0x50 -d r -o 0 -w16 -c 16 -b | hexdump -Cv 00000000 aa 55 33 ee 41 33 33 35 42 4e 4c 54 30 30 43 30 |.U3.A335BNLT00C0| 00000010 Cheers,