Skip to contentSkip to conversation

fix for fscpos voltage values

PATCH New Stefan Ott 2 participants 4 messages May 19, 2005

lore
Share & tools
lore

Stefan Ott

author
#0 lore raw

PATCH 1/1 fix for fscpos voltage values

Multiplied the voltage multipliers by 10 in order to comply with the sysfs guidelines.

fscpos.c renamed from fscpos.c-orig +3 -3
@@ -244,19 +244,19 @@
 static ssize_t show_volt_12(struct device *dev, char *buf)
 {
 	struct fscpos_data *data = fscpos_update_device(dev);
-	return sprintf(buf, "%u\n", VOLT_FROM_REG(data->volt[0], 1420));
+	return sprintf(buf, "%u\n", VOLT_FROM_REG(data->volt[0], 14200));
 }
 
 static ssize_t show_volt_5(struct device *dev, char *buf)
 {
 	struct fscpos_data *data = fscpos_update_device(dev);
-	return sprintf(buf, "%u\n", VOLT_FROM_REG(data->volt[1], 660));
+	return sprintf(buf, "%u\n", VOLT_FROM_REG(data->volt[1], 6600));
 }
 
 static ssize_t show_volt_batt(struct device *dev, char *buf)
 {
 	struct fscpos_data *data = fscpos_update_device(dev);
-	return sprintf(buf, "%u\n", VOLT_FROM_REG(data->volt[2], 330));
+	return sprintf(buf, "%u\n", VOLT_FROM_REG(data->volt[2], 3300));
 }
 
 /* Watchdog */

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20050120/9bf62b32/attachment.bin

#1 lore raw

PATCH 1/1 fix for fscpos voltage values

Quoted 4 lines · Stefan Ott

Multiplied the voltage multipliers by 10 in order to comply with the sysfs guidelines.

That's nice, but:

fscpos.c

Quoted 2 lines
fscpos.c renamed from fscpos.c-orig +0 -0

That isn't :(

I need a patch I can apply with -p1 from the main root of the kernel tree, as Documentation/SubmittingPatches specifies.

Third times the charm...

greg k-h

author
#2 lore raw

PATCH 1/1 fix for fscpos voltage values

In reply to Stefan Ott

Multiplied the voltage multipliers by 10 in order to comply with the sysfs guidelines.

drivers/i2c/chips/fscpos.c +3 -3
diff -Nru linux-2.6.11-rc1-yesterday/drivers/i2c/chips/fscpos.c linux-2.6.11-rc1/drivers/i2c/chips/fscpos.c
@@ -244,19 +244,19 @@
 static ssize_t show_volt_12(struct device *dev, char *buf)
 {
 	struct fscpos_data *data = fscpos_update_device(dev);
-	return sprintf(buf, "%u\n", VOLT_FROM_REG(data->volt[0], 1420));
+	return sprintf(buf, "%u\n", VOLT_FROM_REG(data->volt[0], 14200));
 }
 
 static ssize_t show_volt_5(struct device *dev, char *buf)
 {
 	struct fscpos_data *data = fscpos_update_device(dev);
-	return sprintf(buf, "%u\n", VOLT_FROM_REG(data->volt[1], 660));
+	return sprintf(buf, "%u\n", VOLT_FROM_REG(data->volt[1], 6600));
 }
 
 static ssize_t show_volt_batt(struct device *dev, char *buf)
 {
 	struct fscpos_data *data = fscpos_update_device(dev);
-	return sprintf(buf, "%u\n", VOLT_FROM_REG(data->volt[2], 330));
+	return sprintf(buf, "%u\n", VOLT_FROM_REG(data->volt[2], 3300));
 }
 
 /* Watchdog */

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20050120/feeb8b06/attachment.bin

Applied
#3 lore raw

PATCH 1/1 fix for fscpos voltage values

In reply to Stefan Ott
Quoted 2 lines · Stefan Ott

Multiplied the voltage multipliers by 10 in order to comply with the sysfs guidelines.

Applied, thanks.

greg k-h