lkml.org 
[lkml]   [2003]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH-2.5] Fix w83781d sensor to use Milli-Volt for in_* in sysfs
From
Date
Hi

I did the w83781d sysfs update as per the old spec, which was not
milli-volt. This patch should fix it.


Regards,

--

Martin Schlemmer


--- drivers/i2c/chips/w83781d.c.orig 2003-04-07 22:53:37.000000000 +0200
+++ drivers/i2c/chips/w83781d.c 2003-04-07 22:53:34.000000000 +0200
@@ -364,7 +364,7 @@
\
w83781d_update_client(client); \
\
- return sprintf(buf,"%ld\n", (long)IN_FROM_REG(data->reg[nr] * 10)); \
+ return sprintf(buf,"%ld\n", (long)IN_FROM_REG(data->reg[nr])); \
}
show_in_reg(in);
show_in_reg(in_min);
@@ -378,7 +378,7 @@
u32 val; \
\
val = simple_strtoul(buf, NULL, 10); \
- data->in_##reg[nr] = (IN_TO_REG(val) / 10); \
+ data->in_##reg[nr] = IN_TO_REG(val); \
w83781d_write_value(client, W83781D_REG_IN_##REG(nr), data->in_##reg[nr]); \
\
return count; \[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.087 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site