From 0ca7f7674553f0d016655d66679255c12251ada7 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Tue, 11 May 2004 18:25:56 +0000 Subject: [PATCH] Re-enable VLM and TMS monitoring if needed (init>0). git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2524 7894878c-1315-0410-8ee3-d5d059ff63e0 --- kernel/chips/pc87360.c | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/kernel/chips/pc87360.c b/kernel/chips/pc87360.c index 76ecb4e2..8658e58f 100644 --- a/kernel/chips/pc87360.c +++ b/kernel/chips/pc87360.c @@ -609,7 +609,7 @@ int pc87360_detect(struct i2c_adapter *adapter, int address, #endif } - if (init >= 0) + if (init > 0) pc87360_init_client(new_client); if ((i = i2c_register_entry((struct i2c_client *) new_client, @@ -725,6 +725,34 @@ static void pc87360_init_client(struct i2c_client *client) } } } + + if (data->innr) { + reg = pc87360_read_value(data, LD_IN, NO_BANK, + PC87365_REG_IN_CONFIG); + if (reg & 0x01) { +#ifdef DEBUG + printk(KERN_DEBUG "pc87360.o: Forcibly " + "enabling monitoring (VLM)\n"); +#endif + pc87360_write_value(data, LD_IN, NO_BANK, + PC87365_REG_IN_CONFIG, + reg & 0xFE); + } + } + + if (data->tempnr) { + reg = pc87360_read_value(data, LD_TEMP, NO_BANK, + PC87365_REG_TEMP_CONFIG); + if (reg & 0x01) { +#ifdef DEBUG + printk(KERN_DEBUG "pc87360.o: Forcibly " + "enabling monitoring (TMS)\n"); +#endif + pc87360_write_value(data, LD_TEMP, NO_BANK, + PC87365_REG_TEMP_CONFIG, + reg & 0xFE); + } + } } static void pc87360_update_client(struct i2c_client *client)