Skip to content
Snippets Groups Projects
Commit ca628b74 authored by Tim Harvey's avatar Tim Harvey Committed by Stefano Babic
Browse files

imx: ventana: gsc: show board temp on boot

parent 82a17e75
No related branches found
No related tags found
No related merge requests found
...@@ -98,6 +98,12 @@ int gsc_info(int verbose) ...@@ -98,6 +98,12 @@ int gsc_info(int verbose)
gsc_i2c_write(GSC_SC_ADDR, GSC_SC_STATUS, 1, gsc_i2c_write(GSC_SC_ADDR, GSC_SC_STATUS, 1,
&buf[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"); puts("\n");
if (!verbose) if (!verbose)
return CMD_RET_SUCCESS; return CMD_RET_SUCCESS;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment