Changeset 3204

Show
Ignore:
Timestamp:
12/09/05 20:29:01 (7 years ago)
Author:
khali
Message:

Display VID as 0V for W83627THF when GPIO5 is not used as VID
inputs. Backport of Yuan Mu's patch for Linux 2.6.

Files:
1 modified

Legend:

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

    r3186 r3204  
    818818        /* Make sure the pins are configured for input 
    819819           There must be at least five (VRM 9), and possibly 6 (VRM 10) */ 
    820         sel = superio_inb(W83627THF_GPIO5_IOSR); 
     820        sel = superio_inb(W83627THF_GPIO5_IOSR) & 0x3f; 
    821821        if ((sel & 0x1f) != 0x1f) { 
    822822#ifdef DEBUG 
     
    888888                data->vid = (lo & 0x0f) | ((hi & 0x01) << 4); 
    889889        } else if (w83627thf == data->type) { 
    890                 data->vid = w83627thf_read_gpio5(client) & 0x3f; 
     890                data->vid = w83627thf_read_gpio5(client); 
    891891        } 
    892892 
     
    11851185                *nrels_mag = 3; 
    11861186        else if (operation == SENSORS_PROC_REAL_READ) { 
    1187                 w83627hf_update_client(client); 
    1188                 results[0] = vid_from_reg(data->vid, data->vrm); 
     1187                if (data->vid == 0xff) 
     1188                        results[0] = 0; 
     1189                else 
     1190                        results[0] = vid_from_reg(data->vid, data->vrm); 
    11891191                *nrels_mag = 1; 
    11901192        }