Searched refs:adc_temp (Results 1 – 4 of 4) sorted by relevance
/linux/drivers/power/supply/ |
H A D | da9052-battery.c | 326 static unsigned char da9052_determine_vc_tbl_index(unsigned char adc_temp) in da9052_determine_vc_tbl_index() argument 330 if (adc_temp <= vc_tbl_ref[0]) in da9052_determine_vc_tbl_index() 333 if (adc_temp > vc_tbl_ref[DA9052_VC_TBL_REF_SZ - 1]) in da9052_determine_vc_tbl_index() 337 if ((adc_temp > vc_tbl_ref[i]) && in da9052_determine_vc_tbl_index() 338 (adc_temp <= DA9052_MEAN(vc_tbl_ref[i], vc_tbl_ref[i + 1]))) in da9052_determine_vc_tbl_index() 340 if ((adc_temp > DA9052_MEAN(vc_tbl_ref[i], vc_tbl_ref[i + 1])) in da9052_determine_vc_tbl_index() 341 && (adc_temp <= vc_tbl_ref[i])) in da9052_determine_vc_tbl_index() 355 int adc_temp; in da9052_bat_read_capacity() local 370 adc_temp = da9052_adc_read_temp(bat->da9052); in da9052_bat_read_capacity() 371 if (adc_temp < 0) in da9052_bat_read_capacity() [all …]
|
H A D | collie_battery.c | 48 int adc_temp; member 76 if (!bat->gpio_temp || bat->adc_temp < 0) in collie_read_temp() 83 value = ucb1x00_adc_read(ucb, bat->adc_temp, UCB_SYNC); in collie_read_temp() 247 .adc_temp = UCB_ADC_INP_AD0, 277 .adc_temp = -1,
|
/linux/drivers/iio/pressure/ |
H A D | bmp280-core.c | 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 [all …]
|
/linux/drivers/iio/chemical/ |
H A D | bme680_core.c | 301 static int bme680_read_temp_adc(struct bme680_data *data, u32 *adc_temp) in bme680_read_temp_adc() argument 321 *adc_temp = value_temp; in bme680_read_temp_adc() 333 static s32 bme680_calc_t_fine(struct bme680_data *data, u32 adc_temp) in bme680_calc_t_fine() argument 342 var1 = ((s32)adc_temp >> 3) - ((s32)calib->par_t1 << 1); in bme680_calc_t_fine() 351 u32 adc_temp; in bme680_get_t_fine() local 354 ret = bme680_read_temp_adc(data, &adc_temp); in bme680_get_t_fine() 358 *t_fine = bme680_calc_t_fine(data, adc_temp); in bme680_get_t_fine() 364 u32 adc_temp) in bme680_compensate_temp() argument 366 return (bme680_calc_t_fine(data, adc_temp) * 5 + 128) / 256; in bme680_compensate_temp() 735 u32 adc_temp; in bme680_read_temp() local [all …]
|