Searched refs:resistance_raw (Results 1 – 1 of 1) sorted by relevance
/linux/drivers/iio/chemical/ |
A D | sgp40.c | 140 static int sgp40_calc_voc(struct sgp40_data *data, u16 resistance_raw, int *voc) in sgp40_calc_voc() argument 147 x = ((int)resistance_raw - data->res_calibbias) * 106; in sgp40_calc_voc() 155 resistance_raw, data->res_calibbias, x, exp, *voc); in sgp40_calc_voc() 160 static int sgp40_measure_resistance_raw(struct sgp40_data *data, u16 *resistance_raw) in sgp40_measure_resistance_raw() argument 205 *resistance_raw = be16_to_cpu(tgres.res_ticks); in sgp40_measure_resistance_raw() 216 u16 resistance_raw; in sgp40_read_raw() local 222 ret = sgp40_measure_resistance_raw(data, &resistance_raw); in sgp40_read_raw() 226 *val = resistance_raw; in sgp40_read_raw() 242 ret = sgp40_measure_resistance_raw(data, &resistance_raw); in sgp40_read_raw() 246 ret = sgp40_calc_voc(data, resistance_raw, &voc); in sgp40_read_raw()
|
Completed in 3 milliseconds