From a359166a48bb5a4dd63ccd9bfd2e9d0baf423656 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Tue, 13 Dec 2005 19:44:04 +0000 Subject: [PATCH] Check for Fintek ID. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@3214 7894878c-1315-0410-8ee3-d5d059ff63e0 --- kernel/chips/f71805f.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/kernel/chips/f71805f.c b/kernel/chips/f71805f.c index b73c721e..fdda29fb 100644 --- a/kernel/chips/f71805f.c +++ b/kernel/chips/f71805f.c @@ -50,9 +50,11 @@ SENSORS_INSMOD_1(f71805f); #define SIO_REG_LDSEL 0x07 /* Logical device select */ #define SIO_REG_DEVID 0x20 /* Device ID (2 bytes) */ #define SIO_REG_DEVREV 0x22 /* Device revision */ +#define SIO_REG_MANID 0x23 /* Fintek ID (2 bytes) */ #define SIO_REG_ENABLE 0x30 /* Logical device enable */ #define SIO_REG_ADDR 0x60 /* Logical device address (2 bytes) */ +#define SIO_FINTEK_ID 0x1934 #define SIO_F71805F_ID 0x0406 static inline int @@ -696,10 +698,17 @@ static int __init f71805f_find(int sioaddr, unsigned int *address) superio_enter(sioaddr); - devid = superio_inw(sioaddr, SIO_REG_DEVID); - if (devid != SIO_F71805F_ID) + devid = superio_inw(sioaddr, SIO_REG_MANID); + if (devid != SIO_FINTEK_ID) goto exit; + devid = superio_inw(sioaddr, SIO_REG_DEVID); + if (devid != SIO_F71805F_ID) { + printk(KERN_INFO "%s: Unsupported Fintek device, " + "skipping\n", DRVNAME); + goto exit; + } + superio_select(sioaddr, F71805F_LD_HWM); if (!(superio_inb(sioaddr, SIO_REG_ENABLE) & 0x01)) { printk(KERN_WARNING "%s: Device not activated, skipping\n",