Skip to contentSkip to conversation

iio-adc-qcom-vadc-common-use-linux-unitsh-helpers.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jan 31, 2020

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: iio: adc: qcom-vadc-common: use <linux/units.h> helpers
has been removed from the -mm tree. Its filename was
iio-adc-qcom-vadc-common-use-linux-unitsh-helpers.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Akinobu Mita <[email protected]>
Subject: iio: adc: qcom-vadc-common: use <linux/units.h> helpers

This switches the qcom-vadc-common to use milli_kelvin_to_millicelsius() in <linux/units.h>.

Cc Hartmut Knaack <[email protected]>
Cc Lars-Peter Clausen <[email protected]>
Cc Peter Meerwald-Stadler <[email protected]>
Cc Amit Kucheria <[email protected]>
Cc Andy Shevchenko <[email protected]>
Cc Christoph Hellwig <[email protected]>
Cc Daniel Lezcano <[email protected]>
Cc Darren Hart <[email protected]>
Cc Emmanuel Grumbach <[email protected]>
Cc Guenter Roeck <[email protected]>
Cc Jean Delvare <[email protected]>
Cc Jens Axboe <[email protected]>
Cc Johannes Berg <[email protected]>
Cc Jonathan Cameron <[email protected]>
Cc Kalle Valo <[email protected]>
Cc Keith Busch <[email protected]>
Cc Luca Coelho <[email protected]>
Cc Sagi Grimberg <[email protected]>
Cc Stanislaw Gruszka <[email protected]>
Cc Sujith Thomas <[email protected]>
Cc Zhang Rui <[email protected]>

---

 drivers/iio/adc/qcom-vadc-common.c |    6 +++---
 drivers/iio/adc/qcom-vadc-common.h |    1 -
 2 files changed, 3 insertions(+), 4 deletions(-)
drivers/iio/adc/qcom-vadc-common.c renamed from drivers/iio/adc/qcom-vadc-common.c~iio-adc-qcom-vadc-common-use-linux-unitsh-helpers +3 -3
@@ -6,6 +6,7 @@
 #include <linux/log2.h>
 #include <linux/err.h>
 #include <linux/module.h>
+#include <linux/units.h>
 
 #include "qcom-vadc-common.h"
 
@@ -236,8 +237,7 @@ static int qcom_vadc_scale_die_temp(cons
 		voltage = 0;
 	}
 
-	voltage -= KELVINMIL_CELSIUSMIL;
-	*result_mdec = voltage;
+	*result_mdec = milli_kelvin_to_millicelsius(voltage);
 
 	return 0;
 }
@@ -325,7 +325,7 @@ static int qcom_vadc_scale_hw_calib_die_
 {
 	*result_mdec = qcom_vadc_scale_code_voltage_factor(adc_code,
 				prescale, data, 2);
-	*result_mdec -= KELVINMIL_CELSIUSMIL;
+	*result_mdec = milli_kelvin_to_millicelsius(*result_mdec);
 
 	return 0;
 }
drivers/iio/adc/qcom-vadc-common.h renamed from drivers/iio/adc/qcom-vadc-common.h~iio-adc-qcom-vadc-common-use-linux-unitsh-helpers +0 -1
@@ -38,7 +38,6 @@
 #define VADC_AVG_SAMPLES_MAX			512
 #define ADC5_AVG_SAMPLES_MAX			16
 
-#define KELVINMIL_CELSIUSMIL			273150
 #define PMIC5_CHG_TEMP_SCALE_FACTOR		377500
 #define PMIC5_SMB_TEMP_CONSTANT			419400
 #define PMIC5_SMB_TEMP_SCALE_FACTOR		356

_

Patches currently in -mm which might be from [email protected] are