Skip to content

Commit

Permalink
i2c: Add IDs to adapters
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stephen Hemminger authored and Jean Delvare committed Feb 13, 2007
1 parent a394ae1 commit 9ace555
Show file tree
Hide file tree
Showing 18 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/i2c/busses/i2c-ali1535.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
1 change: 1 addition & 0 deletions drivers/i2c/busses/i2c-ali1563.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
1 change: 1 addition & 0 deletions drivers/i2c/busses/i2c-ali15x3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
1 change: 1 addition & 0 deletions drivers/i2c/busses/i2c-amd756.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
1 change: 1 addition & 0 deletions drivers/i2c/busses/i2c-amd8111.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions drivers/i2c/busses/i2c-i801.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
2 changes: 2 additions & 0 deletions drivers/i2c/busses/i2c-i810.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand All @@ -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,
};
Expand Down
1 change: 1 addition & 0 deletions drivers/i2c/busses/i2c-nforce2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions drivers/i2c/busses/i2c-piix4.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
1 change: 1 addition & 0 deletions drivers/i2c/busses/i2c-savage4.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
1 change: 1 addition & 0 deletions drivers/i2c/busses/i2c-sis5595.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
1 change: 1 addition & 0 deletions drivers/i2c/busses/i2c-sis630.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
1 change: 1 addition & 0 deletions drivers/i2c/busses/i2c-sis96x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
1 change: 1 addition & 0 deletions drivers/i2c/busses/i2c-via.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions drivers/i2c/busses/i2c-viapro.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
2 changes: 2 additions & 0 deletions drivers/i2c/busses/i2c-voodoo3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
1 change: 1 addition & 0 deletions drivers/i2c/busses/scx200_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
};
Expand Down
1 change: 1 addition & 0 deletions include/linux/i2c-id.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@
#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
Expand Down

0 comments on commit 9ace555

Please sign in to comment.