Lines Matching defs:temp
78 static int bcm2835_thermal_temp2adc(int temp, int offset, int slope)
80 temp -= offset;
81 temp /= slope;
83 if (temp < 0)
84 temp = 0;
85 if (temp >= BIT(BCM2835_TS_TSENSSTAT_DATA_BITS))
86 temp = BIT(BCM2835_TS_TSENSSTAT_DATA_BITS) - 1;
88 return temp;
91 static int bcm2835_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
101 *temp = bcm2835_thermal_adc2temp(