Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fa3881a4 authored by Ram Chandrasekar's avatar Ram Chandrasekar Committed by Matt Wagantall
Browse files

msm: lmh_lite: Normalize the intensity reading



Normalize the throttling intensity reading for a LMH sensor
based on the maximum throttling intensity value.

Change-Id: I48567d5c1f027b244a296c96f1ca8ddd5ae4846a
Signed-off-by: default avatarRam Chandrasekar <rkumbako@codeaurora.org>
parent 34c5f893
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -291,7 +291,10 @@ static void lmh_read_and_update(struct lmh_driver_data *lmh_dat)
				== lmh_sensor->sensor_hw_node_id)) {

				lmh_sensor->last_read_value =
					payload.sensor[idx].intensity;
					(payload.sensor[idx].max_intensity) ?
					(payload.sensor[idx].intensity
					/ payload.sensor[idx].max_intensity)
					: payload.sensor[idx].intensity;
				trace_lmh_sensor_reading(
					lmh_sensor->sensor_name,
					lmh_sensor->last_read_value);