Changeset 2816

Show
Ignore:
Timestamp:
12/29/04 12:00:18 (8 years ago)
Author:
khali
Message:

Fix MAX6657, MAX6658 and MAX6659 detection (backport from Linux

2.6).

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/kernel/chips/lm90.c

    r2784 r2816  
    3636 * LM86 does. 
    3737 * 
    38  * This driver also supports the MAX6657 and MAX6658, sensor chips made 
    39  * by Maxim. These chips are similar to the LM86. Complete datasheet 
    40  * can be obtained at Maxim's website at: 
     38 * This driver also supports the MAX6657, MAX6658 and MAX6659 sensor 
     39 * chips made by Maxim. These chips are similar to the LM86. Complete 
     40 * datasheet can be obtained at Maxim's website at: 
    4141 *   http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2578 
    42  * Note that there is no way to differenciate between both chips (but 
    43  * no need either). 
     42 * Note that there is no easy way to differenciate between the three 
     43 * variants. The extra address and features of the MAX6659 are not 
     44 * supported by this driver. 
    4445 * 
    4546 * Since the LM90 was the first chipset supported by this driver, most 
     
    7576/* 
    7677 * Addresses to scan 
    77  * Address is fully defined internally and cannot be changed. 
     78 * Address is fully defined internally and cannot be changed except for 
     79 * MAX6659. 
    7880 * LM86, LM89, LM90, LM99, ADM1032, MAX6657 and MAX6658 have address 0x4c. 
    7981 * LM89-1, and LM99-1 have address 0x4d. 
     82 * MAX6659 can have address 0x4c, 0x4d or 0x4e (unsupported). 
    8083 */ 
    8184 
     
    373376                else if (man_id == 0x4D) /* Maxim */ 
    374377                { 
    375                         if (address == 0x4C 
    376                          && (reg_config1 & 0x1F) == 0 
     378                        /* 
     379                         * The Maxim variants do NOT have a chip_id register. 
     380                         * Reading from that address will return the last read 
     381                         * value, which in our case is those of the man_id 
     382                         * register. Likewise, the config1 register seems to 
     383                         * lack a low nibble, so the value will be those of the 
     384                         * previous read, so in our case those of the man_id 
     385                         * register. 
     386                         */ 
     387                        if (chip_id == man_id 
     388                         && (reg_config1 & 0x1F) == (man_id & 0x0F) 
    377389                         && reg_convrate <= 0x09) 
    378390                                kind = max6657;