]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
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 23ad58094cd461cb5c3c9918aa3335997c98de21..9a6712ec884befbd1e12fdae8d3820a898dc087c 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;