[i2c] I2C functionality bits

Till Harbaum (Lists) lists at harbaum.org
Tue Oct 31 20:16:33 CET 2006


Dear list,

i have nearly finished my "tiny i2c to usb converter" named i2c-tiny-usb.
I just found out that the ds1621 i had attached to it wasn't detected since 
the old sensors-detect included with suse 9.3 is buggy with respect to 1621 
detection. So i installed the latest lm_sensors. Just to find out that my 
interface wasn't supported at all anymore.

This is due to the fact that my interface is very closely coupled to the linux 
kernel i2c concept. It uses exactly the same messages and flags and e.g. also 
reports its functionality using that 32 bit field. And i soon found out that 
sensors-detect nowadays expects a bunch of functionality before it even dares 
to scan the bus.

Long explanation, short question: What do these bits exactly mean?

My device physically supports a bitbanging i2c nd can interpret this sequences 
the kernel sends. But it e.g. doesn't support 10 bit addresses (as i haven't 
a device to test. if someone wants to donate a test device just send me an 
email). What bits should i be setting in the functionality vector? 
Especially: What smbus bits should be returned for my pure i2c device?
I've now added the entire I2C_FUNC_SMBUS_EMUL thing. Is this correct?

With this set, my device works fine:

titan:/home/harbaum/tmp/lm_sensors-2.10.1 # sensors
ds1621-i2c-2-48
Adapter: i2c-tiny-usb at bus 004 device 005
temp:     +20.50°C  (low  = +15.0°C, high = +10.0°C)  ALARM (HIGH)

:-)

Till

-- 
Dr.Ing. Till Harbaum <till at harbaum.org>
http://www.harbaum.org/till



More information about the i2c mailing list