I2C patch for Linux 2.4

Jean Delvare khali at linux-fr.org
Sat Jul 12 09:58:59 CEST 2003


Hi Greg,

> Individual diffs are good.  In an incremental fashion is even better
> (this one fixes up the core files to match cvs, this one adds one
> driver, etc...)

OK, let's go.

> Always against the latest kernel is the best, 2.4.22-preX or
> 2.4.21-bkX is fine, I should be able to handle either of them.

The core patch is against 2.4.21-bk7, others are against 2.4.21 but
apply correctly to 2.4.21-bk7.

> I can imagine that we aren't going to just be able to drop in the cvs
> version into the kernel, due to some cleanups that we might want to do
> (along the lines of what's happened in 2.5 before I did the sysfs
> changes.)  So this will be an iterative process.

Of course. Don't forget to CC: me on everything you send to the LKML
with regard to this topic, so that I can follow the evolution and help
when I can.

Also, I'm not sure what you mean with "iterative process", so please
note that once the main i2c patch is applied, all others but the last
one (pcmcia) also need to be, or the drivers won't work (and some of
them won't even compile.)

Attached are all the patches but the core patch (too large for the list,
I'll send it to you only in a minute; anyway everyone can generate it
using mkpatch.) Here comes the logical order they should be applied in,
and a description of what they do.


* linux-2.4.21-bk7-i2c-2.8.0.patch

The core patch, as generated using "./mkpatch /usr/src/i2c-CVS
/usr/src/linux-2.4.21-bk7". Note that all patches are labeled
"i2c-2.8.0" because we are so close to releasing. The patch includes the
following changes (U means update, + means creation, - means deletion):

  + drivers/i2c/i2c-adap-ibm_ocp.c
  + drivers/i2c/i2c-algo-8xx.c
  U drivers/i2c/i2c-algo-bit.c
  + drivers/i2c/i2c-algo-ibm_ocp.c
  U drivers/i2c/i2c-algo-pcf.c
  U drivers/i2c/i2c-core.c
  U drivers/i2c/i2c-dev.c
  U drivers/i2c/i2c-elektor.c
  U drivers/i2c/i2c-elv.c
  + drivers/i2c/i2c-frodo.c
  + drivers/i2c/i2c-pcf-epp.c
  U drivers/i2c/i2c-philips-par.c
  + drivers/i2c/i2c-pport.c
  U drivers/i2c/i2c-proc.c
  + drivers/i2c/i2c-rpx.c
  U drivers/i2c/i2c-velleman.c
  U include/linux/i2c.h
  U include/linux/i2c-dev.h
  + include/linux/i2c-algo-8xx.h
  U include/linux/i2c-algo-bit.h
  + include/linux/i2c-algo-ibm_ocp.h
  U include/linux/i2c-algo-pcf.h
  - include/linux/i2c-elektor.h
  U include/linux/i2c-id.h
  U include/linux/i2c-pcf8584.h
  U include/linux/i2c-proc.h
  U Documentation/i2c/dev-interface
  U Documentation/i2c/functionality
  + Documentation/i2c/i2c-pport
  U Documentation/i2c/i2c-protocol
  + Documentation/i2c/i2c-velleman
  U Documentation/i2c/proc-interface
  U Documentation/i2c/smbus-protocol
  U Documentation/i2c/summary
  U Documentation/i2c/ten-bit-addresses
  U Documentation/i2c/writing-clients
  U Documentation/Configure.help


* i2c-2.8.0-drivers-i2c-i2c-adap-ite.c.diff
* i2c-2.8.0-drivers-i2c-i2c-keywest.c.diff
* i2c-2.8.0-drivers-i2c-scx200_acb.c.diff
* i2c-2.8.0-drivers-i2c-scx200_i2c.c.diff

These four patches fix the i2c drivers that are part of the kernel but
are not present in our i2c tree. This is required due to changes on our
side in struct i2c_adapter. Changes are: adding the owner field,
removing the inc_use and dec_use fields and associated functions, and
using C99 initializers. Note that these patches only fix the drivers
that are located in the drivers/i2c directory. Other drivers that use
our i2c layer are fixed later. Files changed:

  U drivers/i2c/i2c-adap-ite.c
  U drivers/i2c/i2c-keywest.c
  U drivers/i2c/scx200_acb.c
  U drivers/i2c/scx200_i2c.c


