提交 ca628b74 编写于 作者: T Tim Harvey 提交者: Stefano Babic

imx: ventana: gsc: show board temp on boot

Signed-off-by: NTim Harvey <tharvey@gateworks.com>
上级 82a17e75
......@@ -98,6 +98,12 @@ int gsc_info(int verbose)
gsc_i2c_write(GSC_SC_ADDR, GSC_SC_STATUS, 1,
&buf[GSC_SC_STATUS], 1);
}
if (!gsc_i2c_read(GSC_HWMON_ADDR, GSC_HWMON_TEMP, 1, buf, 2)) {
int ui = buf[0] | buf[1]<<8;
if (ui > 0x8000)
ui -= 0xffff;
printf(" board temp at %dC", ui / 10);
}
puts("\n");
if (!verbose)
return CMD_RET_SUCCESS;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册