Adding .class field to struct i2c_client (was Re: [PATCH][2.6] Add command function to struct i2c_adapter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 21.09.2004 15:28, Jean Delvare wrote:
> On a completely different matter, what about the i2c subsystem class flags and
> checking mechanism? You had come with a first step some months ago (adding a
> class member to i2c clients), and your proposal (generalized check of i2c
> client class against adapter class) looked very good to me, but then we did
> not finish the job. What about it? 

I was unsure about the .class entries for some of the clients, then 
didn't find the time to investigate further and from then on the patches 
are bit-rotting on my harddisc. ;-(

> I am willing to help on the sensors front
> if you are going into this again someday. If I remember correctly, step 2 was
> about clearing manual class checks and filling all class members, and step 3
> was about implementing the generalized check in i2c-core. Am I right?

Yes, right. I've cleaned up the patches and attached them to this mail. 
Unfortunately, they only apply to 2.6.8(.1), but not 2.6.9-rc2-mm1. This 
is because SMBUS has been renamed to HWMON IIRC.

Please have a look and tell me what you think. The big problem will be, 
that we cannot test all configurations, so it's possible that some 
devices won't be recognized anymore, because the .class entries don't match.

Patches 1-3 are straight forward. For patches 4-7 I once created the 
following list:

==>4
#drivers/ieee1394/pcilynx.c => I2C_CLASS_NONE
#drivers/macintosh/therm_adt746x.c => I2C_CLASS_HWMON
#drivers/macintosh/therm_pm72.c => I2C_CLASS_HWMON
#drivers/macintosh/therm_windtunnel.c => I2C_CLASS_HWMON
#drivers/acorn/char/pcf8583.c => I2C_CLASS_ALL
#drivers/acorn/char/i2c.c => I2C_CLASS_ALL
#drivers/i2c/busses/i2c-keywest.c: => I2C_CLASS_HWMON | I2C_CLASS_SOUND;
#sound/ppc/keywest.c => I2C_CLASS_SOUND
#sound/oss/dmasound/dac3550a.c => I2C_CLASS_SOUND
#sound/oss/dmasound/tas_common.c => I2C_CLASS_SOUND

==>5
#drivers/i2c/algos/i2c-algo-pcf.c => I2C_CLASS_ALL
#drivers/i2c/busses/i2c-elektor.c => I2C_CLASS_ALL
#drivers/video/aty/radeon_i2c.c => I2C_CLASS_NONE
#drivers/video/matrox/i2c-matroxfb.c => I2C_CLASS_DDC and 
I2C_CLASS_TV_ANALOG
#drivers/video/matrox/matroxfb_maven.c => I2C_CLASS_TV_ANALOG
#drivers/media/video/zoran_card.c => I2C_CLASS_TV_ANALOG
#drivers/media/video/ir-kbd-i2c.c => I2C_CLASS_TV_ANALOG | 
I2C_CLASS_TV_DIGITAL
#drivers/media/dvb/bt8xx/dvb-bt8xx.c => I2C_CLASS_ALL

==>6
#drivers/i2c/busses/i2c-ibm_iic.c: => I2C_CLASS_ALL
#drivers/i2c/busses/i2c-iop3xx.c:=> I2C_CLASS_ALL
#drivers/i2c/busses/scx200_i2c.c => I2C_CLASS_ALL
#drivers/i2c/busses/i2c-ite.c => I2C_CLASS_ALL
(drivers/i2c/algos/i2c-algo-ite.c:)

==>7
#drivers/i2c/busses/i2c-frodo.c => I2C_CLASS_ALL
#drivers/i2c/busses/i2c-i810.c => I2C_CLASS_ALL + I2C_CLASS_DDC
#drivers/i2c/busses/i2c-prosavage.c => I2C_CLASS_ALL + I2C_CLASS_DDC
#drivers/i2c/busses/i2c-savage4.c => I2C_CLASS_ALL
#drivers/i2c/busses/i2c-ixp4xx.c => I2C_CLASS_ALL, doesn't compile!?
#drivers/i2c/busses/i2c-hydra.c => I2C_CLASS_HWMON

> Thanks.

CU
Michael.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 01-drivers-media-video.diff
Url: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040921/632c08b4/attachment.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 02-drivers-media-video-2.diff
Url: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040921/632c08b4/attachment-0001.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 03-drivers-i2c-chips.diff
Url: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040921/632c08b4/attachment-0002.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 04-misc.diff
Url: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040921/632c08b4/attachment-0003.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 05-unclear.diff
Url: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040921/632c08b4/attachment-0004.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 06-class-all.diff
Url: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040921/632c08b4/attachment-0005.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 07-i2c-busses.diff
Url: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040921/632c08b4/attachment-0006.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 08-i2c-core.diff
Url: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040921/632c08b4/attachment-0007.pl 


[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux