diff options
author | Constantine A. Murenin <cnst@cvs.openbsd.org> | 2007-05-25 02:26:44 +0000 |
---|---|---|
committer | Constantine A. Murenin <cnst@cvs.openbsd.org> | 2007-05-25 02:26:44 +0000 |
commit | c07b718dd1c51a12f60549c721a117b000eb5833 (patch) | |
tree | 24f9dfd18b9dc8d8106c0a554df7e0c1acd13415 /sys | |
parent | 83e9a987921b809c437db9ced2de82531da03486 (diff) |
add support for W83627DHG; ok kettenis
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/lm78.c | 35 | ||||
-rw-r--r-- | sys/dev/ic/lm78var.h | 3 |
2 files changed, 36 insertions, 2 deletions
diff --git a/sys/dev/ic/lm78.c b/sys/dev/ic/lm78.c index 38df3a4ab48..b7b2b37d73f 100644 --- a/sys/dev/ic/lm78.c +++ b/sys/dev/ic/lm78.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lm78.c,v 1.16 2007/05/25 02:20:25 cnst Exp $ */ +/* $OpenBSD: lm78.c,v 1.17 2007/05/25 02:26:43 cnst Exp $ */ /* * Copyright (c) 2005, 2006 Mark Kettenis @@ -158,6 +158,35 @@ struct lm_sensor w83627ehf_sensors[] = { { NULL } }; +/* + * w83627dhf is almost identical to w83627ehf, except that + * it has 9 instead of 10 voltage sensors + */ +struct lm_sensor w83627dhf_sensors[] = { + /* Voltage */ + { "VCore", SENSOR_VOLTS_DC, 0, 0x20, lm_refresh_volt, RFACT_NONE / 2}, + { "+12V", SENSOR_VOLTS_DC, 0, 0x21, lm_refresh_volt, RFACT(56, 10) / 2 }, + { "+3.3V", SENSOR_VOLTS_DC, 0, 0x22, lm_refresh_volt, RFACT(34, 34) / 2 }, + { "+3.3V", SENSOR_VOLTS_DC, 0, 0x23, lm_refresh_volt, RFACT(34, 34) / 2 }, + { "-12V", SENSOR_VOLTS_DC, 0, 0x24, wb_w83627ehf_refresh_nvolt }, + { "", SENSOR_VOLTS_DC, 0, 0x25, lm_refresh_volt, RFACT_NONE / 2 }, + { "", SENSOR_VOLTS_DC, 0, 0x26, lm_refresh_volt, RFACT_NONE / 2 }, + { "3.3VSB", SENSOR_VOLTS_DC, 5, 0x50, lm_refresh_volt, RFACT(34, 34) / 2 }, + { "VBAT", SENSOR_VOLTS_DC, 5, 0x51, lm_refresh_volt, RFACT_NONE / 2 }, + + /* Temperature */ + { "", SENSOR_TEMP, 0, 0x27, lm_refresh_temp }, + { "", SENSOR_TEMP, 1, 0x50, wb_refresh_temp }, + { "", SENSOR_TEMP, 2, 0x50, wb_refresh_temp }, + + /* Fans */ + { "", SENSOR_FANRPM, 0, 0x28, wb_refresh_fanrpm }, + { "", SENSOR_FANRPM, 0, 0x29, wb_refresh_fanrpm }, + { "", SENSOR_FANRPM, 0, 0x2a, wb_refresh_fanrpm }, + + { NULL } +}; + struct lm_sensor w83637hf_sensors[] = { /* Voltage */ { "VCore", SENSOR_VOLTS_DC, 0, 0x20, wb_w83637hf_refresh_vcore }, @@ -478,6 +507,10 @@ wb_match(struct lm_softc *sc) printf(": W83627EHF\n"); lm_setup_sensors(sc, w83627ehf_sensors); break; + case WB_CHIPID_W83627DHG: + printf(": W83627DHF\n"); + lm_setup_sensors(sc, w83627dhf_sensors); + break; case WB_CHIPID_W83637HF: printf(": W83637HF\n"); sc->lm_writereg(sc, WB_BANKSEL, WB_BANKSEL_B0); diff --git a/sys/dev/ic/lm78var.h b/sys/dev/ic/lm78var.h index 3d526396ff6..6ea9697e843 100644 --- a/sys/dev/ic/lm78var.h +++ b/sys/dev/ic/lm78var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: lm78var.h,v 1.11 2007/03/22 16:55:31 deraadt Exp $ */ +/* $OpenBSD: lm78var.h,v 1.12 2007/05/25 02:26:43 cnst Exp $ */ /* * Copyright (c) 2005, 2006 Mark Kettenis @@ -113,6 +113,7 @@ #define WB_CHIPID_W83637HF 0x80 #define WB_CHIPID_W83627THF 0x90 #define WB_CHIPID_W83627EHF 0xa1 +#define WB_CHIPID_W83627DHG 0xc1 /* Config bits */ #define WB_CONFIG_VMR9 0x01 |