Show
Ignore:
Timestamp:
05/02/02 16:44:31 (12 years ago)
Author:
merlin
Message:

mh: Fix i2c-amd756 support for non-nForce chips (probably a
patch error vs changed source). Change module so it registers
the detected device in i2c under its own name (e.g,
AMD756/AMD766/AMD768/nVidia nForce rather than AMD7X6).
Updated sensors-detect accordingly.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/kernel/busses/i2c-amd756.c

    r1366 r1367  
    33              monitoring 
    44 
    5     Copyright (c) 1999 Merlin Hughes <merlin@merlin.org> 
     5    Copyright (c) 1999-2002 Merlin Hughes <merlin@merlin.org> 
    66 
    77    Shamelessly ripped from i2c-piix4.c: 
     
    156156 
    157157static int __initdata amd756_initialized; 
     158static struct sd *amd756_sd = NULL; 
    158159static unsigned short amd756_smba = 0; 
    159160 
     
    197198                if ((temp & 128) == 0) { 
    198199                        printk("i2c-amd756.o: Error: SMBus controller I/O not enabled!\n"); 
     200                        return(-ENODEV); 
    199201                } 
    200                 return(-ENODEV); 
    201202 
    202203                /* Determine the address of the SMBus areas */ 
     
    223224        printk("i2c-amd756.o: AMD756_smba = 0x%X\n", amd756_smba); 
    224225#endif                          /* DEBUG */ 
     226 
     227        /* store struct sd * for future reference */ 
     228        amd756_sd = currdev; 
    225229 
    226230        return 0; 
     
    482486        if ((res = amd756_setup())) { 
    483487                printk 
    484                     ("i2c-amd756.o: AMD756/766 not detected, module not inserted.\n"); 
     488                    ("i2c-amd756.o: AMD756 or compatible device not detected, module not inserted.\n"); 
    485489                amd756_cleanup(); 
    486490                return res; 
    487491        } 
    488492        amd756_initialized++; 
    489         sprintf(amd756_adapter.name, "SMBus AMD7X6 adapter at %04x", 
    490                 amd756_smba); 
     493        sprintf(amd756_adapter.name, "SMBus %s adapter at %04x", 
     494                amd756_sd->name, amd756_smba); 
    491495        if ((res = i2c_add_adapter(&amd756_adapter))) { 
    492496                printk 
     
    496500        } 
    497501        amd756_initialized++; 
    498         printk("i2c-amd756.o: AMD756/766 bus detected and initialized\n"); 
     502        printk("i2c-amd756.o: %s bus detected and initialized\n", 
     503               amd756_sd->name); 
    499504        return 0; 
    500505} 
     
    523528 
    524529MODULE_AUTHOR("Merlin Hughes <merlin@merlin.org>"); 
    525 MODULE_DESCRIPTION("AMD756/766 SMBus driver"); 
     530MODULE_DESCRIPTION("AMD756/766/768/nVidia nForce SMBus driver"); 
    526531 
    527532#ifdef MODULE_LICENSE