]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
hwmon: (ltc4245) Clear faults at startup
authorIra W. Snyder <iws@ovro.caltech.edu>
Wed, 23 Sep 2009 20:59:44 +0000 (22:59 +0200)
committerJean Delvare <khali@linux-fr.org>
Wed, 23 Sep 2009 20:59:44 +0000 (22:59 +0200)
When power is applied to the ltc4245 chip it sometimes reports spurious
faults, which are exposed as alarms in the hwmon output. Clear the fault
register when the driver is installed to clear the alarms.

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
drivers/hwmon/ltc4245.c

index 034b2c5158486dd0c3ccc5482b82de02098961b1..e389643336126897d9abd8adf08cfe3464425712 100644 (file)
@@ -382,7 +382,8 @@ static int ltc4245_probe(struct i2c_client *client,
        mutex_init(&data->update_lock);
 
        /* Initialize the LTC4245 chip */
-       /* TODO */
+       i2c_smbus_write_byte_data(client, LTC4245_FAULT1, 0x00);
+       i2c_smbus_write_byte_data(client, LTC4245_FAULT2, 0x00);
 
        /* Register sysfs hooks */
        ret = sysfs_create_group(&client->dev.kobj, &ltc4245_group);