Commit 8e7b8263 authored by Jean Delvare's avatar Jean Delvare Committed by Greg Kroah-Hartman

[PATCH] I2C: restore support for AMD8111 in i2c-amd756 driver

This patch restores support for the AMD8111 in the i2c-amd756 driver.

Credits go to Philip Pokorny for the original patch. I tweaked it a bit.

This isn't a bug fix and can be delayed until after 2.6.0 if you want.
parent 2533fe7f
......@@ -28,10 +28,12 @@
2002-04-08: Added nForce support. (Csaba Halasz)
2002-10-03: Fixed nForce PnP I/O port. (Michael Steil)
2002-12-28: Rewritten into something that resembles a Linux driver (hch)
2003-11-29: Added back AMD8111 removed by the previous rewrite.
(Philip Pokorny)
*/
/*
Supports AMD756, AMD766, AMD768 and nVidia nForce
Supports AMD756, AMD766, AMD768, AMD8111 and nVidia nForce
Note: we assume there can only be one device, with one SMBus interface.
*/
......@@ -308,12 +310,13 @@ static struct i2c_adapter amd756_adapter = {
.name = "unset",
};
enum chiptype { AMD756, AMD766, AMD768, NFORCE };
enum chiptype { AMD756, AMD766, AMD768, NFORCE, AMD8111 };
static struct pci_device_id amd756_ids[] = {
{PCI_VENDOR_ID_AMD, 0x740B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AMD756 },
{PCI_VENDOR_ID_AMD, 0x7413, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AMD766 },
{PCI_VENDOR_ID_AMD, 0x7443, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AMD768 },
{PCI_VENDOR_ID_AMD, 0x746B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, AMD8111 },
{PCI_VENDOR_ID_NVIDIA, 0x01B4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, NFORCE },
{ 0, }
};
......@@ -321,7 +324,8 @@ static struct pci_device_id amd756_ids[] = {
static int __devinit amd756_probe(struct pci_dev *pdev,
const struct pci_device_id *id)
{
int nforce = (id->driver_data == NFORCE), error;
int nforce = (id->driver_data == NFORCE);
int error;
u8 temp;
if (amd756_ioport) {
......@@ -368,7 +372,7 @@ static int __devinit amd756_probe(struct pci_dev *pdev,
amd756_adapter.dev.parent = &pdev->dev;
snprintf(amd756_adapter.name, I2C_NAME_SIZE,
"SMBus AMD75x adapter at %04x", amd756_ioport);
"SMBus AMD756 adapter at %04x", amd756_ioport);
error = i2c_add_adapter(&amd756_adapter);
if (error) {
......@@ -391,7 +395,7 @@ static void __devexit amd756_remove(struct pci_dev *dev)
}
static struct pci_driver amd756_driver = {
.name = "amd75x smbus",
.name = "amd756 smbus",
.id_table = amd756_ids,
.probe = amd756_probe,
.remove = __devexit_p(amd756_remove),
......@@ -408,7 +412,7 @@ static void __exit amd756_exit(void)
}
MODULE_AUTHOR("Merlin Hughes <merlin@merlin.org>");
MODULE_DESCRIPTION("AMD756/766/768/nVidia nForce SMBus driver");
MODULE_DESCRIPTION("AMD756/766/768/8111 and nVidia nForce SMBus driver");
MODULE_LICENSE("GPL");
module_init(amd756_init)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment