Lines Matching refs:raw_value
764 static inline void tmag5273_channel_b_field_convert(int64_t raw_value, const uint16_t range, in tmag5273_channel_b_field_convert() argument
767 raw_value *= (range << 1) * CONV_FACTOR_MT_TO_GS; in tmag5273_channel_b_field_convert()
770 b_field->val1 = raw_value / (1 << 16); in tmag5273_channel_b_field_convert()
777 b_field->val2 = ((raw_value - raw_dec_part) * 1000000) / (1 << 16); in tmag5273_channel_b_field_convert()
786 static inline void tmag5273_temperature_convert(int64_t raw_value, struct sensor_value *temperature) in tmag5273_temperature_convert() argument
790 ((raw_value - TMAG5273_TEMPERATURE_T_ADC_T0) / TMAG5273_TEMPERATURE_T_ADC_RES)) * in tmag5273_temperature_convert()
803 static inline void tmag5273_angle_convert(int16_t raw_value, struct sensor_value *angle) in tmag5273_angle_convert() argument
805 angle->val1 = (raw_value >> 4) & 0x1FF; in tmag5273_angle_convert()
806 angle->val2 = ((raw_value & 0xF) * 1000000) >> 1; in tmag5273_angle_convert()
818 static inline void tmag5273_magnitude_convert(uint8_t raw_value, const uint16_t range, in tmag5273_magnitude_convert() argument
821 tmag5273_channel_b_field_convert(raw_value << 8, range, magnitude); in tmag5273_magnitude_convert()