Ticket #2282: hwmon-w83627hf-enable-vbat.patch

File hwmon-w83627hf-enable-vbat.patch, 0.9 KB (added by khali, 3 years ago)

w83627hf: Enable VBAT monitoring

  • drivers/hwmon/w83627hf.c

    Subject: hwmon: (w83627hf) Enable VBAT monitoring
    
    If VBAT monitoring is disabled, enable it. Bug reported on the
    lm-sensors trac system:
    http://lm-sensors.org/ticket/2282
    This is the exact same patch that was applied to the w83627ehf driver
    6 months ago.
    
    Signed-off-by: Jean Delvare <khali@linux-fr.org>
    ---
     drivers/hwmon/w83627hf.c |    5 +++++
     1 file changed, 5 insertions(+)
    
    old new  
    15151515                            (w83627hf_read_value(data, 
    15161516                                                W83781D_REG_CONFIG) & 0xf7) 
    15171517                            | 0x01); 
     1518 
     1519        /* Enable VBAT monitoring if needed */ 
     1520        tmp = w83627hf_read_value(data, W83781D_REG_VBAT); 
     1521        if (!(tmp & 0x01)) 
     1522                w83627hf_write_value(data, W83781D_REG_VBAT, tmp | 0x01); 
    15181523} 
    15191524 
    15201525static void w83627hf_update_fan_div(struct w83627hf_data *data)