Lines Matching refs:adc_temp

446 static int bmp280_read_temp_adc(struct bmp280_data *data, u32 *adc_temp)  in bmp280_read_temp_adc()  argument
463 *adc_temp = value_temp; in bmp280_read_temp_adc()
475 static s32 bmp280_calc_t_fine(struct bmp280_data *data, u32 adc_temp) in bmp280_calc_t_fine() argument
480 var1 = (((((s32)adc_temp) >> 3) - ((s32)calib->T1 << 1)) * in bmp280_calc_t_fine()
482 var2 = (((((((s32)adc_temp) >> 4) - ((s32)calib->T1)) * in bmp280_calc_t_fine()
483 ((((s32)adc_temp >> 4) - ((s32)calib->T1))) >> 12) * in bmp280_calc_t_fine()
490 u32 adc_temp; in bmp280_get_t_fine() local
493 ret = bmp280_read_temp_adc(data, &adc_temp); in bmp280_get_t_fine()
497 *t_fine = bmp280_calc_t_fine(data, adc_temp); in bmp280_get_t_fine()
502 static s32 bmp280_compensate_temp(struct bmp280_data *data, u32 adc_temp) in bmp280_compensate_temp() argument
504 return (bmp280_calc_t_fine(data, adc_temp) * 5 + 128) / 256; in bmp280_compensate_temp()
564 u32 adc_temp; in bmp280_read_temp() local
567 ret = bmp280_read_temp_adc(data, &adc_temp); in bmp280_read_temp()
571 *comp_temp = bmp280_compensate_temp(data, adc_temp); in bmp280_read_temp()
1108 u32 adc_temp, adc_press, comp_press; in bmp280_trigger_handler() local
1124 adc_temp = FIELD_GET(BMP280_MEAS_TRIM_MASK, get_unaligned_be24(&data->buf[3])); in bmp280_trigger_handler()
1125 if (adc_temp == BMP280_TEMP_SKIPPED) { in bmp280_trigger_handler()
1130 comp_temp = bmp280_compensate_temp(data, adc_temp); in bmp280_trigger_handler()
1139 t_fine = bmp280_calc_t_fine(data, adc_temp); in bmp280_trigger_handler()
1228 u32 adc_temp, adc_press, adc_humidity, comp_press, comp_humidity; in bme280_trigger_handler() local
1244 adc_temp = FIELD_GET(BMP280_MEAS_TRIM_MASK, get_unaligned_be24(&data->buf[3])); in bme280_trigger_handler()
1245 if (adc_temp == BMP280_TEMP_SKIPPED) { in bme280_trigger_handler()
1250 comp_temp = bmp280_compensate_temp(data, adc_temp); in bme280_trigger_handler()
1259 t_fine = bmp280_calc_t_fine(data, adc_temp); in bme280_trigger_handler()
1432 static int bmp380_read_temp_adc(struct bmp280_data *data, u32 *adc_temp) in bmp380_read_temp_adc() argument
1449 *adc_temp = value_temp; in bmp380_read_temp_adc()
1461 static s32 bmp380_calc_t_fine(struct bmp280_data *data, u32 adc_temp) in bmp380_calc_t_fine() argument
1466 var1 = ((s64) adc_temp) - (((s64) calib->T1) << 8); in bmp380_calc_t_fine()
1477 s32 adc_temp; in bmp380_get_t_fine() local
1480 ret = bmp380_read_temp_adc(data, &adc_temp); in bmp380_get_t_fine()
1484 *t_fine = bmp380_calc_t_fine(data, adc_temp); in bmp380_get_t_fine()
1489 static int bmp380_compensate_temp(struct bmp280_data *data, u32 adc_temp) in bmp380_compensate_temp() argument
1494 var6 = bmp380_calc_t_fine(data, adc_temp); in bmp380_compensate_temp()
1573 u32 adc_temp; in bmp380_read_temp() local
1576 ret = bmp380_read_temp_adc(data, &adc_temp); in bmp380_read_temp()
1580 *comp_temp = bmp380_compensate_temp(data, adc_temp); in bmp380_read_temp()
1902 u32 adc_temp, adc_press, comp_press; in bmp380_trigger_handler() local
1918 adc_temp = get_unaligned_le24(&data->buf[3]); in bmp380_trigger_handler()
1919 if (adc_temp == BMP380_TEMP_SKIPPED) { in bmp380_trigger_handler()
1924 comp_temp = bmp380_compensate_temp(data, adc_temp); in bmp380_trigger_handler()
1933 t_fine = bmp380_calc_t_fine(data, adc_temp); in bmp380_trigger_handler()
2741 static int bmp180_read_temp_adc(struct bmp280_data *data, u32 *adc_temp) in bmp180_read_temp_adc() argument
2758 *adc_temp = be16_to_cpu(data->be16); in bmp180_read_temp_adc()
2809 static s32 bmp180_calc_t_fine(struct bmp280_data *data, u32 adc_temp) in bmp180_calc_t_fine() argument
2814 x1 = ((((s32)adc_temp) - calib->AC6) * calib->AC5) >> 15; in bmp180_calc_t_fine()
2821 s32 adc_temp; in bmp180_get_t_fine() local
2824 ret = bmp180_read_temp_adc(data, &adc_temp); in bmp180_get_t_fine()
2828 *t_fine = bmp180_calc_t_fine(data, adc_temp); in bmp180_get_t_fine()
2833 static s32 bmp180_compensate_temp(struct bmp280_data *data, u32 adc_temp) in bmp180_compensate_temp() argument
2835 return (bmp180_calc_t_fine(data, adc_temp) + 8) / 16; in bmp180_compensate_temp()
2840 u32 adc_temp; in bmp180_read_temp() local
2843 ret = bmp180_read_temp_adc(data, &adc_temp); in bmp180_read_temp()
2847 *comp_temp = bmp180_compensate_temp(data, adc_temp); in bmp180_read_temp()