瀏覽代碼

hwmon: (ltc4215) Clear faults at startup

When power is applied to the ltc4215 chip it sometimes reports spurious
faults. The faults are not yet exposed via sysfs, however it may be useful
for userspace to read the fault register directly with the i2cget command.
Clear the fault register when the driver is installed so userspace doesn't
have to worry about spurious fault indications.

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Ira W. Snyder 15 年之前
父節點
當前提交
b6b9d69602
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/hwmon/ltc4215.c

+ 1 - 1
drivers/hwmon/ltc4215.c

@@ -259,7 +259,7 @@ static int ltc4215_probe(struct i2c_client *client,
 	mutex_init(&data->update_lock);
 	mutex_init(&data->update_lock);
 
 
 	/* Initialize the LTC4215 chip */
 	/* Initialize the LTC4215 chip */
-	/* TODO */
+	i2c_smbus_write_byte_data(client, LTC4215_FAULT, 0x00);
 
 
 	/* Register sysfs hooks */
 	/* Register sysfs hooks */
 	ret = sysfs_create_group(&client->dev.kobj, &ltc4215_group);
 	ret = sysfs_create_group(&client->dev.kobj, &ltc4215_group);