/* calculates the b-field value in G based on the sensor value 
After the calculation, the value is scaled to Gauss (1 G == 0.1 mT). */
static void tmag5273_channel_b_field_convert(int64_t raw_value, const uint16_t range, struct sensor_value *b_field)
/* calculates the b-field value in G based on the sensor value 
After the calculation, the value is scaled to Gauss (1 G == 0.1 mT). */
static void tmag5273_channel_b_field_convert(int64_t raw_value, const uint16_t range, struct sensor_value *b_field)
{
	raw_value *= (range << 1) * CONV_FACTOR_MT_TO_GS;
	b_field->val1 = raw_value / (1 << 16);
	const int64_t raw_dec_part = b_field->val1 * (1 << 16);
	b_field->val2 = ((raw_value - raw_dec_part) * 1000000) / (1 << 16);
}