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

Commit 36d13c87 authored by Jishnu Prakash's avatar Jishnu Prakash
Browse files

thermal: adc-tm: Add correction for PMIC7 ADC_TM



Correct calculation of value written to ADC_TM measurement enable
register.

Change-Id: I14a6f585bb0cee678aa6eee749ba3e983ba47173
Signed-off-by: default avatarJishnu Prakash <jprakash@codeaurora.org>
parent d76cd6ca
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
 */

#include <linux/module.h>
@@ -206,7 +206,7 @@ static int adc_tm7_configure(struct adc_tm_sensor *sensor)
	buf[11] = ADC_TM_LOWER_MASK(mask);
	buf[12] = ADC_TM_UPPER_MASK(mask);

	buf[13] |= (sensor->meas_en | sensor->high_thr_en << 1 |
	buf[13] = (sensor->meas_en | sensor->high_thr_en << 1 |
				sensor->low_thr_en);

	ret = adc_tm_write_reg(chip, ADC_TM_SID, buf, 14);