Lines Matching refs:sens
1084 smu_sensor_read(struct smu_sensor *sens) in smu_sensor_read() argument
1086 device_t smu = sens->dev; in smu_sensor_read()
1094 cmd.data[0] = sens->reg; in smu_sensor_read()
1104 switch (sens->type) { in smu_sensor_read()
1154 struct smu_sensor *sens; in smu_sensor_sysctl() local
1159 sens = &sc->sc_sensors[arg2]; in smu_sensor_sysctl()
1161 value = smu_sensor_read(sens); in smu_sensor_sysctl()
1173 struct smu_sensor *sens; in smu_attach_sensors() local
1195 sens = sc->sc_sensors; in smu_attach_sensors()
1207 sens->dev = dev; in smu_attach_sensors()
1211 sens->type = SMU_CURRENT_SENSOR; in smu_attach_sensors()
1214 sens->type = SMU_TEMP_SENSOR; in smu_attach_sensors()
1217 sens->type = SMU_VOLTAGE_SENSOR; in smu_attach_sensors()
1220 sens->type = SMU_POWER_SENSOR; in smu_attach_sensors()
1226 OF_getprop(child, "reg", &sens->reg, sizeof(cell_t)); in smu_attach_sensors()
1227 OF_getprop(child, "zone", &sens->therm.zone, sizeof(int)); in smu_attach_sensors()
1228 OF_getprop(child, "location", sens->therm.name, in smu_attach_sensors()
1229 sizeof(sens->therm.name)); in smu_attach_sensors()
1231 for (i = 0; i < strlen(sens->therm.name); i++) { in smu_attach_sensors()
1232 sysctl_name[i] = tolower(sens->therm.name[i]); in smu_attach_sensors()
1238 sprintf(sysctl_desc,"%s (%s)", sens->therm.name, units); in smu_attach_sensors()
1243 (sens->type == SMU_TEMP_SENSOR) ? "IK" : "I", sysctl_desc); in smu_attach_sensors()
1245 if (sens->type == SMU_TEMP_SENSOR) { in smu_attach_sensors()
1247 sens->therm.target_temp = 500 + 2731; /* 50 C */ in smu_attach_sensors()
1248 sens->therm.max_temp = 900 + 2731; /* 90 C */ in smu_attach_sensors()
1250 sens->therm.read = in smu_attach_sensors()
1252 pmac_thermal_sensor_register(&sens->therm); in smu_attach_sensors()
1255 sens++; in smu_attach_sensors()