Show
Ignore:
Timestamp:
03/10/00 21:30:45 (9 years ago)
Author:
bobd
Message:

(bobd) now configures temp alarms to stay on while out of range (via686a default is to clear alarm when reg is read)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lm-sensors/trunk/kernel/chips/via686a.c

    r766 r768  
    102102#define VIA686A_REG_FANDIV 0x47 
    103103#define VIA686A_REG_CONFIG 0x40 
     104// The following register sets temp interrupt mode (bits 1-0 for temp1,  
     105// 3-2 for temp2, 5-4 for temp3).  Modes are: 
     106//    00 interrupt stays as long as value is out-of-range 
     107//    01 interrupt is cleared once register is read (default) 
     108//    10 comparator mode- like 00, but ignores hysteresis 
     109//    11 same as 00 
     110#define VIA686A_REG_TEMP_MODE 0x4b 
     111// We'll just assume that you want to set all 3 simulataneously: 
     112#define VIA686A_TEMP_MODE_MASK 0x3F 
     113#define VIA686A_TEMP_MODE_CONTINUOUS (0x00) 
    104114 
    105115/* Conversions. Rounding and limit checking is only done on the TO_REG 
     
    674684        /* Start monitoring */ 
    675685        via686a_write_value(client, VIA686A_REG_CONFIG, 0x01); 
     686 
     687        /* Cofigure temp interrupt mode for continuous-interrupt operation */ 
     688        via686a_write_value(client, VIA686A_REG_TEMP_MODE,  
     689                            via686a_read_value(client, VIA686A_REG_TEMP_MODE) & 
     690                            !VIA686A_TEMP_MODE_MASK | VIA686A_TEMP_MODE_CONTINUOUS); 
    676691} 
    677692