Lines Matching refs:sr
274 struct wf_sensor *sr;
281 sr = sens_cpu_temp[cpu];
282 err = sr->ops->get_value(sr, &temp);
296 sr = sens_cpu_power[cpu];
297 err = sr->ops->get_value(sr, &power);
603 static void pm112_new_sensor(struct wf_sensor *sr)
607 if (!strncmp(sr->name, "cpu-temp-", 9)) {
608 i = sr->name[9] - '0';
609 if (sr->name[10] == 0 && i < NR_CORES &&
610 sens_cpu_temp[i] == NULL && wf_get_sensor(sr) == 0)
611 sens_cpu_temp[i] = sr;
613 } else if (!strncmp(sr->name, "cpu-power-", 10)) {
614 i = sr->name[10] - '0';
615 if (sr->name[11] == 0 && i < NR_CORES &&
616 sens_cpu_power[i] == NULL && wf_get_sensor(sr) == 0)
617 sens_cpu_power[i] = sr;
618 } else if (!strcmp(sr->name, "hd-temp")) {
619 if (hd_temp == NULL && wf_get_sensor(sr) == 0)
620 hd_temp = sr;
621 } else if (!strcmp(sr->name, "slots-power")) {
622 if (slots_power == NULL && wf_get_sensor(sr) == 0)
623 slots_power = sr;
624 } else if (!strcmp(sr->name, "backside-temp")) {
625 if (u4_temp == NULL && wf_get_sensor(sr) == 0)
626 u4_temp = sr;