Lines Matching refs:uv
265 int raw, uv, ret; in ntc_adc_iio_read() local
273 ret = iio_convert_raw_to_processed(channel, raw, &uv, 1000); in ntc_adc_iio_read()
276 uv = (pdata->pullup_uv * (s64)raw) >> 12; in ntc_adc_iio_read()
279 return uv; in ntc_adc_iio_read()
379 static int get_ohm_of_thermistor(struct ntc_data *data, unsigned int uv) in get_ohm_of_thermistor() argument
387 if (uv == 0) in get_ohm_of_thermistor()
390 if (uv >= puv) in get_ohm_of_thermistor()
395 n = div_u64(pdo * (puv - uv), uv); in get_ohm_of_thermistor()
397 n = div_u64(puo * uv, puv - uv); in get_ohm_of_thermistor()
399 n = div64_u64_safe(pdo * puo * (puv - uv), in get_ohm_of_thermistor()
400 puo * uv - pdo * (puv - uv)); in get_ohm_of_thermistor()
402 n = div64_u64_safe(pdo * puo * uv, pdo * (puv - uv) - puo * uv); in get_ohm_of_thermistor()