Lines Matching refs:temp

174 	int temp;  member
207 int *temp);
210 int chn, int temp);
212 int chn, int temp);
617 int *temp) in tsadc_code_to_temp() argument
626 *temp = (((int)code - table->bnum) * 10000 / table->knum) * 100; in tsadc_code_to_temp()
627 if (*temp < MIN_TEMP || *temp > MAX_TEMP) in tsadc_code_to_temp()
679 num = table->id[mid].temp - table->id[mid - 1].temp; in tsadc_code_to_temp()
682 *temp = table->id[mid - 1].temp + (num / denom); in tsadc_code_to_temp()
688 int temp) in tsadc_temp_to_code_v2() argument
696 return (((temp / 1000) * table.knum) / 1000 + table.bnum); in tsadc_temp_to_code_v2()
703 if (temp < table.id[low].temp || temp > table.id[high].temp) in tsadc_temp_to_code_v2()
707 if (temp == table.id[mid].temp) in tsadc_temp_to_code_v2()
709 else if (temp < table.id[mid].temp) in tsadc_temp_to_code_v2()
717 num *= temp - table.id[mid].temp; in tsadc_temp_to_code_v2()
718 denom = table.id[mid + 1].temp - table.id[mid].temp; in tsadc_temp_to_code_v2()
732 __func__, error, temp); in tsadc_temp_to_code_v2()
1005 int chn, int *temp) in tsadc_get_temp_v2() argument
1013 return tsadc_code_to_temp(&table, val, temp); in tsadc_get_temp_v2()
1016 static int predict_temp(int temp) in predict_temp() argument
1045 temp_last = min(temp, MAX_ENV_TEMP); in predict_temp()
1057 if (temp - temp_last > HIGHER_DEBOUNCE_TEMP) in predict_temp()
1058 temp = temp_last + HIGHER_DEBOUNCE_TEMP / 3; in predict_temp()
1059 if (temp_last - temp > LOWER_DEBOUNCE_TEMP) in predict_temp()
1060 temp = temp_last - LOWER_DEBOUNCE_TEMP / 3; in predict_temp()
1072 temp_now = (temp_mid * BASE + gain * (temp - temp_mid)) >> BASE_SHIFT; in predict_temp()
1087 int chn, int *temp) in tsadc_get_temp_v3() argument
1091 ret = tsadc_get_temp_v2(dev, chn, temp); in tsadc_get_temp_v3()
1093 *temp = predict_temp(*temp); in tsadc_get_temp_v3()
1098 static int tsadc_get_temp_v4(struct udevice *dev, int chn, int *temp) in tsadc_get_temp_v4() argument
1106 return tsadc_code_to_temp(&table, val, temp); in tsadc_get_temp_v4()
1110 int chn, int temp) in tsadc_alarm_temp_v2() argument
1116 alarm_value = tsadc_temp_to_code_v2(table, temp); in tsadc_alarm_temp_v2()
1127 static void tsadc_alarm_temp_v3(struct udevice *dev, int chn, int temp) in tsadc_alarm_temp_v3() argument
1133 alarm_value = tsadc_temp_to_code_v2(table, temp); in tsadc_alarm_temp_v3()
1143 int chn, int temp) in tsadc_tshut_temp_v2() argument
1149 tshut_value = tsadc_temp_to_code_v2(table, temp); in tsadc_tshut_temp_v2()
1160 static void tsadc_tshut_temp_v3(struct udevice *dev, int chn, int temp) in tsadc_tshut_temp_v3() argument
1166 tshut_value = tsadc_temp_to_code_v2(table, temp); in tsadc_tshut_temp_v3()
1210 int rockchip_thermal_get_temp(struct udevice *dev, int *temp) in rockchip_thermal_get_temp() argument
1214 priv->data->tsadc_get_temp(dev, 0, temp); in rockchip_thermal_get_temp()