mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-31 13:10:30 +00:00
Support the secondary Super-I/O address (0x4e/0x4f). This is a
backport from Linux 2.6. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2870 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
ef5c0563b8
commit
c06a1850ff
1 file changed
+8
-4
@@ -70,9 +70,9 @@ MODULE_PARM(init, "i");
|
||||
MODULE_PARM_DESC(init, "Set to zero to bypass chip initialization");
|
||||
|
||||
/* modified from kernel/include/traps.c */
|
||||
#define REG 0x2e /* The register to read/write */
|
||||
static int REG; /* The register to read/write */
|
||||
#define DEV 0x07 /* Register: Logical device select */
|
||||
#define VAL 0x2f /* The value to read/write */
|
||||
static int VAL; /* The value to read/write */
|
||||
|
||||
/* logical device numbers for superio_select (below) */
|
||||
#define W83627HF_LD_FDC 0x00
|
||||
@@ -588,10 +588,13 @@ static int w83627hf_attach_adapter(struct i2c_adapter *adapter)
|
||||
return i2c_detect(adapter, &addr_data, w83627hf_detect);
|
||||
}
|
||||
|
||||
static int w83627hf_find(int *address)
|
||||
static int w83627hf_find(int sioaddr, int *address)
|
||||
{
|
||||
u16 val;
|
||||
|
||||
REG = sioaddr;
|
||||
VAL = sioaddr + 1;
|
||||
|
||||
superio_enter();
|
||||
val= superio_inb(DEVID);
|
||||
if(val != W627_DEVID && val !=W627THF_DEVID && val != W697_DEVID && val != W637_DEVID) {
|
||||
@@ -1413,7 +1416,8 @@ static int __init sm_w83627hf_init(void)
|
||||
int addr;
|
||||
|
||||
printk(KERN_INFO "w83627hf.o version %s (%s)\n", LM_VERSION, LM_DATE);
|
||||
if (w83627hf_find(&addr)) {
|
||||
if (w83627hf_find(0x2e, &addr)
|
||||
&& w83627hf_find(0x4e, &addr)) {
|
||||
printk("w83627hf.o: W83627/697 not detected, module not inserted.\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user