Lines Matching refs:sens
1085 smu_sensor_read(struct smu_sensor *sens)
1087 device_t smu = sens->dev;
1095 cmd.data[0] = sens->reg;
1105 switch (sens->type) {
1155 struct smu_sensor *sens;
1160 sens = &sc->sc_sensors[arg2];
1162 value = smu_sensor_read(sens);
1174 struct smu_sensor *sens;
1196 sens = sc->sc_sensors;
1208 sens->dev = dev;
1212 sens->type = SMU_CURRENT_SENSOR;
1215 sens->type = SMU_TEMP_SENSOR;
1218 sens->type = SMU_VOLTAGE_SENSOR;
1221 sens->type = SMU_POWER_SENSOR;
1227 OF_getprop(child, "reg", &sens->reg, sizeof(cell_t));
1228 OF_getprop(child, "zone", &sens->therm.zone, sizeof(int));
1229 OF_getprop(child, "location", sens->therm.name,
1230 sizeof(sens->therm.name));
1232 for (i = 0; i < strlen(sens->therm.name); i++) {
1233 sysctl_name[i] = tolower(sens->therm.name[i]);
1239 sprintf(sysctl_desc,"%s (%s)", sens->therm.name, units);
1244 (sens->type == SMU_TEMP_SENSOR) ? "IK" : "I", sysctl_desc);
1246 if (sens->type == SMU_TEMP_SENSOR) {
1248 sens->therm.target_temp = 500 + 2732; /* 50 C */
1249 sens->therm.max_temp = 900 + 2732; /* 90 C */
1251 sens->therm.read =
1253 pmac_thermal_sensor_register(&sens->therm);
1256 sens++;