Lines Matching full:temp

98 #define TEMP_DAC_TEMP_TO_REG(temp) \  argument
99 (((temp) - TEMP_DAC_MIN) * TEMP_DAC_SCALE_NUM / TEMP_DAC_SCALE_DEN)
139 long temp; member
246 * This function updates the internal temp value based on the
264 chip->temp = qpnp_tm_decode_temp(chip, stage_new) in qpnp_tm_update_temp_no_adc()
268 chip->temp = qpnp_tm_decode_temp(chip, stage_new + 1) in qpnp_tm_update_temp_no_adc()
277 static int qpnp_tm_get_temp(struct thermal_zone_device *tz, int *temp) in qpnp_tm_get_temp() argument
282 if (!temp) in qpnp_tm_get_temp()
286 *temp = DEFAULT_TEMP; in qpnp_tm_get_temp()
301 chip->temp = mili_celsius; in qpnp_tm_get_temp()
304 *temp = chip->temp; in qpnp_tm_get_temp()
310 int temp) in qpnp_tm_update_critical_trip_temp() argument
325 if (temp == THERMAL_TEMP_INVALID || in qpnp_tm_update_critical_trip_temp()
326 temp < stage2_threshold_min) { in qpnp_tm_update_critical_trip_temp()
331 if (temp <= stage2_threshold_max) { in qpnp_tm_update_critical_trip_temp()
333 ((stage2_threshold_max - temp) / in qpnp_tm_update_critical_trip_temp()
344 temp, stage2_threshold_max, stage2_threshold_max); in qpnp_tm_update_critical_trip_temp()
358 const struct thermal_trip *trip, int temp) in qpnp_tm_set_trip_temp() argument
367 ret = qpnp_tm_update_critical_trip_temp(chip, temp); in qpnp_tm_set_trip_temp()
378 static int qpnp_tm_gen2_rev2_set_temp_thresh(struct qpnp_tm_chip *chip, unsigned int trip, int temp) in qpnp_tm_gen2_rev2_set_temp_thresh() argument
388 } else if (temp < TEMP_DAC_MIN || temp > temp_dac_max[trip]) { in qpnp_tm_gen2_rev2_set_temp_thresh()
389 dev_err(chip->dev, "invalid TEMP_DAC temp = %d\n", temp); in qpnp_tm_gen2_rev2_set_temp_thresh()
393 reg = TEMP_DAC_TEMP_TO_REG(temp); in qpnp_tm_gen2_rev2_set_temp_thresh()
408 const struct thermal_trip *trip, int temp) in qpnp_tm_gen2_rev2_set_trip_temp() argument
415 ret = qpnp_tm_gen2_rev2_set_temp_thresh(chip, trip_index, temp); in qpnp_tm_gen2_rev2_set_trip_temp()
426 static int qpnp_tm_lite_set_temp_thresh(struct qpnp_tm_chip *chip, unsigned int trip, int temp) in qpnp_tm_lite_set_temp_thresh() argument
461 if (temp < temp_map[THRESH_MIN] || temp > temp_map[THRESH_MAX]) { in qpnp_tm_lite_set_temp_thresh()
462 dev_err(chip->dev, "invalid TEMP_LITE temp = %d\n", temp); in qpnp_tm_lite_set_temp_thresh()
469 if (temp >= temp_map[i]) { in qpnp_tm_lite_set_temp_thresh()
500 const struct thermal_trip *trip, int temp) in qpnp_tm_lite_set_trip_temp() argument
507 ret = qpnp_tm_lite_set_temp_thresh(chip, trip_index, temp); in qpnp_tm_lite_set_trip_temp()
653 * Store the warning trip temp in temp_thresh_map[0] and the shutdown trip in qpnp_tm_lite_sync_thresholds()
654 * temp in temp_thresh_map[2]. The second trip point is purely in software in qpnp_tm_lite_sync_thresholds()
716 * This function initializes the internal temp value based on only the
731 chip->temp = DEFAULT_TEMP; in qpnp_tm_threshold_init()
734 chip->temp = qpnp_tm_decode_temp(chip, chip->stage); in qpnp_tm_threshold_init()
890 { .compatible = "qcom,spmi-temp-alarm" },
897 .name = "spmi-temp-alarm",
904 MODULE_ALIAS("platform:spmi-temp-alarm");