Lines Matching defs:temp
116 static inline int hi6220_thermal_temp_to_step(int temp)
118 return DIV_ROUND_UP(temp - HI6220_TEMP_BASE, HI6220_TEMP_STEP);
134 static inline int hi3660_thermal_temp_to_step(int temp)
136 return DIV_ROUND_UP(temp - HI3660_TEMP_BASE, HI3660_TEMP_STEP);
186 static inline void hi6220_thermal_alarm_set(void __iomem *addr, int temp)
188 writel(hi6220_thermal_temp_to_step(temp) | 0x0FFFFFF00,
192 static inline void hi6220_thermal_reset_set(void __iomem *addr, int temp)
194 writel(hi6220_thermal_temp_to_step(temp), addr + HI6220_TEMP0_RST_TH);
356 /* setting lag value between current temp and the threshold */
382 /* setting lag value between current temp and the threshold */
441 static int hisi_thermal_get_temp(void *__data, int *temp)
446 *temp = data->ops->get_temp(sensor);
448 dev_dbg(&data->pdev->dev, "tzd=%p, id=%d, temp=%d, thres=%d\n",
449 sensor->tzd, sensor->id, *temp, sensor->thres_temp);
462 int temp = 0;
466 hisi_thermal_get_temp(sensor, &temp);
468 if (temp >= sensor->thres_temp) {
471 sensor->id, temp, sensor->thres_temp);
479 sensor->id, temp, sensor->thres_temp);