[i2c] I2C support - 'built-in' VS modules
Mark M. Hoffman
mhoffman at lightlink.com
Thu Aug 17 14:02:24 CEST 2006
Hi Drasko:
* Drasko Draskovic <drasko.draskovic at gmail.com> [2006-08-16 18:34:04 +0200]:
> Hi all,
> I have a question about incorporating existing I2C support in kernel.
>
> 1) In order to have working peripherel on I2C bus I have to insmod:
> a) i2c-core.o
> b) i2c-dev.o
> c) i2c-proc.o
> d) i2c-<my_board>.o
> e) i2c-<my_device>.o
>
> Am I right? Did I miss something?
a) yes
b) if you need to perform transfers from userspace, yes
Otherwise it's not necessary.
c) There is no such module in 2.6.x kernels (it was needed for 2.4.x).
d) assuming this is an 'adapter', yes
e) assuming this is a 'chip' or 'client', yes
> 2) More important question: I enabled I2C support in make menuconfig, for
> I2C code to be built in a kernel, not as a modules. I check <*> for "I2C
> device interface", but left unchecked for "I2C Algorithms" and "I2C Hardware
> Bus support" since I do not have yet implemented support for my board (for
> AMBA bus). Now I can see i2c directory under /sys/bus (under /dev I can not
> see anything with i2c name). I'd like to know which one of these '.o' files
> got build in a kernel. I suppose i2c-core.o, i2c-dev.o and i2c-proc.o, and I
> have to insert then i2c-<my_board>.o (which I did not checked in menuconfig)
> and i2c-<my_device>.o (similar). Am I right?
Sounds like i2c-core is built in. Sounds like i2c-dev is not. There is no
i2c-proc. Use the help in 'make menuconfig', it is very clear about all of
this.
> Also - where can I check for the list of these kenel built-in modules? In
> /lib/modules I can see only these:
> $ pwd
> /lib/modules
> $ ls
> rtai_up.ko rtai_timer_start.ko rtai_hal.ko
> $
>
> Where these i2c-*.o files should be kept, after inserted with insmod (or
> comiled staticaly into a kernel, as in my case).
One usually does 'make modules_install' to put the kernel modules in the
proper place after building.
Regards,
--
Mark M. Hoffman
mhoffman at lightlink.com
More information about the i2c
mailing list