Changeset 4048

Show
Ignore:
Timestamp:
06/23/06 15:16:09 (2 years ago)
Author:
khali
Message:

lm83: Add LM82 support (2.6 backport)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lm-sensors/trunk/CHANGES

    r4044 r4048  
    1818  Module i2c-piix4: Add ServerWorks HT-1000 support (2.6 backport) 
    1919  Module i2c-viapro: Fix compilation with kernels < 2.4.21 
     20  Module lm83: Add LM82 support (2.6 backport) 
    2021  Module w83781d: Use real-time alarm registers when possible (2.6 backport) 
    2122  Module w83792d: Fix PWM range (2.6 backport) 
  • lm-sensors/trunk/README

    r3276 r4048  
    8989  Myson MTP008 
    9090  National Semiconductor LM63, LM75, LM76, LM78, LM78-J, LM79, 
    91                          LM80, LM81, LM83, LM84, LM85, LM86, LM87, 
     91                         LM80, LM81, LM82, LM83, LM84, LM85, LM86, LM87, 
    9292                         LM89, LM90, LM92, LM93, LM99, PC87360, 
    9393                         PC87363, PC87364, PC87365, PC87366 
  • lm-sensors/trunk/doc/chips/SUMMARY

    r3281 r4048  
    145145lm83 
    146146        lm83            4       -       -       -       yes     no 
     147        lm82            2       -       -       -       yes     no 
    147148 
    148149lm85 
  • lm-sensors/trunk/doc/chips/lm83

    r3007 r4048  
    1010    Datasheet: Publicly available at the National Semiconductor website 
    1111               http://www.national.com/pf/LM/LM83.html 
     12  * National Semiconductor LM82 
     13    Addresses scanned: I2C 0x18 - 0x1a, 0x29 - 0x2b, 0x4c - 0x4e 
     14    Datasheet: Publicly available at the National Semiconductor website 
     15               http://www.national.com/pf/LM/LM82.html 
    1216 
    1317 
     
    3943 
    4044The LM83 is a digital temperature sensor. It senses its own temperature as 
    41 well as the temperature of up to three external diodes. It is compatible 
    42 with many other devices such as the LM84 and all other ADM1021 clones. 
    43 The main difference between the LM83 and the LM84 in that the later can 
    44 only sense the temperature of one external diode. 
     45well as the temperature of up to three external diodes. The LM82 is 
     46a stripped down version of the LM83 that only supports one external diode. 
     47Both are compatible with many other devices such as the LM84 and all 
     48other ADM1021 clones. The main difference between the LM83 and the LM84 
     49in that the later can only sense the temperature of one external diode. 
    4550 
    4651Using the adm1021 driver for a LM83 should work, but only two temperatures 
     
    5964    Iwill       MPX2 
    6065    Soltek      SL-75DRV5 
     66 
     67The LM82 is confirmed to have been found on most AMD Geode reference 
     68designs and test platforms. 
    6169 
    6270The driver has been successfully tested by Magnus Forsström, who I'd 
  • lm-sensors/trunk/kernel/chips/lm83.c

    r2994 r4048  
    1212 * Since the datasheet omits to give the chip stepping code, I give it 
    1313 * here: 0x03 (at register 0xff). 
     14 * 
     15 * Also supports the LM82 temp sensor, which is basically a stripped down 
     16 * model of the LM83.  Datasheet is here: 
     17 * http://www.national.com/pf/LM/LM82.html 
    1418 * 
    1519 * This program is free software; you can redistribute it and/or modify 
     
    5155 */ 
    5256 
    53 SENSORS_INSMOD_1(lm83); 
     57SENSORS_INSMOD_2(lm83, lm82); 
    5458 
    5559/* 
     
    201205}; 
    202206 
     207static ctl_table lm82_dir_table_template[] = 
     208{ 
     209        {LM83_SYSCTL_LOCAL_TEMP, "temp1", NULL, 0, 0644, NULL, 
     210         &i2c_proc_real, &i2c_sysctl_real, NULL, &lm83_temp}, 
     211        {LM83_SYSCTL_REMOTE2_TEMP, "temp3", NULL, 0, 0644, NULL, 
     212         &i2c_proc_real, &i2c_sysctl_real, NULL, &lm83_temp}, 
     213        {LM83_SYSCTL_TCRIT, "tcrit", NULL, 0, 0644, NULL, 
     214         &i2c_proc_real, &i2c_sysctl_real, NULL, &lm83_tcrit}, 
     215        {LM83_SYSCTL_ALARMS, "alarms", NULL, 0, 0444, NULL, 
     216         &i2c_proc_real, &i2c_sysctl_real, NULL, &lm83_alarms}, 
     217        {0} 
     218}; 
     219 
    203220/* 
    204221 * Real code 
     
    302319                        if (chip_id == 0x03) 
    303320                                kind = lm83; 
     321                        else if (chip_id == 0x01) 
     322                                kind = lm82; 
    304323                } 
    305324        } 
     
    315334                type_name = "lm83"; 
    316335                client_name = "LM83 chip"; 
     336        } 
     337        else if (kind == lm82) 
     338        { 
     339                type_name = "lm82"; 
     340                client_name = "LM82 chip"; 
    317341        } 
    318342        else 
     
    347371         */ 
    348372 
    349         if ((err = i2c_register_entry(new_client, type_name, 
    350              lm83_dir_table_template, THIS_MODULE)) < 0) 
     373        if ((kind == lm83 && (err = i2c_register_entry(new_client, type_name, 
     374             lm83_dir_table_template, THIS_MODULE)) < 0) || 
     375            (kind == lm82 && (err = i2c_register_entry(new_client, type_name, 
     376             lm82_dir_table_template, THIS_MODULE)) < 0)) 
    351377        { 
    352378#ifdef DEBUG 
  • lm-sensors/trunk/mkpatch/Config.in

    r3226 r4048  
    3737    dep_tristate '  National Semiconductor LM78' CONFIG_SENSORS_LM78 $CONFIG_I2C $CONFIG_I2C_PROC 
    3838    dep_tristate '  National Semiconductor LM80' CONFIG_SENSORS_LM80 $CONFIG_I2C $CONFIG_I2C_PROC 
    39     dep_tristate '  National Semiconductor LM83' CONFIG_SENSORS_LM83 $CONFIG_I2C $CONFIG_I2C_PROC 
     39    dep_tristate '  National Semiconductor LM83 and compatibles' CONFIG_SENSORS_LM83 $CONFIG_I2C $CONFIG_I2C_PROC 
    4040    dep_tristate '  National Semiconductor LM85, Analog Devices ADM1027' CONFIG_SENSORS_LM85 $CONFIG_I2C $CONFIG_I2C_PROC 
    4141    dep_tristate '  National Semiconductor LM87' CONFIG_SENSORS_LM87 $CONFIG_I2C $CONFIG_I2C_PROC 
  • lm-sensors/trunk/mkpatch/mkpatch.pl

    r3276 r4048  
    539539  http://www.lm-sensors.nu/ 
    540540 
    541 National Semiconductor LM83 
     541National Semiconductor LM83 and compatibles 
    542542CONFIG_SENSORS_LM83 
    543543  If you say yes here you get support for the National Semiconductor 
    544   LM83 sensor chip.  This can also be built as a module. 
     544  LM82 and LM83 sensor chips.  This can also be built as a module. 
    545545 
    546546  You will also need the latest user-space utilities: you can find