static driver_t it_driver = { "it", it_methods, sizeof (struct it_softc) }; static devclass_t it_devclass; DRIVER_MODULE(it, isa, it_driver, it_devclass, NULL, NULL); const int it_vrfact[] = { RFACT_NONE, RFACT_NONE, RFACT_NONE, RFACT(68, 100), RFACT(30, 10), RFACT(21, 10), RFACT(83, 20), RFACT(68, 100), RFACT_NONE }; int it_probe(struct device *dev) { struct resource *iores; int iorid = 0; bus_space_tag_t iot; bus_space_handle_t ioh; u_int8_t cr;
struct lm_chip { int (*chip_match)(struct lm_softc *); }; struct lm_chip lm_chips[] = { { wb_match }, { lm_match }, { def_match } /* Must be last */ }; struct lm_sensor lm78_sensors[] = { /* Voltage */ { "VCore A", SENSOR_VOLTS_DC, 0, 0x20, lm_refresh_volt, RFACT_NONE }, { "VCore B", SENSOR_VOLTS_DC, 0, 0x21, lm_refresh_volt, RFACT_NONE }, { "+3.3V", SENSOR_VOLTS_DC, 0, 0x22, lm_refresh_volt, RFACT_NONE }, { "+5V", SENSOR_VOLTS_DC, 0, 0x23, lm_refresh_volt, RFACT(68, 100) }, { "+12V", SENSOR_VOLTS_DC, 0, 0x24, lm_refresh_volt, RFACT(30, 10) }, { "-12V", SENSOR_VOLTS_DC, 0, 0x25, lm_refresh_volt, NRFACT(240, 60) }, { "-5V", SENSOR_VOLTS_DC, 0, 0x26, lm_refresh_volt, NRFACT(100, 60) }, /* Temperature */ { "", SENSOR_TEMP, 0, 0x27, lm_refresh_temp }, /* Fans */ { "", SENSOR_FANRPM, 0, 0x28, lm_refresh_fanrpm }, { "", SENSOR_FANRPM, 0, 0x29, lm_refresh_fanrpm }, { "", SENSOR_FANRPM, 0, 0x2a, lm_refresh_fanrpm }, { NULL } };
static void itesio_setup_sensors(struct itesio_softc *); static void itesio_refresh_temp(struct itesio_softc *, envsys_data_t *); static void itesio_refresh_volts(struct itesio_softc *, envsys_data_t *); static void itesio_refresh_fans(struct itesio_softc *, envsys_data_t *); static void itesio_refresh(struct sysmon_envsys *, envsys_data_t *); /* sysmon_wdog glue */ static int itesio_wdt_setmode(struct sysmon_wdog *); static int itesio_wdt_tickle(struct sysmon_wdog *); /* rfact values for voltage sensors */ static const int itesio_vrfact[] = { RFACT_NONE, /* VCORE_A */ RFACT_NONE, /* VCORE_B */ RFACT_NONE, /* +3.3V */ RFACT(68, 100), /* +5V */ RFACT(30, 10), /* +12V */ RFACT(21, 10), /* -5V */ RFACT(83, 20), /* -12V */ RFACT(68, 100), /* STANDBY */ RFACT_NONE /* VBAT */ }; static int itesio_isa_match(device_t parent, cfdata_t match, void *aux) { struct isa_attach_args *ia = aux; bus_space_handle_t ioh; uint16_t cr; /* Must supply an address */