board: gateworks: venice: gsc: fix voltage offset
authorTim Harvey <tharvey@gateworks.com>
Thu, 1 Jul 2021 00:07:39 +0000 (17:07 -0700)
committerStefano Babic <sbabic@denx.de>
Sat, 10 Jul 2021 16:12:42 +0000 (18:12 +0200)
The voltage offset property is in microvolts so must be scaled
accordingly.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
board/gateworks/venice/gsc.c

index 23ad580..9a6712e 100644 (file)
@@ -298,7 +298,7 @@ int gsc_hwmon(void)
                                }
 
                                /* adjust by offset */
-                               val += offset;
+                               val += (offset / 1000);
 
                                printf("%-8s: %d.%03dV\n", label, val / 1000, val % 1000);
                                break;