[PATCH 2/5] board: gateworks: venice: gsc: fix voltage offset

Tim Harvey tharvey at gateworks.com
Thu Jul 1 02:07:39 CEST 2021


The voltage offset property is in microvolts so must be scaled
accordingly.

Signed-off-by: Tim Harvey <tharvey at gateworks.com>
---
 board/gateworks/venice/gsc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/gateworks/venice/gsc.c b/board/gateworks/venice/gsc.c
index 23ad58094c..9a6712ec88 100644
--- a/board/gateworks/venice/gsc.c
+++ b/board/gateworks/venice/gsc.c
@@ -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;
-- 
2.17.1



More information about the U-Boot mailing list