Lines Matching refs:temp_map
304 static const int temp_map[CPCAP_MAX_TEMP_LVL][2] = {
717 if (value <= temp_map[CPCAP_MAX_TEMP_LVL - 1][0])
718 return temp_map[CPCAP_MAX_TEMP_LVL - 1][1];
720 if (value >= temp_map[0][0])
721 return temp_map[0][1];
724 if ((value <= temp_map[i][0]) &&
725 (value >= temp_map[i + 1][0])) {
726 if (value == temp_map[i][0]) {
727 result = temp_map[i][1];
728 } else if (value == temp_map[i + 1][0]) {
729 result = temp_map[i + 1][1];
731 alpha = ((value - temp_map[i][0]) * 1000) /
732 (temp_map[i + 1][0] - temp_map[i][0]);
734 result = temp_map[i][1] +
735 ((alpha * (temp_map[i + 1][1] -
736 temp_map[i][1])) / 1000);