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