Lines Matching refs:temp

17  * few differences too, for example the local temp has a higher resolution
53 { 0x00, 0x01 }, /* temp */
63 { 0, 0 }, /* temp (unused) */
73 { 0x00, 0x01, 0x23 }, /* temp */
80 { 0, 0, 0 }, /* temp - unused */
148 u16 temp[7][3];
158 int temp = reg;
161 temp -= 64 * 256;
163 return DIV_ROUND_CLOSEST(temp * 125, 32);
166 static u16 tmp401_temp_to_register(long temp, u8 config, int zbits)
169 temp = clamp_val(temp, -64000, 191000);
170 temp += 64000;
172 temp = clamp_val(temp, 0, 127000);
174 return DIV_ROUND_CLOSEST(temp * (1 << (8 - zbits)), 1000) << zbits;
185 for (j = 0; j < num_regs; j++) { /* temp / low / ... */
200 data->temp[j][i] = j == 3 ? val << 8 : val;
289 tmp401_register_to_temp(data->temp[nr][index], data->config));
296 int temp, index = to_sensor_dev_attr(devattr)->index;
303 temp = tmp401_register_to_temp(data->temp[3][index], data->config);
304 temp -= data->temp_crit_hyst * 1000;
307 return sprintf(buf, "%d\n", temp);
350 data->temp[nr][index] = reg;
361 int temp, index = to_sensor_dev_attr(devattr)->index;
378 temp = tmp401_register_to_temp(data->temp[3][index], data->config);
379 val = clamp_val(val, temp - 255000, temp);
380 reg = ((temp - val) + 500) / 1000;
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);