You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are kernel i2c bus adapters that don't support generic I2C, but only support smbus operations. For example:
; i2cdetect -l | grep smbus
i2c-0 smbus SMBus I801 adapter at 5040 SMBus adapter
; i2cdetect -F 0
Functionalities implemented by /dev/i2c-0:
I2C no
SMBus Quick Command yes
SMBus Send Byte yes
SMBus Receive Byte yes
SMBus Write Byte yes
SMBus Read Byte yes
SMBus Write Word yes
SMBus Read Word yes
SMBus Process Call no
SMBus Block Write yes
SMBus Block Read yes
SMBus Block Process Call yes
SMBus PEC yes
I2C Block Write yes
I2C Block Read yes
; i2ctransfer -y 0 w1@0x50 0x10 r4
Error: Adapter does not have I2C transfers capability
; cat /proc/version
Linux version 5.4.0-100-generic (buildd@lcy02-amd64-002) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #113-Ubuntu SMP Thu Feb 3 18:43:29 UTC 2022
; grep . /sys/class/dmi/id/*_* | grep -v -E '_(serial|uuid):'
/sys/class/dmi/id/bios_date:05/13/2013
/sys/class/dmi/id/bios_vendor:Dell Inc.
/sys/class/dmi/id/bios_version:A15
/sys/class/dmi/id/board_name:0C05GV
/sys/class/dmi/id/board_vendor:Dell Inc.
/sys/class/dmi/id/board_version:A02
/sys/class/dmi/id/chassis_type:8
/sys/class/dmi/id/chassis_vendor:Dell Inc.
/sys/class/dmi/id/chassis_version:A15
/sys/class/dmi/id/product_family:103C_5335KV
/sys/class/dmi/id/product_name:Vostro 3560
/sys/class/dmi/id/product_sku:Vostro 3560
/sys/class/dmi/id/product_version:A15
/sys/class/dmi/id/sys_vendor:Dell Inc.
or, this one:
i2c-0 smbus SMBus PIIX4 adapter port 0 at 0b00 SMBus adapter
; i2cdetect -F 0
Functionalities implemented by /dev/i2c-0:
I2C no
SMBus Quick Command yes
SMBus Send Byte yes
SMBus Receive Byte yes
SMBus Write Byte yes
SMBus Read Byte yes
SMBus Write Word yes
SMBus Read Word yes
SMBus Process Call no
SMBus Block Write yes
SMBus Block Read yes
SMBus Block Process Call no
SMBus PEC no
I2C Block Write no
I2C Block Read no
; grep . /sys/class/dmi/id/*_* | grep -v -E '_(serial|uuid):'
/sys/class/dmi/id/bios_date:06/16/2014
/sys/class/dmi/id/bios_vendor:AMI
/sys/class/dmi/id/bios_version:L40 v2.05
/sys/class/dmi/id/board_name:2187
/sys/class/dmi/id/board_vendor:Hewlett-Packard
/sys/class/dmi/id/board_version:A01
/sys/class/dmi/id/chassis_asset_tag:MXL43323XR
/sys/class/dmi/id/chassis_type:3
/sys/class/dmi/id/chassis_vendor:To Be Filled By O.E.M.
/sys/class/dmi/id/chassis_version:To Be Filled By O.E.M.
/sys/class/dmi/id/product_family:103C_53302C G=D
/sys/class/dmi/id/product_name:HP t620 Dual Core TC
/sys/class/dmi/id/product_sku:J5F65UP#ABA
/sys/class/dmi/id/sys_vendor:Hewlett-Packard
; cat /proc/version
Linux version 5.4.0-94-generic (buildd@lcy02-amd64-053) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #106-Ubuntu SMP Thu Jan 6 23:58:14 UTC 2022
For these, one would need to use the I2C_SMBUS_* ioctls, which doesn't fit with the Conn.Tx interface.
Perhaps one way is, in sysfs/i2c.go (if the bus functionality bits don't contain funcI2C), convert Tx() raw-[]byte arguments to the appropriate smbus call.
I can take a stab at this, but not sure exactly when.
There are kernel i2c bus adapters that don't support generic I2C, but only support smbus operations. For example:
or, this one:
For these, one would need to use the
I2C_SMBUS_*
ioctls, which doesn't fit with theConn.Tx
interface.Perhaps one way is, in
sysfs/i2c.go
(if the bus functionality bits don't containfuncI2C
), convertTx()
raw-[]byte
arguments to the appropriate smbus call.I can take a stab at this, but not sure exactly when.
Do you plan to:
The text was updated successfully, but these errors were encountered: