From c374f6237c0b00da63b0124046d99542005e7fdc Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Wed, 22 Oct 2008 14:16:51 +0000 Subject: [PATCH] Add support for the VIA VX800/VX820 SMBus. Backported from Linux 2.6. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5368 7894878c-1315-0410-8ee3-d5d059ff63e0 --- CHANGES | 1 + README | 3 ++- doc/busses/i2c-viapro | 8 ++++++-- kernel/busses/i2c-viapro.c | 13 +++++++++++++ mkpatch/mkpatch.pl | 4 ++-- 5 files changed, 24 insertions(+), 5 deletions(-) diff --git a/CHANGES b/CHANGES index 26d685be..62bb67e5 100644 --- a/CHANGES +++ b/CHANGES @@ -10,6 +10,7 @@ SVN-HEAD Module i2c-i801: Remove verbose debugging messages (2.6 backport) Properly report bus arbitration lost (2.6 backport) Module i2c-piix4: Minor cleanups (2.6 backport) + Module i2c-viapro: Add VX800/VX820 support (2.6 backport) Program pwmconfig: Fix MINSTOP and MINSTART test functions (#2340) Change default for MINTEMP from 0 to 20 degrees C Program sensord: Add it8720 support diff --git a/README b/README index 7834073a..c3bccb43 100644 --- a/README +++ b/README @@ -61,7 +61,8 @@ At least the following I2C/SMBus adapters are supported: SMSC Victory66 3Dfx Voodoo 3 and Banshee VIA Technologies VT82C586B, VT82C596A/B, VT82C686A/B, VT8231, - VT8233, VT8233A, VT8235, VT8237R/A, VT8251, CX700 + VT8233, VT8233A, VT8235, VT8237R/A, VT8251, + CX700, VX800/VX820 At least the following hardware sensor chips are supported: diff --git a/doc/busses/i2c-viapro b/doc/busses/i2c-viapro index 375d305d..cf677092 100644 --- a/doc/busses/i2c-viapro +++ b/doc/busses/i2c-viapro @@ -15,6 +15,9 @@ Supported adapters: * VIA Technologies, Inc. CX700 Datasheet: available on request and under NDA from VIA + * VIA Technologies, Inc. VX800/VX820 + Datasheet: available on http://linux.via.com.tw + Authors: Kyösti Mälkki Mark D. Studebaker @@ -49,6 +52,7 @@ Your /proc/pci or lspci -n listing must show one of these : device 1106:3337 (VT8237A) device 1106:3287 (VT8251) device 1106:8324 (CX700) + device 1106:8353 (VX800/VX820) If none of these show up, you should look in the BIOS for settings like enable ACPI / SMBus or even USB. @@ -57,5 +61,5 @@ Except for the oldest chips (VT82C596A/B, VT82C686A and most probably VT8231), this driver supports I2C block transactions. Such transactions are mainly useful to read from and write to EEPROMs. -The CX700 additionally appears to support SMBus PEC, although this driver -doesn't implement it. +The CX700/VX800/VX820 additionally appears to support SMBus PEC, although +this driver doesn't implement it. diff --git a/kernel/busses/i2c-viapro.c b/kernel/busses/i2c-viapro.c index 3a6d70f2..9b7a25bd 100644 --- a/kernel/busses/i2c-viapro.c +++ b/kernel/busses/i2c-viapro.c @@ -37,6 +37,7 @@ VT8237A 0x3337 yes VT8251 0x3287 yes CX700 0x8324 yes + VX800/VX820 0x8353 yes Note: we assume there can only be one device, with one SMBus interface. */ @@ -76,6 +77,10 @@ #ifndef PCI_DEVICE_ID_VIA_CX700 #define PCI_DEVICE_ID_VIA_CX700 0x8324 #endif +/* VX800 is undefined */ +#ifndef PCI_DEVICE_ID_VIA_VX800 +#define PCI_DEVICE_ID_VIA_VX800 0x8353 +#endif #define SMBBA1 0x90 #define SMBBA2 0x80 @@ -424,6 +429,7 @@ found: switch (id->device) { case PCI_DEVICE_ID_VIA_CX700: + case PCI_DEVICE_ID_VIA_VX800: case PCI_DEVICE_ID_VIA_8251: case PCI_DEVICE_ID_VIA_8237: case PCI_DEVICE_ID_VIA_8237A: @@ -529,6 +535,13 @@ static struct pci_device_id vt596_ids[] __initdata = { .subdevice = PCI_ANY_ID, .driver_data = SMBBA3 }, + { + .vendor = PCI_VENDOR_ID_VIA, + .device = PCI_DEVICE_ID_VIA_VX800, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = SMBBA3 + }, { 0, } }; diff --git a/mkpatch/mkpatch.pl b/mkpatch/mkpatch.pl index 87ed4e38..2a1d0a3c 100755 --- a/mkpatch/mkpatch.pl +++ b/mkpatch/mkpatch.pl @@ -267,7 +267,7 @@ CONFIG_I2C_VIA be built as a module which can be inserted and removed while the kernel is running. -VIA Technologies, Inc. VT82C596/82C686/82xx and CX700 +VIA Technologies, Inc. VT82C596/82C686/82xx and CX700/VX800/VX820 CONFIG_I2C_VIAPRO If you say yes to this option, support will be included for the VIA Technologies I2C adapter on these chips. For integrated sensors on the @@ -998,7 +998,7 @@ sub gen_drivers_i2c_Config_in dep_tristate ' SiS 645/961,645DX/961,735' CONFIG_I2C_SIS645 $CONFIG_I2C $CONFIG_HOTPLUG dep_tristate ' Savage 4' CONFIG_I2C_SAVAGE4 $CONFIG_I2C_ALGOBIT dep_tristate ' VIA Technologies, Inc. VT82C586B' CONFIG_I2C_VIA $CONFIG_I2C_ALGOBIT - dep_tristate ' VIA Technologies, Inc. VT82C596/82C686/82xx and CX700' CONFIG_I2C_VIAPRO $CONFIG_I2C + dep_tristate ' VIA Technologies, Inc. VT82C596/82C686/82xx and CX700/VX800/VX820' CONFIG_I2C_VIAPRO $CONFIG_I2C dep_tristate ' Voodoo3 I2C interface' CONFIG_I2C_VOODOO3 $CONFIG_I2C_ALGOBIT dep_tristate ' Pseudo ISA adapter (for some hardware sensors)' CONFIG_I2C_ISA $CONFIG_I2C fi