Hi everyone,

We are trying to use the I2C bus (for custom application, not standard
sensors) on a Via Epia M 10000 board (i2c chipset vt8235).
We use a 2.4.27 Linux kernel (without i2c support), with i2c-2.9.1 and
lm_sensors-2.9.1 (version 2.8.8 was tested too) compiled as modules,
independently from kernel, with the uClibc toolchain we use in the
target system (standard glibc was tested too). The development system
has a 2.6 kernel, but we took care of choosing the right includes for
the modules compilation.

We use the drivers exactly as showed in "i2c-2.9.1/doc/dev-interface"
and have the following problems :

-> the ioctl (both I2C_FUNCS and I2C_SLAVE) return "Invalid argument".

-> when we try "cat /dev/i2c-0", the following message is written :
i2c-core.o: I2C adapter 40002: I2C level transfers not supported
/dev/i2c-0: Function not implemented

The first line of this error message is printed from the function
"i2c_master_send" in i2c-core.c

-> but most things appear to work, as shown below :
- the modules compile correctly, are correctly inserted with insmod :
-the i2c-viapro module is correctly registered by the i2c-dev module
-as an adapter (address 0500, minor 0). The entry in /proc/bus/i2c
-shows :

i2c-0 smbus SMBus Via Pro adapter at 0500 Non-I2C SMBus adapter

By the way, we suppose that the "non-I2C adapter" means that i2c_send*
functions are not available, which would explain the error message
from the "cat /dev/i2c-0". But the ioctl error remains, and that even
if we choose to use the i2c_smbus* functions.

- the "open" call on "/dev/i2c-0" apparently succeeds, and while the
program is running, lsmod shows that i2c-dev and i2c-viapro are used
by the program.

- the proc entry in /proc/bus/i2c-0 is empty, but this is normal since
we use custom modules and not existing devices

- the command "cat /proc/ioports" shows the following entry, which
appears to be right :
0500-0507 : viapro-smbus

So, did any of you have a similar problem, and a solution, or at least
ideas to investigate ?
Thanks in advance (for you quick replies, since we are quite in a
hurry !),

| -) We are MicroSoft. You will be assimilated. (- |
| /\\ Resistance is futile. (Attributed to B.G., Gill //\ |
| _\_v Bates) v_/_ |