Home
last modified time | relevance | path

Searched refs:th_exp (Results 1 – 1 of 1) sorted by relevance

/linux-6.15/drivers/iio/light/
H A Dopt4060.c676 u32 th_val, th_exp, bits; in opt4060_calc_th_reg() local
684 th_exp = 11; /* Maximum exponent */ in opt4060_calc_th_reg()
686 th_exp = bits - 20; in opt4060_calc_th_reg()
688 th_exp = 0; in opt4060_calc_th_reg()
689 th_val = (adc_val >> (8 + th_exp)) & 0xfff; in opt4060_calc_th_reg()
691 return (th_exp << 12) + th_val; in opt4060_calc_th_reg()
700 u32 th_val, th_exp; in opt4060_calc_val_from_th_reg() local
702 th_exp = (th_reg >> 12) & 0xf; in opt4060_calc_val_from_th_reg()
705 return th_val << (8 + th_exp); in opt4060_calc_val_from_th_reg()