Lines Matching refs:exponent
148 int val2, u8 *exponent) in opt3001_find_scale() argument
162 *exponent = i; in opt3001_find_scale()
170 static void opt3001_to_iio_ret(struct opt3001 *opt, u8 exponent, in opt3001_to_iio_ret() argument
175 lux = 10 * (mantissa << exponent); in opt3001_to_iio_ret()
229 u8 exponent; in opt3001_get_lux() local
339 exponent = OPT3001_REG_EXPONENT(opt->result); in opt3001_get_lux()
342 opt3001_to_iio_ret(opt, exponent, mantissa, val, val2); in opt3001_get_lux()
483 u8 exponent; in opt3001_write_event_value() local
490 ret = opt3001_find_scale(opt, val, val2, &exponent); in opt3001_write_event_value()
496 mantissa = (((val * 1000) + (val2 / 1000)) / 10) >> exponent; in opt3001_write_event_value()
497 value = (exponent << 12) | mantissa; in opt3001_write_event_value()
503 opt->high_thresh_exp = exponent; in opt3001_write_event_value()
508 opt->low_thresh_exp = exponent; in opt3001_write_event_value()