(mds) add i815 support to i2c-i810 driver.

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@862 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Mark D. Studebaker committed 2000-09-02 19:20:23 +00:00
1 parent 73428c9d7b
commit 42bbb8bb93
4 files changed
+44 -49

No files matched your search

+3 -1
View File
@@ -17,11 +17,13 @@ ask CVS about it:
Module i2c-i801: support Intel 82801BA (815E chipset)
Module i2c-i801: add i2c block write support, fix smbus block bugs
(requires i2c 2.5.3 package)
Module i2c-i810: support Intel 82815
Program i2cdump: Add smbus block read support
Programs i2cdetect, i2cdump: Improve error reporting
Program sensors: new switch -u (--unknown)
Program sensors-detect: detect ITE IT8705F / IT8712F (no driver yet)
Program sensors-detect: detect Intel 82801BA (815E chipset)
Program sensors-detect: detect Intel 82815
Program sensors-detect: detect ITE IT8705F / IT8712F (no driver yet)
Program sensors-detect: detect National LM87 (no driver yet)
2.5.2 (20000709)
+1 -1
View File
@@ -41,7 +41,7 @@ At least the following I2C/SMBus adapters are supported:
Apple Hydra (used on some PPC machines)
Intel I801 ICH/ICH0/ICH2 (used in Intel 810, 810E, 815E, 820, 840 chipsets)
Intel PIIX4 (used in many Intel chipsets)
Intel I810 GMCH
Intel I810/I815 GMCH
SiS 5595 (used in many SiS chipsets)
3Dfx Voodoo 3 and Banshee
VIA Technologies VT82C586B, VT82C596A/B, and VT82C686A
+5 -6
View File
@@ -1,9 +1,9 @@
Kernel driver `i2c-i810.o'
Status: 'Beta', still under development and testing
Status: Stable
Supported adapters:
* Intel 82810 and 82810-DC100 (GMCH)
* Intel 82810, 82810-DC100, and 82815 (GMCH)
Author: Frodo Looijaard <frodol@dds.nl>, Philip Edelbrock
<phil@netroedge.com>,
@@ -20,9 +20,9 @@ Module Parameters
Description
-----------
WARNING: If you have an '810' motherboard, your standard I2C
WARNING: If you have an '810' or '815' motherboard, your standard I2C
temperature sensors are most likely on the 801's I2C bus.
You want the i2c-i801.o driver for those.
You want the i2c-i801.o driver for those, not this driver.
Now for the i2c-i810...
@@ -40,8 +40,7 @@ to a digital flat-panel display.
Stability
---------
Seems to be stable on the test machine, but needs more testing on other
machines.
Apparently stable.
Supported Devices
-----------------
+35 -41
View File
@@ -1,7 +1,7 @@
/*
i2c-i810.c - Part of lm_sensors, Linux kernel modules for hardware
monitoring
Copyright (c) 1998, 1999 Frodo Looijaard <frodol@dds.nl>,
Copyright (c) 1998, 1999, 2000 Frodo Looijaard <frodol@dds.nl>,
Philip Edelbrock <phil@netroedge.com>,
Ralph Metzler <rjkm@thp.uni-koeln.de>, and
Mark D. Studebaker <mdsxyz123@yahoo.com>
@@ -23,9 +23,16 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
This interfaces to the I810/I815 to provide access to
the DDC Bus and the I2C Bus.
SUPPORTED DEVICES PCI ID
i810AA 7121
i810AB 7123
i815 1132
*/
/* This interfaces to the I2C bus of the I810 to gain access to
the DDC Bus and possibly other I2C devices. */
#include <linux/version.h>
#include <linux/module.h>
@@ -43,6 +50,14 @@
#ifndef PCI_DEVICE_ID_INTEL_82810_IG3
#define PCI_DEVICE_ID_INTEL_82810_IG3 0x7123
#endif
#ifndef PCI_DEVICE_ID_INTEL_82815_2
#define PCI_DEVICE_ID_INTEL_82815_2 0x1132
#endif
static int i810_supported[] = {PCI_DEVICE_ID_INTEL_82810_IG1,
PCI_DEVICE_ID_INTEL_82810_IG3,
PCI_DEVICE_ID_INTEL_82815_2,
0 };
/* GPIO register locations */
#define I810_IOCONTROL_OFFSET 0x5000
@@ -162,7 +177,7 @@ static struct i2c_algo_bit_data i810_i2c_bit_data = {
};
static struct i2c_adapter i810_i2c_adapter = {
"I810 I2C Adapter",
"I810/I815 I2C Adapter",
I2C_HW_B_I810,
NULL,
&i810_i2c_bit_data,
@@ -182,7 +197,7 @@ static struct i2c_algo_bit_data i810_ddc_bit_data = {
};
static struct i2c_adapter i810_ddc_adapter = {
"I810 DDC Adapter",
"I810/I815 DDC Adapter",
I2C_HW_B_I810,
NULL,
&i810_ddc_bit_data,
@@ -213,45 +228,24 @@ void config_i810(struct pci_dev *dev)
bit_i810ddc_setsda(NULL, 1);
}
/* Detect whether a I810 or I810_DC100 can be found,
/* Detect whether a supported device can be found,
and initialize it */
static int i810i2c_setup(void)
{
struct pci_dev *dev;
int num = 0;
struct pci_dev *dev = NULL;
int *num = i810_supported;
dev = NULL;
do {
if ((dev = pci_find_device(PCI_VENDOR_ID_INTEL,
PCI_DEVICE_ID_INTEL_82810_IG1,
dev))) {
if (!num)
config_i810(dev);
num++;
}
} while (dev);
dev = NULL;
do {
if ((dev = pci_find_device(PCI_VENDOR_ID_INTEL,
PCI_DEVICE_ID_INTEL_82810_IG3,
dev))) {
if (!num)
config_i810(dev);
num++;
}
} while (dev);
if (num > 0) {
printk(KERN_INFO
"i2c-i810.o: %d i810 found.\n", num);
if (num > 1)
*num++, dev))) {
config_i810(dev);
printk(KERN_INFO
"i2c-i810.o: warning: only 1 supported.\n");
return 0;
} else {
return -ENODEV;
}
"i2c-i810.o: i810/i815 found.\n");
return 0;
}
} while (*num != 0);
return -ENODEV;
}
@@ -273,20 +267,20 @@ int __init i2c_i810i2c_init(void)
i810i2c_initialized = 0;
if ((res = i810i2c_setup())) {
printk
("i2c-i810.o: i810 not detected, module not inserted.\n");
("i2c-i810.o: i810/i815 not detected, module not inserted.\n");
i810i2c_cleanup();
return res;
}
if ((res = i2c_bit_add_bus(&i810_i2c_adapter))) {
printk("i2c-i810.o: I2C adapter registration failed\n");
} else {
printk("i2c-i810.o: I810 I2C bus initialized\n");
printk("i2c-i810.o: I810/I815 I2C bus initialized\n");
i810i2c_initialized |= INIT2;
}
if ((res = i2c_bit_add_bus(&i810_ddc_adapter))) {
printk("i2c-i810.o: DDC adapter registration failed\n");
} else {
printk("i2c-i810.o: I810 DDC bus initialized\n");
printk("i2c-i810.o: I810/I815 DDC bus initialized\n");
i810i2c_initialized |= INIT3;
}
if(!(i810i2c_initialized & (INIT2 | INIT3))) {
@@ -326,7 +320,7 @@ EXPORT_NO_SYMBOLS;
MODULE_AUTHOR
("Frodo Looijaard <frodol@dds.nl>, Philip Edelbrock <phil@netroedge.com>, Ralph Metzler <rjkm@thp.uni-koeln.de>, and Mark D. Studebaker <mdsxyz123@yahoo.com>");
MODULE_DESCRIPTION("I810 I2C/DDC driver");
MODULE_DESCRIPTION("I810/I815 I2C/DDC driver");
int init_module(void)