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