]> err.no Git - linux-2.6/commitdiff
i2c: Add IDs to adapters
authorStephen Hemminger <shemminger@osdl.org>
Tue, 13 Feb 2007 21:09:01 +0000 (22:09 +0100)
committerJean Delvare <khali@arrakis.delvare>
Tue, 13 Feb 2007 21:09:01 +0000 (22:09 +0100)
IDs have been defined but not used by most of the I2C adapters.
By having a unique ID, clients can check for correct connection
during probe.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
18 files changed:
drivers/i2c/busses/i2c-ali1535.c
drivers/i2c/busses/i2c-ali1563.c
drivers/i2c/busses/i2c-ali15x3.c
drivers/i2c/busses/i2c-amd756.c
drivers/i2c/busses/i2c-amd8111.c
drivers/i2c/busses/i2c-i801.c
drivers/i2c/busses/i2c-i810.c
drivers/i2c/busses/i2c-nforce2.c
drivers/i2c/busses/i2c-piix4.c
drivers/i2c/busses/i2c-savage4.c
drivers/i2c/busses/i2c-sis5595.c
drivers/i2c/busses/i2c-sis630.c
drivers/i2c/busses/i2c-sis96x.c
drivers/i2c/busses/i2c-via.c
drivers/i2c/busses/i2c-viapro.c
drivers/i2c/busses/i2c-voodoo3.c
drivers/i2c/busses/scx200_i2c.c
include/linux/i2c-id.h

