[i2c] i2c-pport with kernel 2.6.X

pierre demanax baddemanax at hotmail.com
Fri Apr 20 17:47:51 CEST 2007


Hi all,

Thanks for the good answer I succeeded in compiling the module below and 
inserting it with insmod( by removing indeed those lines and also 
i2c_bit_del_bus and MODULE_PARM).

But I dont really get the point as I am using the kernel 2.6.20 which is 
supposed to include the latest i2c package. But if I look at the source code 
of this kernel for eg the i2c_bit_del_bus is not defined in the algo_bit.* ( 
i looked at my /usr/src/linux folder as the 
/lib/modules/2.6.20/source/include/linux)

So I look at the i2c-2.10.2 package where it is well defined. So I am mixed 
up. Am I wrong or did I choose the wrong kernel version ? I am a bit lost.

Another strange behaviour, after inserting the i2c-pport.ko module, i 
launched a i2cdetect 0, where it detects chips for all address even though 
there was nothing connected on my parallel port.

After the HW connection I could not communicate with the chip.

Any further help/suggestion would be please
regards.





>From: Jean Delvare <khali at linux-fr.org>
>To: "pierre demanax" <baddemanax at hotmail.com>
>CC: i2c at lm-sensors.org
>Subject: Re: [i2c] i2c-pport with kernel 2.6.X
>Date: Tue, 17 Apr 2007 18:39:06 +0200
>
>Bonjour Pierre,
>
>On Tue, 17 Apr 2007 14:37:50 +0200, pierre demanax wrote:
> > Is there a way to add the i2c-pport module into a 2.6.x kernel ?
> >
> > I found a file from rudolf marek (  i2c-pport for kernel 2.6.X
> > http://assembler.cz/), but that files doesn't compile on my system i got 
>the
> > following error :
> >
> > error: linux/config.h: no such file or directory
> > error: unknown field 'mdelay' specified in initializer
> > ....
> >
> > I am using a 2.6.20 kernel self compiled. Apparently the i2c-algo-bit.h
> > coming with this kernel is not the latest version, and doesn't contain 
>the
> > mdelay deifnition.
>
>No. By definition, i2c-algo-bit.h in the vanilla kernel tree is the
>latest version. Your problem here is that the code you picked from
>Rudolf's website is out-of-tree and not maintained.
>
>It shouldn't be hard to fix either, simply delete the two offending
>lines.
>
> > SO is there a good, clean way to add that module?
> >
> > I would be please to have some help from i2c community.
>
>I don't want to another i2c-over-parallel-port driver to the kernel
>tree. We already have i2c-parport, which supports 7 different pin
>wiring combinations. Whatever i2c-pport does, this should be added as a
>new type to the i2c-parport driver. If this isn't possible, someone
>will have to explain to me why exactly.
>
>--
>Jean Delvare

_________________________________________________________________
Grand passioné ?  Rassemblez tout ce qui vous intéresse   en un seul endroit 
! http://get.live.com/live/features




More information about the i2c mailing list