Lines Matching defs:sens
1087 smu_sensor_read(struct smu_sensor *sens)
1089 device_t smu = sens->dev;
1097 cmd.data[0] = sens->reg;
1107 switch (sens->type) {
1157 struct smu_sensor *sens;
1162 sens = &sc->sc_sensors[arg2];
1164 value = smu_sensor_read(sens);
1176 struct smu_sensor *sens;
1198 sens = sc->sc_sensors;
1210 sens->dev = dev;
1214 sens->type = SMU_CURRENT_SENSOR;
1217 sens->type = SMU_TEMP_SENSOR;
1220 sens->type = SMU_VOLTAGE_SENSOR;
1223 sens->type = SMU_POWER_SENSOR;
1229 OF_getprop(child, "reg", &sens->reg, sizeof(cell_t));
1230 OF_getprop(child, "zone", &sens->therm.zone, sizeof(int));
1231 OF_getprop(child, "location", sens->therm.name,
1232 sizeof(sens->therm.name));
1234 for (i = 0; i < strlen(sens->therm.name); i++) {
1235 sysctl_name[i] = tolower(sens->therm.name[i]);
1241 sprintf(sysctl_desc,"%s (%s)", sens->therm.name, units);
1246 (sens->type == SMU_TEMP_SENSOR) ? "IK" : "I", sysctl_desc);
1248 if (sens->type == SMU_TEMP_SENSOR) {
1250 sens->therm.target_temp = 500 + 2731; /* 50 C */
1251 sens->therm.max_temp = 900 + 2731; /* 90 C */
1253 sens->therm.read =
1255 pmac_thermal_sensor_register(&sens->therm);
1258 sens++;