diff options
Diffstat (limited to 'board/gateworks/gw_ventana/gsc.c')
-rw-r--r-- | board/gateworks/gw_ventana/gsc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/board/gateworks/gw_ventana/gsc.c b/board/gateworks/gw_ventana/gsc.c index c31ef117b2..068f8cd9e7 100644 --- a/board/gateworks/gw_ventana/gsc.c +++ b/board/gateworks/gw_ventana/gsc.c @@ -70,7 +70,7 @@ static void read_hwmon(const char *name, uint reg, uint size) puts("fRD\n"); } else { ui = buf[0] | (buf[1]<<8) | (buf[2]<<16); - if (reg == GSC_HWMON_TEMP && ui > 0x8000) + if (size == 2 && ui > 0x8000) ui -= 0xffff; if (ui == 0xffffff) puts("invalid\n"); @@ -140,6 +140,10 @@ int gsc_info(int verbose) read_hwmon("VDD_IO4", GSC_HWMON_VDD_IO4, 3); read_hwmon("VDD_GPS", GSC_HWMON_VDD_IO3, 3); break; + case '9': /* GW590x */ + read_hwmon("AMONBMON", GSC_HWMON_VDD_IO3, 3); + read_hwmon("BAT_VOLT", GSC_HWMON_VDD_EXT, 3); + read_hwmon("BAT_TEMP", GSC_HWMON_VDD_IO4, 2); } return 0; } |