public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tim Harvey <tharvey@gateworks.com>
To: Stefano Babic <sbabic@denx.de>,
	Fabio Estevam <festevam@gmail.com>,
	"NXP i . MX U-Boot Team" <uboot-imx@nxp.com>,
	u-boot@lists.denx.de
Cc: Tim Harvey <tharvey@gateworks.com>
Subject: [PATCH 2/5] board: gateworks: venice: gsc: fix voltage offset
Date: Wed, 30 Jun 2021 17:07:39 -0700	[thread overview]
Message-ID: <20210701000742.6522-2-tharvey@gateworks.com> (raw)
In-Reply-To: <20210701000742.6522-1-tharvey@gateworks.com>

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 | 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


  reply	other threads:[~2021-07-01  0:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-01  0:07 [PATCH 1/5] board: gateworks: venice: gsc: fix typo Tim Harvey
2021-07-01  0:07 ` Tim Harvey [this message]
2021-07-10 19:35   ` [PATCH 2/5] board: gateworks: venice: gsc: fix voltage offset sbabic
2021-07-01  0:07 ` [PATCH 3/5] board: gateworks: venice: display DTB used Tim Harvey
2021-07-10 19:36   ` sbabic
2021-07-01  0:07 ` [PATCH 4/5] board: gateworks: venice: add ftd_file env vars on boot Tim Harvey
2021-07-10 19:37   ` sbabic
2021-07-01  0:07 ` [PATCH 5/5] board: gateworks: venice: remove forced enable of GSC thermal protection Tim Harvey
2021-07-10 19:34   ` sbabic
2021-07-10 19:37 ` [PATCH 1/5] board: gateworks: venice: gsc: fix typo sbabic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210701000742.6522-2-tharvey@gateworks.com \
    --to=tharvey@gateworks.com \
    --cc=festevam@gmail.com \
    --cc=sbabic@denx.de \
    --cc=u-boot@lists.denx.de \
    --cc=uboot-imx@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox