Lines Matching full:ticks
46 * hih6130_temp_ticks_to_millicelsius() - convert raw temperature ticks to
48 * @ticks: temperature ticks value received from sensor
50 static inline int hih6130_temp_ticks_to_millicelsius(int ticks) in hih6130_temp_ticks_to_millicelsius() argument
52 ticks = ticks >> 2; in hih6130_temp_ticks_to_millicelsius()
55 * Formula T = ( ticks / ( 2^14 - 2 ) ) * 165 -40 in hih6130_temp_ticks_to_millicelsius()
57 return (DIV_ROUND_CLOSEST(ticks * 1650, 16382) - 400) * 100; in hih6130_temp_ticks_to_millicelsius()
61 * hih6130_rh_ticks_to_per_cent_mille() - convert raw humidity ticks to
63 * @ticks: humidity ticks value received from sensor
65 static inline int hih6130_rh_ticks_to_per_cent_mille(int ticks) in hih6130_rh_ticks_to_per_cent_mille() argument
67 ticks &= ~0xC000; /* clear status bits */ in hih6130_rh_ticks_to_per_cent_mille()
70 * Formula RH = ( ticks / ( 2^14 -2 ) ) * 100 in hih6130_rh_ticks_to_per_cent_mille()
72 return DIV_ROUND_CLOSEST(ticks * 1000, 16382) * 100; in hih6130_rh_ticks_to_per_cent_mille()