Changeset 2540

Show
Ignore:
Timestamp:
05/16/04 18:21:19 (9 years ago)
Author:
khali
Message:

Lower conversion rate when forcibly enabling monitoring of

battery voltage.

Files:
1 modified

Legend:

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

    r2534 r2540  
    158158 */ 
    159159 
     160#define PC87365_REG_IN_CONVRATE         0x07 
    160161#define PC87365_REG_IN_CONFIG           0x08 
    161162#define PC87365_REG_IN                  0x0B 
     
    663664} 
    664665 
    665 /* ldi is the logical device index: 
    666    bank is for voltages and temperatures only. */ 
     666/* ldi is the logical device index 
     667   bank is for voltages and temperatures only */ 
    667668static int pc87360_read_value(struct pc87360_data *data, u8 ldi, u8 bank, 
    668669                              u8 reg) 
     
    697698        const u8 init_temp[3] = { 2, 2, 1 }; 
    698699        u8 reg; 
     700 
     701        if (init >= 3) { 
     702                reg = pc87360_read_value(data, LD_IN, NO_BANK, 
     703                                         PC87365_REG_IN_CONVRATE); 
     704                if (reg & 0x06) { 
     705#ifdef DEBUG 
     706                        printk(KERN_DEBUG "pc87360.o: Setting " 
     707                               "VLM conversion period to 1 second\n"); 
     708#endif           
     709                        pc87360_write_value(data, LD_IN, NO_BANK, 
     710                                            PC87365_REG_IN_CONVRATE, 
     711                                            (reg & 0xF8) | 0x01); 
     712                } 
     713        } 
    699714 
    700715        for (i=0; i<data->innr; i++) {