• Home
  • Raw
  • Download

Lines Matching refs:temp

148 	u16 temp[7][3];  member
158 int temp = reg; in tmp401_register_to_temp() local
161 temp -= 64 * 256; in tmp401_register_to_temp()
163 return DIV_ROUND_CLOSEST(temp * 125, 32); in tmp401_register_to_temp()
166 static u16 tmp401_temp_to_register(long temp, u8 config, int zbits) in tmp401_temp_to_register() argument
169 temp = clamp_val(temp, -64000, 191000); in tmp401_temp_to_register()
170 temp += 64000; in tmp401_temp_to_register()
172 temp = clamp_val(temp, 0, 127000); in tmp401_temp_to_register()
174 return DIV_ROUND_CLOSEST(temp * (1 << (8 - zbits)), 1000) << zbits; in tmp401_temp_to_register()
200 data->temp[j][i] = j == 3 ? val << 8 : val; in tmp401_update_device_reg16()
289 tmp401_register_to_temp(data->temp[nr][index], data->config)); in temp_show()
296 int temp, index = to_sensor_dev_attr(devattr)->index; in temp_crit_hyst_show() local
303 temp = tmp401_register_to_temp(data->temp[3][index], data->config); in temp_crit_hyst_show()
304 temp -= data->temp_crit_hyst * 1000; in temp_crit_hyst_show()
307 return sprintf(buf, "%d\n", temp); in temp_crit_hyst_show()
350 data->temp[nr][index] = reg; in temp_store()
361 int temp, index = to_sensor_dev_attr(devattr)->index; in temp_crit_hyst_store() local
378 temp = tmp401_register_to_temp(data->temp[3][index], data->config); in temp_crit_hyst_store()
379 val = clamp_val(val, temp - 255000, temp); in temp_crit_hyst_store()
380 reg = ((temp - val) + 500) / 1000; in temp_crit_hyst_store()
461 static SENSOR_DEVICE_ATTR_2_RO(temp1_input, temp, 0, 0);
462 static SENSOR_DEVICE_ATTR_2_RW(temp1_min, temp, 1, 0);
463 static SENSOR_DEVICE_ATTR_2_RW(temp1_max, temp, 2, 0);
464 static SENSOR_DEVICE_ATTR_2_RW(temp1_crit, temp, 3, 0);
472 static SENSOR_DEVICE_ATTR_2_RO(temp2_input, temp, 0, 1);
473 static SENSOR_DEVICE_ATTR_2_RW(temp2_min, temp, 1, 1);
474 static SENSOR_DEVICE_ATTR_2_RW(temp2_max, temp, 2, 1);
475 static SENSOR_DEVICE_ATTR_2_RW(temp2_crit, temp, 3, 1);
523 static SENSOR_DEVICE_ATTR_2_RO(temp1_lowest, temp, 4, 0);
524 static SENSOR_DEVICE_ATTR_2_RO(temp1_highest, temp, 5, 0);
525 static SENSOR_DEVICE_ATTR_2_RO(temp2_lowest, temp, 4, 1);
526 static SENSOR_DEVICE_ATTR_2_RO(temp2_highest, temp, 5, 1);
542 static SENSOR_DEVICE_ATTR_2_RO(temp3_input, temp, 0, 2);
543 static SENSOR_DEVICE_ATTR_2_RW(temp3_min, temp, 1, 2);
544 static SENSOR_DEVICE_ATTR_2_RW(temp3_max, temp, 2, 2);
545 static SENSOR_DEVICE_ATTR_2_RW(temp3_crit, temp, 3, 2);
577 static SENSOR_DEVICE_ATTR_2_RW(temp2_offset, temp, 6, 1);