| /openbsd/src/sys/dev/fdt/ |
| D | sxitemp.c | 76 struct ksensor sc_sensors[3]; member 188 strlcpy(sc->sc_sensors[0].desc, "CPU", in sxitemp_attach() 189 sizeof(sc->sc_sensors[0].desc)); in sxitemp_attach() 190 sc->sc_sensors[0].type = SENSOR_TEMP; in sxitemp_attach() 191 sc->sc_sensors[0].flags = SENSOR_FINVALID; in sxitemp_attach() 192 sensor_attach(&sc->sc_sensordev, &sc->sc_sensors[0]); in sxitemp_attach() 195 strlcpy(sc->sc_sensors[1].desc, "GPU", in sxitemp_attach() 196 sizeof(sc->sc_sensors[1].desc)); in sxitemp_attach() 197 sc->sc_sensors[1].type = SENSOR_TEMP; in sxitemp_attach() 198 sc->sc_sensors[1].flags = SENSOR_FINVALID; in sxitemp_attach() [all …]
|
| D | hitemp.c | 50 struct ksensor sc_sensors[HITEMP_NSENSORS]; member 136 sc->sc_sensors[i].type = SENSOR_TEMP; in hitemp_attach() 137 sc->sc_sensors[i].flags = SENSOR_FINVALID; in hitemp_attach() 138 sensor_attach(&sc->sc_sensordev, &sc->sc_sensors[i]); in hitemp_attach() 169 sc->sc_sensors[i].value = temp; in hitemp_refresh_sensors() 170 sc->sc_sensors[i].flags &= ~SENSOR_FINVALID; in hitemp_refresh_sensors()
|
| D | rktemp.c | 279 struct ksensor sc_sensors[7]; member 521 strlcpy(sc->sc_sensors[i].desc, names[i], in rktemp_attach() 522 sizeof(sc->sc_sensors[i].desc)); in rktemp_attach() 523 sc->sc_sensors[i].type = SENSOR_TEMP; in rktemp_attach() 524 sc->sc_sensors[i].flags = SENSOR_FINVALID; in rktemp_attach() 525 sensor_attach(&sc->sc_sensordev, &sc->sc_sensors[i]); in rktemp_attach() 678 sc->sc_sensors[i].value = 273150000 + 1000 * temp; in rktemp_refresh_sensors() 680 sc->sc_sensors[i].flags &= ~SENSOR_FINVALID; in rktemp_refresh_sensors() 682 sc->sc_sensors[i].flags |= SENSOR_FINVALID; in rktemp_refresh_sensors()
|
| /openbsd/src/sys/dev/acpi/ |
| D | acpisbs.c | 273 sc->sc_sensors = mallocarray(sizeof(struct ksensor), in acpisbs_setup_sensors() 283 strlcpy(sc->sc_sensors[i].desc, check.sensor_desc, in acpisbs_setup_sensors() 284 sizeof(sc->sc_sensors[i].desc)); in acpisbs_setup_sensors() 289 sc->sc_sensors[i].type = SENSOR_WATTHOUR; in acpisbs_setup_sensors() 291 sc->sc_sensors[i].type = check.sensor_type; in acpisbs_setup_sensors() 293 sc->sc_sensors[i].value = 0; in acpisbs_setup_sensors() 294 sensor_attach(&sc->sc_sensordev, &sc->sc_sensors[i]); in acpisbs_setup_sensors() 315 sc->sc_sensors[i].flags = 0; in acpisbs_refresh_sensors() 316 sc->sc_sensors[i].status = SENSOR_S_OK; in acpisbs_refresh_sensors() 320 sc->sc_sensors[i].value = *ival * 100; in acpisbs_refresh_sensors() [all …]
|
| /openbsd/src/sys/dev/isa/ |
| D | it.c | 260 sc->sc_sensors[i].type = it_sensors[i].type; in it_attach() 263 strlcpy(sc->sc_sensors[i].desc, it_sensors[i].desc, in it_attach() 264 sizeof(sc->sc_sensors[i].desc)); in it_attach() 288 sensor_attach(&sc->sc_sensordev, &sc->sc_sensors[i]); in it_attach() 362 sc->sc_sensors[IT_TEMP_BASE + i].flags &= in it_ec_refresh() 366 sc->sc_sensors[IT_TEMP_BASE + i].flags |= in it_ec_refresh() 373 sc->sc_sensors[IT_TEMP_BASE + i].value = in it_ec_refresh() 381 sc->sc_sensors[IT_VOLT_BASE + i].flags &= in it_ec_refresh() 385 sc->sc_sensors[IT_VOLT_BASE + i].flags |= in it_ec_refresh() 392 sc->sc_sensors[IT_VOLT_BASE + i].value = sdata << 4; in it_ec_refresh() [all …]
|
| D | uguru.c | 100 struct ksensor sc_sensors[UGURU_MAX_SENSORS]; member 836 strlcpy(sc->sc_sensors[i].desc, in uguru_attach() 837 sensors[i].desc, sizeof(sc->sc_sensors[i].desc)); in uguru_attach() 838 sc->sc_sensors[i].type = sensors[i].type; in uguru_attach() 839 sensor_attach(&sc->sc_sensordev, &sc->sc_sensors[i]); in uguru_attach() 865 struct ksensor *sensor = &sc->sc_sensors[n]; in uguru_refresh_temp() 901 sc->sc_sensors[n].value = in uguru_refresh_volt() 903 sc->sc_sensors[n].status = status; in uguru_refresh_volt() 909 struct ksensor *sensor = &sc->sc_sensors[n]; in uguru_refresh_fan() 933 struct ksensor *sensor = &sc->sc_sensors[n]; in uguru_read_sensor()
|
| D | itvar.h | 114 struct ksensor sc_sensors[IT_EC_NUMSENSORS]; member
|
| /openbsd/src/sys/arch/loongson/dev/ |
| D | stsec.c | 96 struct ksensor sc_sensors[nitems(stsec_sensors_template)]; member 202 for (i = 0; i < nitems(sc->sc_sensors); i++) { in stsec_attach() 203 sc->sc_sensors[i].type = stsec_sensors_template[i].type; in stsec_attach() 204 strlcpy(sc->sc_sensors[i].desc, stsec_sensors_template[i].desc, in stsec_attach() 205 sizeof(sc->sc_sensors[i].desc)); in stsec_attach() 206 sensor_attach(&sc->sc_sensordev, &sc->sc_sensors[i]); in stsec_attach() 261 for (i = 0; i < nitems(sc->sc_sensors); i++) in stsec_sensors_update() 262 sc->sc_sensors[i].flags |= SENSOR_FINVALID; in stsec_sensors_update() 275 ks = &sc->sc_sensors[STSEC_SENSOR_AC_PRESENCE]; in stsec_sensors_update() 284 ks = &sc->sc_sensors[STSEC_SENSOR_BATTERY_PRESENCE]; in stsec_sensors_update() [all …]
|
| /openbsd/src/sys/dev/i2c/ |
| D | asc7611.c | 70 struct ksensor sc_sensors[ANDL_NUM_TOTAL]; member 122 strlcpy(sc->sc_sensors[i].desc, andl_temp[i].name, in andl_attach() 123 sizeof(sc->sc_sensors[i].desc)); in andl_attach() 124 sc->sc_sensors[i].type = SENSOR_TEMP; in andl_attach() 128 strlcpy(sc->sc_sensors[i].desc, andl_volt[i - j].name, in andl_attach() 129 sizeof(sc->sc_sensors[i].desc)); in andl_attach() 130 sc->sc_sensors[i].type = SENSOR_VOLTS_DC; in andl_attach() 134 sc->sc_sensors[i].type = SENSOR_FANRPM; in andl_attach() 137 sensor_attach(&sc->sc_sensordev, &sc->sc_sensors[i]); in andl_attach() 152 struct ksensor *s = sc->sc_sensors; in andl_refresh()
|
| D | w83793g.c | 71 struct ksensor sc_sensors[WB_NUM_VOLTS + WB_NUM_TEMPS + WB_NUM_FANS]; member 123 strlcpy(sc->sc_sensors[i].desc, wb_volt_desc[i], in wbng_attach() 124 sizeof(sc->sc_sensors[i].desc)); in wbng_attach() 125 sc->sc_sensors[i].type = SENSOR_VOLTS_DC; in wbng_attach() 129 sc->sc_sensors[i].type = SENSOR_TEMP; in wbng_attach() 132 sc->sc_sensors[i].type = SENSOR_FANRPM; in wbng_attach() 135 sensor_attach(&sc->sc_sensordev, &sc->sc_sensors[i]); in wbng_attach() 171 struct ksensor *s = &sc->sc_sensors[0]; in wbng_refresh_volts() 214 struct ksensor *s = &sc->sc_sensors[WB_NUM_VOLTS]; in wbng_refresh_temps() 261 struct ksensor *s = &sc->sc_sensors[WB_NUM_VOLTS + WB_NUM_TEMPS]; in wbng_refresh_fans()
|
| D | lis331dl.c | 49 struct ksensor sc_sensors[LISA_NUM_AXIS]; member 97 strlcpy(sc->sc_sensors[i].desc, lisa_axis[i].name, in lisa_attach() 98 sizeof(sc->sc_sensors[i].desc)); in lisa_attach() 99 sc->sc_sensors[i].type = SENSOR_INTEGER; in lisa_attach() 100 sensor_attach(&sc->sc_sensordev, &sc->sc_sensors[i]); in lisa_attach() 116 struct ksensor *s = sc->sc_sensors; in lisa_refresh()
|
| D | w83795g.c | 77 struct ksensor sc_sensors[NVT_NUM_SENSORS]; member 147 strlcpy(sc->sc_sensors[i].desc, nvt_volt_desc[i], in nvt_attach() 148 sizeof(sc->sc_sensors[i].desc)); in nvt_attach() 149 sc->sc_sensors[i].type = SENSOR_VOLTS_DC; in nvt_attach() 153 sc->sc_sensors[i].type = SENSOR_TEMP; in nvt_attach() 156 sc->sc_sensors[i].type = SENSOR_FANRPM; in nvt_attach() 159 sensor_attach(&sc->sc_sensordev, &sc->sc_sensors[i]); in nvt_attach() 195 struct ksensor *s = &sc->sc_sensors[0]; in nvt_refresh_volts() 220 struct ksensor *s = &sc->sc_sensors[NVT_NUM_VOLTS]; in nvt_refresh_temps() 256 struct ksensor *s = &sc->sc_sensors[NVT_NUM_VOLTS + NVT_NUM_TEMPS]; in nvt_refresh_fans()
|
| D | w83l784r.c | 81 struct ksensor sc_sensors[WBENV_MAX_SENSORS]; member 234 sensor_attach(&sc->sc_sensordev, &sc->sc_sensors[i]); in wbenv_attach() 247 sc->sc_sensors[i].type = sensors[i].type; in wbenv_setup_sensors() 248 strlcpy(sc->sc_sensors[i].desc, sensors[i].desc, in wbenv_setup_sensors() 249 sizeof(sc->sc_sensors[i].desc)); in wbenv_setup_sensors() 272 struct ksensor *sensor = &sc->sc_sensors[n]; in w83l784r_refresh_volt() 284 struct ksensor *sensor = &sc->sc_sensors[n]; in w83l785r_refresh_volt() 296 struct ksensor *sensor = &sc->sc_sensors[n]; in wbenv_refresh_temp() 308 struct ksensor *sensor = &sc->sc_sensors[n]; in w83l784r_refresh_temp() 321 struct ksensor *sensor = &sc->sc_sensors[n]; in w83l784r_refresh_fanrpm() [all …]
|
| /openbsd/src/sys/scsi/ |
| D | ses.c | 85 TAILQ_HEAD(, ses_sensor) sc_sensors; 170 if (!TAILQ_EMPTY(&sc->sc_sensors)) { in ses_attach() 176 while (!TAILQ_EMPTY(&sc->sc_sensors)) { in ses_attach() 177 sensor = TAILQ_FIRST(&sc->sc_sensors); in ses_attach() 178 TAILQ_REMOVE(&sc->sc_sensors, sensor, in ses_attach() 183 TAILQ_FOREACH(sensor, &sc->sc_sensors, se_entry) in ses_attach() 202 if (TAILQ_EMPTY(&sc->sc_sensors) in ses_attach() 234 if (!TAILQ_EMPTY(&sc->sc_sensors)) { in ses_detach() 238 while (!TAILQ_EMPTY(&sc->sc_sensors)) { in ses_detach() 239 sensor = TAILQ_FIRST(&sc->sc_sensors); in ses_detach() [all …]
|
| D | safte.c | 73 struct safte_sensor *sc_sensors; member 166 free(sc->sc_sensors, M_DEVBUF, in safte_attach() 172 &sc->sc_sensors[i].se_sensor); in safte_attach() 213 &sc->sc_sensors[i].se_sensor); in safte_detach() 214 free(sc->sc_sensors, M_DEVBUF, in safte_detach() 289 sc->sc_sensors = mallocarray(sc->sc_nsensors, in safte_read_config() 291 if (sc->sc_sensors == NULL) { in safte_read_config() 302 s = sc->sc_sensors; in safte_read_config() 415 s = &sc->sc_sensors[i]; in safte_read_encstat()
|
| /openbsd/src/sys/dev/pci/ |
| D | kate.c | 72 struct ksensor sc_sensors[4]; member 127 if (!(sc->sc_sensors[i].flags & SENSOR_FINVALID)) in kate_match() 168 (sc->sc_sensors[2].flags & SENSOR_FINVALID) && in kate_attach() 169 (sc->sc_sensors[3].flags & SENSOR_FINVALID)) in kate_attach() 179 sc->sc_sensors[i].type = SENSOR_TEMP; in kate_attach() 180 sensor_attach(&sc->sc_sensordev, &sc->sc_sensors[i]); in kate_attach() 197 struct ksensor *s = sc->sc_sensors; in kate_refresh()
|
| D | ips.c | 396 struct ksensor * sc_sensors; member 786 if ((sc->sc_sensors = mallocarray(sc->sc_nunits, sizeof(struct ksensor), in ips_attach() 796 sc->sc_sensors[i].type = SENSOR_DRIVE; in ips_attach() 797 sc->sc_sensors[i].status = SENSOR_S_UNKNOWN; in ips_attach() 799 strlcpy(sc->sc_sensors[i].desc, dev->dv_xname, in ips_attach() 800 sizeof(sc->sc_sensors[i].desc)); in ips_attach() 801 sensor_attach(&sc->sc_sensordev, &sc->sc_sensors[i]); in ips_attach() 805 free(sc->sc_sensors, M_DEVBUF, in ips_attach() 1289 sc->sc_sensors[i].value = 0; in ips_sensors() 1290 sc->sc_sensors[i].status = SENSOR_S_UNKNOWN; in ips_sensors() [all …]
|
| D | arc.c | 568 struct ksensor *sc_sensors; member 2622 sc->sc_sensors = mallocarray(sc->sc_nsensors, sizeof(struct ksensor), in arc_create_sensors() 2636 sc->sc_sensors[i].type = SENSOR_DRIVE; in arc_create_sensors() 2637 sc->sc_sensors[i].status = SENSOR_S_UNKNOWN; in arc_create_sensors() 2639 strlcpy(sc->sc_sensors[i].desc, bv.bv_dev, in arc_create_sensors() 2640 sizeof(sc->sc_sensors[i].desc)); in arc_create_sensors() 2642 sensor_attach(&sc->sc_sensordev, &sc->sc_sensors[i]); in arc_create_sensors() 2655 free(sc->sc_sensors, M_DEVBUF, in arc_create_sensors() 2670 sc->sc_sensors[i].flags = SENSOR_FINVALID; in arc_refresh_sensors() 2676 sc->sc_sensors[i].value = SENSOR_DRIVE_FAIL; in arc_refresh_sensors() [all …]
|
| D | mpii.c | 238 struct ksensor *sc_sensors; member 3779 sc->sc_sensors = mallocarray(sc->sc_vd_count, sizeof(struct ksensor), in mpii_create_sensors() 3781 if (sc->sc_sensors == NULL) in mpii_create_sensors() 3795 sc->sc_sensors[i].type = SENSOR_DRIVE; in mpii_create_sensors() 3796 sc->sc_sensors[i].status = SENSOR_S_UNKNOWN; in mpii_create_sensors() 3798 strlcpy(sc->sc_sensors[i].desc, dev->dv_xname, in mpii_create_sensors() 3799 sizeof(sc->sc_sensors[i].desc)); in mpii_create_sensors() 3801 sensor_attach(&sc->sc_sensordev, &sc->sc_sensors[i]); in mpii_create_sensors() 3812 free(sc->sc_sensors, M_DEVBUF, 0); in mpii_create_sensors() 3831 sc->sc_sensors[i].value = SENSOR_DRIVE_FAIL; in mpii_refresh_sensors() [all …]
|
| /openbsd/src/sys/dev/ic/ |
| D | cac.c | 883 sc->sc_sensors = mallocarray(sc->sc_nunits, in cac_create_sensors() 885 if (sc->sc_sensors == NULL) in cac_create_sensors() 898 sc->sc_sensors[i].type = SENSOR_DRIVE; in cac_create_sensors() 899 sc->sc_sensors[i].status = SENSOR_S_UNKNOWN; in cac_create_sensors() 901 strlcpy(sc->sc_sensors[i].desc, dev->dv_xname, in cac_create_sensors() 902 sizeof(sc->sc_sensors[i].desc)); in cac_create_sensors() 904 sensor_attach(&sc->sc_sensordev, &sc->sc_sensors[i]); in cac_create_sensors() 915 free(sc->sc_sensors, M_DEVBUF, in cac_create_sensors() 940 sc->sc_sensors[i].value = SENSOR_DRIVE_FAIL; in cac_sensor_refresh() 941 sc->sc_sensors[i].status = SENSOR_S_CRIT; in cac_sensor_refresh() [all …]
|
| D | ami.c | 2389 sc->sc_sensors = mallocarray(sc->sc_nunits, sizeof(struct ksensor), in ami_create_sensors() 2391 if (sc->sc_sensors == NULL) in ami_create_sensors() 2404 sc->sc_sensors[i].type = SENSOR_DRIVE; in ami_create_sensors() 2405 sc->sc_sensors[i].status = SENSOR_S_UNKNOWN; in ami_create_sensors() 2407 strlcpy(sc->sc_sensors[i].desc, dev->dv_xname, in ami_create_sensors() 2408 sizeof(sc->sc_sensors[i].desc)); in ami_create_sensors() 2410 sensor_attach(&sc->sc_sensordev, &sc->sc_sensors[i]); in ami_create_sensors() 2427 free(sc->sc_sensors, M_DEVBUF, sc->sc_nunits * sizeof(struct ksensor)); in ami_create_sensors() 2441 sc->sc_sensors[i].value = 0; /* unknown */ in ami_refresh_sensors() 2442 sc->sc_sensors[i].status = SENSOR_S_UNKNOWN; in ami_refresh_sensors() [all …]
|
| D | mfi.c | 2435 sc->sc_sensors = mallocarray(sc->sc_ld_cnt, sizeof(struct ksensor), in mfi_create_sensors() 2437 if (sc->sc_sensors == NULL) in mfi_create_sensors() 2447 sc->sc_sensors[i].type = SENSOR_DRIVE; in mfi_create_sensors() 2448 sc->sc_sensors[i].status = SENSOR_S_UNKNOWN; in mfi_create_sensors() 2450 strlcpy(sc->sc_sensors[i].desc, dev->dv_xname, in mfi_create_sensors() 2451 sizeof(sc->sc_sensors[i].desc)); in mfi_create_sensors() 2453 sensor_attach(&sc->sc_sensordev, &sc->sc_sensors[i]); in mfi_create_sensors() 2464 free(sc->sc_sensors, M_DEVBUF, in mfi_create_sensors() 2493 sc->sc_sensors[i].value = SENSOR_DRIVE_FAIL; in mfi_refresh_sensors() 2494 sc->sc_sensors[i].status = SENSOR_S_CRIT; in mfi_refresh_sensors() [all …]
|
| /openbsd/src/sys/dev/usb/ |
| D | upd.c | 118 struct upd_sensor *sc_sensors; member 199 sc->sc_sensors = mallocarray(UPD_MAX_SENSORS, in upd_attach() 202 SLIST_INIT(&sc->sc_sensors[i].children); in upd_attach() 248 sensor = &sc->sc_sensors[sc->sc_num_sensors]; in upd_attach_sensor_tree() 285 sensor = &sc->sc_sensors[i]; in upd_detach() 291 free(sc->sc_sensors, M_USBDEV, UPD_MAX_SENSORS * sizeof(struct upd_sensor)); in upd_detach() 363 sensor = &sc->sc_sensors[i]; in upd_lookup_sensor()
|
| /openbsd/src/sys/arch/arm64/dev/ |
| D | aplsmc.c | 138 struct ksensor sc_sensors[APLSMC_MAX_SENSORS]; member 339 strlcpy(sc->sc_sensors[sc->sc_nsensors].desc, in aplsmc_attach() 340 aplsmc_sensors[i].desc, sizeof(sc->sc_sensors[0].desc)); in aplsmc_attach() 341 sc->sc_sensors[sc->sc_nsensors].type = aplsmc_sensors[i].type; in aplsmc_attach() 344 &sc->sc_sensors[sc->sc_nsensors]); in aplsmc_attach() 632 sc->sc_sensors[i].flags |= SENSOR_FUNKNOWN; in aplsmc_refresh_sensors() 634 sc->sc_sensors[i].flags &= ~SENSOR_FUNKNOWN; in aplsmc_refresh_sensors() 635 sc->sc_sensors[i].value = value; in aplsmc_refresh_sensors() 660 ksensor = &sc->sc_sensors[i]; in aplsmc_apminfo()
|
| /openbsd/src/sys/arch/i386/i386/ |
| D | esm.c | 115 TAILQ_HEAD(, esm_sensor) sc_sensors; 229 TAILQ_INIT(&sc->sc_sensors); in esm_attach() 267 if (!TAILQ_EMPTY(&sc->sc_sensors)) { in esm_attach() 270 sc->sc_nextsensor = TAILQ_FIRST(&sc->sc_sensors); in esm_attach() 478 sc->sc_nextsensor = TAILQ_FIRST(&sc->sc_sensors); in esm_refresh() 948 TAILQ_INSERT_TAIL(&sc->sc_sensors, es, es_entry); in esm_make_sensors()
|