Commit 89199dcb authored by Armando Visconti's avatar Armando Visconti Committed by Maureen Helm
Browse files

driver/sensor: lis2mdl: Fix the temperature fractional value



The temperature fractional value has to be assigned multiplied
by 10^6.

Signed-off-by: default avatarArmando Visconti <armando.visconti@st.com>
parent 3a7c37ab
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -148,7 +148,7 @@ static void lis2mdl_channel_get_temp(struct device *dev,
	struct lis2mdl_data *drv_data = dev->driver_data;

	val->val1 = drv_data->temp_sample / 100;
	val->val2 = drv_data->temp_sample % 100;
	val->val2 = (drv_data->temp_sample % 100) * 10000;
}

static int lis2mdl_channel_get(struct device *dev, enum sensor_channel chan,