Skip to contentSkip to conversation

pc87360 vref-int-ext - fix int/ext vref

PATCH New Jim Cromie 1 participant 1 message Sep 1, 2005

Subsystems (2)
lore
Share & tools
lore

Jim Cromie

author maintainer
#0 lore raw

PATCH 1/2 pc87360 vref-int-ext - fix int/ext vref

01 pc87360-01-fix-vref-ext-int-mixup.patch

fixes a 1-line bug in the internal vs external voltage reference selection, Old code used vrefint when vrefext was chosen, and vice versa.

[jimc@harpo pset-pc87360-vref]$ diffstat pc87360-0*

 2 files changed, 30 insertions(+), 2 deletions(-)
drivers/hwmon/pc87360.c +1 -1
diff -ruNp -X exclude-diffs gkh-i2c/drivers/hwmon/pc87360.c V-1/drivers/hwmon/pc87360.c
@@ -798,7 +798,7 @@ static int pc87360_detect(struct i2c_ada
 			i &= pc87360_read_value(data, LD_TEMP, NO_BANK,
 						PC87365_REG_TEMP_CONFIG);
 		}
-		data->in_vref = (i&0x02) ? 3025 : 2966;
+		data->in_vref = (i&0x02) ? 2966 : 3025;
 		dev_dbg(&new_client->dev, "Using %s reference voltage\n",
 			(i&0x02) ? "external" : "internal");