Lines Matching full:trip
66 /* Over-temperature trip point values in mC */
358 const struct thermal_trip *trip, int temp) in qpnp_tm_set_trip_temp() argument
363 if (trip->type != THERMAL_TRIP_CRITICAL) 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
385 if (trip >= STAGE_COUNT) { in qpnp_tm_gen2_rev2_set_temp_thresh()
386 dev_err(chip->dev, "invalid TEMP_DAC trip = %d\n", trip); in qpnp_tm_gen2_rev2_set_temp_thresh()
388 } else if (temp < TEMP_DAC_MIN || temp > temp_dac_max[trip]) { in qpnp_tm_gen2_rev2_set_temp_thresh()
396 ret = qpnp_tm_write(chip, QPNP_TM_REG_TEMP_DAC_STG1 + trip, reg); in qpnp_tm_gen2_rev2_set_temp_thresh()
402 chip->temp_thresh_map[trip] = temp_cfg; 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
410 unsigned int trip_index = THERMAL_TRIP_PRIV_TO_INT(trip->priv); 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
435 if (trip >= STAGE_COUNT) { in qpnp_tm_lite_set_temp_thresh()
436 dev_err(chip->dev, "invalid TEMP_LITE trip = %d\n", trip); in qpnp_tm_lite_set_temp_thresh()
440 switch (trip) { in qpnp_tm_lite_set_temp_thresh()
447 * The second trip point is purely in software to facilitate in qpnp_tm_lite_set_temp_thresh()
476 if (temp_cfg == chip->temp_thresh_map[trip]) in qpnp_tm_lite_set_temp_thresh()
494 chip->temp_thresh_map[trip] = temp_cfg; in qpnp_tm_lite_set_temp_thresh()
500 const struct thermal_trip *trip, int temp) in qpnp_tm_lite_set_trip_temp() argument
502 unsigned int trip_index = THERMAL_TRIP_PRIV_TO_INT(trip->priv); in qpnp_tm_lite_set_trip_temp()
560 static int qpnp_tm_gen2_rev2_configure_trip_temps_cb(struct thermal_trip *trip, void *data) in qpnp_tm_gen2_rev2_configure_trip_temps_cb() argument
566 trip->priv = THERMAL_INT_TO_TRIP_PRIV(chip->ntrips); in qpnp_tm_gen2_rev2_configure_trip_temps_cb()
567 ret = qpnp_tm_gen2_rev2_set_temp_thresh(chip, chip->ntrips, trip->temperature); in qpnp_tm_gen2_rev2_configure_trip_temps_cb()
614 static int qpnp_tm_lite_configure_trip_temps_cb(struct thermal_trip *trip, void *data) in qpnp_tm_lite_configure_trip_temps_cb() argument
620 trip->priv = THERMAL_INT_TO_TRIP_PRIV(chip->ntrips); in qpnp_tm_lite_configure_trip_temps_cb()
621 ret = qpnp_tm_lite_set_temp_thresh(chip, chip->ntrips, trip->temperature); in qpnp_tm_lite_configure_trip_temps_cb()
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()
657 * crossed. Thus, there is no register to read for the second trip in qpnp_tm_lite_sync_thresholds()
864 * read the trip points. get_temp() returns the default temperature in qpnp_tm_probe()