Lines Matching refs:temp
65 } temp; member
93 if (!peci_sensor_need_update(&priv->temp.target.state)) in update_temp_target()
100 priv->temp.target.tjmax = in update_temp_target()
105 priv->temp.target.tcontrol = priv->temp.target.tjmax - tcontrol_margin; in update_temp_target()
108 priv->temp.target.tthrottle = priv->temp.target.tjmax - tthrottle_offset; in update_temp_target()
110 peci_sensor_mark_updated(&priv->temp.target.state); in update_temp_target()
119 mutex_lock(&priv->temp.target.state.lock); in get_temp_target()
127 *val = priv->temp.target.tcontrol; in get_temp_target()
130 *val = priv->temp.target.tthrottle; in get_temp_target()
133 *val = priv->temp.target.tjmax; in get_temp_target()
136 *val = priv->temp.target.tjmax - priv->temp.target.tcontrol; in get_temp_target()
143 mutex_unlock(&priv->temp.target.state.lock); in get_temp_target()
182 u16 temp; in get_die_temp() local
184 mutex_lock(&priv->temp.die.state.lock); in get_die_temp()
185 if (!peci_sensor_need_update(&priv->temp.die.state)) in get_die_temp()
188 ret = peci_temp_read(priv->peci_dev, &temp); in get_die_temp()
192 if (!dts_valid(temp)) { in get_die_temp()
201 priv->temp.die.value = (s32)tjmax + dts_ten_dot_six_to_millidegree(temp); in get_die_temp()
203 peci_sensor_mark_updated(&priv->temp.die.state); in get_die_temp()
206 *val = priv->temp.die.value; in get_die_temp()
208 mutex_unlock(&priv->temp.die.state.lock); in get_die_temp()
219 mutex_lock(&priv->temp.dts.state.lock); in get_dts()
220 if (!peci_sensor_need_update(&priv->temp.dts.state)) in get_dts()
238 priv->temp.dts.value = in get_dts()
241 peci_sensor_mark_updated(&priv->temp.dts.state); in get_dts()
244 *val = priv->temp.dts.value; in get_dts()
246 mutex_unlock(&priv->temp.dts.state.lock); in get_dts()
257 mutex_lock(&priv->temp.core[core_index].state.lock); in get_core_temp()
258 if (!peci_sensor_need_update(&priv->temp.core[core_index].state)) in get_core_temp()
276 priv->temp.core[core_index].value = in get_core_temp()
279 peci_sensor_mark_updated(&priv->temp.core[core_index].state); in get_core_temp()
282 *val = priv->temp.core[core_index].value; in get_core_temp()
284 mutex_unlock(&priv->temp.core[core_index].state.lock); in get_core_temp()
437 mutex_init(&priv->temp.target.state.lock); in sensor_init()
438 mutex_init(&priv->temp.die.state.lock); in sensor_init()
439 mutex_init(&priv->temp.dts.state.lock); in sensor_init()
442 mutex_init(&priv->temp.core[i].state.lock); in sensor_init()
452 HWMON_CHANNEL_INFO(temp,