index e75d339a3481e9dcd03acb7dda20d14ba73352ae..0b0a87b8d1079f2755a3bfd902d1cb6e4a130f53 100644 (file)
@@ -475,6 +475,7 @@ static const struct i2c_algorithm smbus_algorithm = {
 
 static struct i2c_adapter ali1535_adapter = {
        .owner          = THIS_MODULE,
+       .id             = I2C_HW_SMBUS_ALI1535,
        .class          = I2C_CLASS_HWMON,
        .algo           = &smbus_algorithm,
 };
index 55ebbef41e97b36188d87b34c38325e80c9b45b9..6b68074e518a072d1239c1e1f8ba61287cc4b456 100644 (file)
@@ -370,6 +370,7 @@ static const struct i2c_algorithm ali1563_algorithm = {
 
 static struct i2c_adapter ali1563_adapter = {
        .owner  = THIS_MODULE,
+       .id     = I2C_HW_SMBUS_ALI1563,
        .class  = I2C_CLASS_HWMON,
        .algo   = &ali1563_algorithm,
 };
index 3f11b6e1a3418c5bc5dad86681b7eae67c429af7..c537441ac0383ca825ca60b15bfae9d8bcd08b47 100644 (file)
@@ -470,6 +470,7 @@ static const struct i2c_algorithm smbus_algorithm = {
 
 static struct i2c_adapter ali15x3_adapter = {
        .owner          = THIS_MODULE,
+       .id             = I2C_HW_SMBUS_ALI15X3,
        .class          = I2C_CLASS_HWMON,
        .algo           = &smbus_algorithm,
 };
index 2d21afdc5b1cc7f3961c3e4f480de0444ec4292f..91fbc0ee439cc85b94b30fb3818b53790a164bb3 100644 (file)
@@ -301,6 +301,7 @@ static const struct i2c_algorithm smbus_algorithm = {
 
 struct i2c_adapter amd756_smbus = {
        .owner          = THIS_MODULE,
+       .id             = I2C_HW_SMBUS_AMD756,
        .class          = I2C_CLASS_HWMON,
        .algo           = &smbus_algorithm,
 };
index 0fbc7186c91ab63f8ac8f6b32365db3a850efc6f..21f8a822bb79ca66a3756fa3807e6c53eecb36d2 100644 (file)
@@ -351,6 +351,7 @@ static int __devinit amd8111_probe(struct pci_dev *dev, const struct pci_device_
        smbus->adapter.owner = THIS_MODULE;
        snprintf(smbus->adapter.name, I2C_NAME_SIZE,
                "SMBus2 AMD8111 adapter at %04x", smbus->base);
+       smbus->adapter.id = I2C_HW_SMBUS_AMD8111;
        smbus->adapter.class = I2C_CLASS_HWMON;
        smbus->adapter.algo = &smbus_algorithm;
        smbus->adapter.algo_data = smbus;
index de5e23a93b18b13032862ab20e782b16e914df2d..8c3569a9775b79d1d9cb935c505abd07856a3669 100644 (file)
@@ -442,6 +442,7 @@ static const struct i2c_algorithm smbus_algorithm = {
 
 static struct i2c_adapter i801_adapter = {
        .owner          = THIS_MODULE,
+       .id             = I2C_HW_SMBUS_I801,
        .class          = I2C_CLASS_HWMON,
        .algo           = &smbus_algorithm,
 };
index 10c98bc88aa6c57465299165f245eaf5270f6469..42e8d94c276fde7e278016aef70d6ffdf23e2baa 100644 (file)
@@ -171,6 +171,7 @@ static struct i2c_algo_bit_data i810_i2c_bit_data = {
 
 static struct i2c_adapter i810_i2c_adapter = {
        .owner          = THIS_MODULE,
+       .id             = I2C_HW_B_I810,
        .name           = "I810/I815 I2C Adapter",
        .algo_data      = &i810_i2c_bit_data,
 };
@@ -186,6 +187,7 @@ static struct i2c_algo_bit_data i810_ddc_bit_data = {
 
 static struct i2c_adapter i810_ddc_adapter = {
        .owner          = THIS_MODULE,
+       .id             = I2C_HW_B_I810,
        .name           = "I810/I815 DDC Adapter",
        .algo_data      = &i810_ddc_bit_data,
 };
index 69d073049e14382ea99668dd05431ce5c1a62ee1..653555184a6467d19db716ca7cd4ff97a8ef71dc 100644 (file)
@@ -236,6 +236,7 @@ static int __devinit nforce2_probe_smb (struct pci_dev *dev, int bar,
                return -1;
        }
        smbus->adapter.owner = THIS_MODULE;
+       smbus->adapter.id = I2C_HW_SMBUS_NFORCE2;
        smbus->adapter.class = I2C_CLASS_HWMON;
        smbus->adapter.algo = &smbus_algorithm;
        smbus->adapter.algo_data = smbus;
index 07546c2b2404ed6cfae9bb05ac8d72d6a9d0737a..03d0aeea0189baadf42de61c5fecc44cb5de9087 100644 (file)
@@ -384,6 +384,7 @@ static const struct i2c_algorithm smbus_algorithm = {
 
 static struct i2c_adapter piix4_adapter = {
        .owner          = THIS_MODULE,
+       .id             = I2C_HW_SMBUS_PIIX4,
        .class          = I2C_CLASS_HWMON,
        .algo           = &smbus_algorithm,
 };
index 844b4ff908934895d5be8e8f58162b1e3b28f6ca..b7fb65c301124eb54e786bc5ef33153737028f06 100644 (file)
@@ -145,6 +145,7 @@ static struct i2c_algo_bit_data sav_i2c_bit_data = {
 
 static struct i2c_adapter savage4_i2c_adapter = {
        .owner          = THIS_MODULE,
+       .id             = I2C_HW_B_SAVAGE,
        .name           = "I2C Savage4 adapter",
        .algo_data      = &sav_i2c_bit_data,
 };
index 38bbfd840b6b181c51aab35856ceebfdfb737cdf..d333babe4ad36161a860967e5624519f4c1ec4ba 100644 (file)
@@ -365,6 +365,7 @@ static const struct i2c_algorithm smbus_algorithm = {
 
 static struct i2c_adapter sis5595_adapter = {
        .owner          = THIS_MODULE,
+       .id             = I2C_HW_SMBUS_SIS5595,
        .class          = I2C_CLASS_HWMON,
        .algo           = &smbus_algorithm,
 };
index dec0bafb52ab5cd5f241b7675800048a790c7cd8..172bacf932a6807c21333f2cb3b594b8ed47b855 100644 (file)
@@ -457,6 +457,7 @@ static const struct i2c_algorithm smbus_algorithm = {
 
 static struct i2c_adapter sis630_adapter = {
        .owner          = THIS_MODULE,
+       .id             = I2C_HW_SMBUS_SIS630,
        .class          = I2C_CLASS_HWMON,
        .algo           = &smbus_algorithm,
 };
index 7fd07fbac33681c3f81f49e66acad11660aa3533..869a635d37e9d5d3a6da7e93f777609a61bc5f4a 100644 (file)
@@ -249,6 +249,7 @@ static const struct i2c_algorithm smbus_algorithm = {
 
 static struct i2c_adapter sis96x_adapter = {
        .owner          = THIS_MODULE,
+       .id             = I2C_HW_SMBUS_SIS96X,
        .class          = I2C_CLASS_HWMON,
        .algo           = &smbus_algorithm,
 };
index 15d7e00e47e6a7b3edb93d9321eefdcee01f6847..bbcc62151f7c4cf542478bcf6ee8768254aaba64 100644 (file)
@@ -86,6 +86,7 @@ static struct i2c_algo_bit_data bit_data = {
 
 static struct i2c_adapter vt586b_adapter = {
        .owner          = THIS_MODULE,
+       .id             = I2C_HW_B_VIA,
        .class          = I2C_CLASS_HWMON,
        .name           = "VIA i2c",
        .algo_data      = &bit_data,
index efc6bbf0cc0a49818b569208f92f92062acefaf2..43a081f16553f1ba80c885a872d98adca7656bd9 100644 (file)
@@ -306,6 +306,7 @@ static const struct i2c_algorithm smbus_algorithm = {
 
 static struct i2c_adapter vt596_adapter = {
        .owner          = THIS_MODULE,
+       .id             = I2C_HW_SMBUS_VIA2,
        .class          = I2C_CLASS_HWMON,
        .algo           = &smbus_algorithm,
 };
index b0377b81744bcc4d525460b9a8ca8e2eb839d8e2..88a3447e11e1eaf47fb9ddc0b29fc0ab8fb0048f 100644 (file)
@@ -165,6 +165,7 @@ static struct i2c_algo_bit_data voo_i2c_bit_data = {
 
 static struct i2c_adapter voodoo3_i2c_adapter = {
        .owner          = THIS_MODULE,
+       .id             = I2C_HW_B_VOO,
        .class          = I2C_CLASS_TV_ANALOG, 
        .name           = "I2C Voodoo3/Banshee adapter",
        .algo_data      = &voo_i2c_bit_data,
@@ -181,6 +182,7 @@ static struct i2c_algo_bit_data voo_ddc_bit_data = {
 
 static struct i2c_adapter voodoo3_ddc_adapter = {
        .owner          = THIS_MODULE,
+       .id             = I2C_HW_B_VOO,
        .class          = I2C_CLASS_DDC, 
        .name           = "DDC Voodoo3/Banshee adapter",
        .algo_data      = &voo_ddc_bit_data,
index 6cd96e43aa72a9d50ebbc8eb8a66c327bca761dc..c3022a023449ec2012b7911c0be94d8f7446869b 100644 (file)
@@ -81,6 +81,7 @@ static struct i2c_algo_bit_data scx200_i2c_data = {
 
 static struct i2c_adapter scx200_i2c_ops = {
        .owner             = THIS_MODULE,
+       .id                = I2C_HW_B_SCX200,
        .algo_data         = &scx200_i2c_data,
        .name   = "NatSemi SCx200 I2C",
 };
index b65c1c9da894fc8449a1329e779c94afb7030f93..9c21dc793d7b160d525a78841ecdc98f6cf89dca 100644 (file)
 #define I2C_HW_SMBUS_OV519     0x040010 /* OV519 USB 1.1 webcam IC */
 #define I2C_HW_SMBUS_OVFX2     0x040011 /* Cypress/OmniVision FX2 webcam */
 #define I2C_HW_SMBUS_CAFE      0x040012 /* Marvell 88ALP01 "CAFE" cam  */
+#define I2C_HW_SMBUS_ALI1563   0x040013
 
 /* --- ISA pseudo-adapter                                              */
 #define I2C_HW_ISA             0x050000