I'm not quite ready to give up on the Microtronix I2C yet.
I think I have the Microtronix I2C driver compiled in, but it seems to have no connection to /dev/i2c-0 (so i2cdetect fails).
Microtronix sent me their entire Linux distribution. (I think it is uClinux, as there is nios2nommu).
I've copied over what I think are the relevant I2C files:
- drivers/i2c/algos/i2c-algo-mtx.c
- drivers/i2c/algos/i2c-mtx.h
- drivers/i2c/busses/i2c-mtx.c
- include/linux/i2c-algo-mtx.h
I copied over the relevant sections of Kconfig and Makefile from the i2c/algos and i2c/busses directory.
I coped the I2C-related portions of arch/nios2nommu/kernel/avalon_devices.c to my arch/nios2/kernel/config.c (mimicing the sections for I2C OpenCores).
There was a printk() in the init in i2c_algo_mtx.c. I added one to i2c-mtx.c.
At startup, I can see the printk output from both files, so I know they are compiled in, and the init functions are being called.
I can also see that the "i2c /dev entries driver" is started.
When I run "i2cdetect 0", I get "Error: Count not open file `/dev/i2c-0': No such device".
How do I connect the device driver to the /dev device?
Nina