* i2c-2.8.0-drivers-i2c-Config.in.diff
* i2c-2.8.0-drivers-i2c-Makefile.diff

These two patches integrate our new drivers in the Linux configuration
and compilation mechanisms, respectively. New drivers are: i2c-pport.o,
i2c-frodo.o, i2c-pcf-epp.o, i2c-algo-8xx.o, i2c-rpx.o,
i2c-algo-ibm_ocp.o, i2c-adap-ibm_ocp.o. The Config.in also includes
dependency and typo fixes. Files changed:

  U drivers/i2c/Config.in
  U drivers/i2c/Makefile


* i2c-2.8.0-drivers-acorn-char.diff
* i2c-2.8.0-drivers-ieee1394.diff
* i2c-2.8.0-drivers-media-video.diff
* i2c-2.8.0-drivers-sound-dmasound.diff
* i2c-2.8.0-drivers-video-matrox.diff

These five patches fix all other i2c drivers that live outside of the
drivers/i2c directory. This is required due to changes on our side in
struct i2c_adapter and struct i2c_driver. Changes are: adding the owner
field, removing the inc_use and dec_use fields and associated functions,
and using C99 initializers. Expect the acorn-char one to apply with a
hundred line delta due to a recent change to drivers/acorn/char/i2c.c.
The media-video patch also fixes some errors in the Makefile, removes
dead code in i2c-old.c and unused headers in saa7146.h. Files changed:

  U drivers/acorn/char/i2c.c
  U drivers/acorn/char/pcf8583.c
  U drivers/ieee1394/pcilynx.c
  U drivers/media/video/Makefile
  U drivers/media/video/bt832.c
  U drivers/media/video/i2c-old.c
  U drivers/media/video/msp3400.c
  U drivers/media/video/saa5249.c
  U drivers/media/video/tda7432.c
  U drivers/media/video/tda9875.c
  U drivers/media/video/tda9887.c
  U drivers/media/video/tuner-3036.c
  U drivers/media/video/tuner.c
  U drivers/media/video/tvaudio.c
  U drivers/media/video/tvmixer.c
  U drivers/sound/dmasound/dac3550a.c
  U drivers/sound/dmasound/tas3001c.c
  U drivers/video/matrox/i2c-matroxfb.c
  U drivers/video/matrox/matroxfb_maven.c


* i2c-2.8.0-drivers-pcmcia.diff

This last patch removes an unused header in sa1100_stork.c. This is not
really related to our problem, but I came accross this file while I was
listing the drivers that needed to be edited, and fixed it. Files
changed:

  U drivers/pcmcia/sa1100_stork.c


Ok, I hope everything is clear. Let me know if you need more details or
any other kind of work.

-- 
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: i2c-2.8.0-drivers-i2c-i2c-adap-ite.c.diff
URL: <http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20030712/cea5341a/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: i2c-2.8.0-drivers-i2c-i2c-keywest.c.diff
URL: <http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20030712/cea5341a/attachment-0001.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: i2c-2.8.0-drivers-i2c-scx200_acb.c.diff
URL: <http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20030712/cea5341a/attachment-0002.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: i2c-2.8.0-drivers-i2c-scx200_i2c.c.diff
URL: <http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20030712/cea5341a/attachment-0003.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: i2c-2.8.0-drivers-i2c-Config.in.diff
URL: <http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20030712/cea5341a/attachment-0004.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: i2c-2.8.0-drivers-i2c-Makefile.diff
URL: <http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20030712/cea5341a/attachment-0005.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: i2c-2.8.0-drivers-acorn-char.diff
URL: <http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20030712/cea5341a/attachment-0006.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: i2c-2.8.0-drivers-ieee1394.diff
URL: <http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20030712/cea5341a/attachment-0007.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: i2c-2.8.0-drivers-media-video.diff
URL: <http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20030712/cea5341a/attachment-0008.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: i2c-2.8.0-drivers-sound-dmasound.diff
URL: <http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20030712/cea5341a/attachment-0009.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: i2c-2.8.0-drivers-video-matrox.diff
URL: <http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20030712/cea5341a/attachment-0010.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: i2c-2.8.0-drivers-pcmcia.diff
URL: <http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20030712/cea5341a/attachment-0011.ksh>


More information about the lm-sensors mailing list