diff mbox series

[RFC,05/10] thermal/drivers/tsens: drop msm8976-specific defines

Message ID 20220910124701.4060321-6-dmitry.baryshkov@linaro.org
State Superseded
Headers show
Series [RFC,01/10] dt-bindings: thermal: tsens: support per-sensor calibration cells | expand

Commit Message

Dmitry Baryshkov Sept. 10, 2022, 12:46 p.m. UTC
Drop msm8976-specific defines, which duplicate generic ones.

Cc: Konrad Dybcio <konrad.dybcio@somainline.org>
Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/thermal/qcom/tsens-v1.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

Comments

AngeloGioacchino Del Regno Sept. 12, 2022, 8:52 a.m. UTC | #1
Il 10/09/22 14:46, Dmitry Baryshkov ha scritto:
> Drop msm8976-specific defines, which duplicate generic ones.
> 
> Cc: Konrad Dybcio <konrad.dybcio@somainline.org>
> Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

The duplication is useless indeed... However, should you add a Fixes tag here?

0e580290170d ("thermal: qcom: tsens-v1: Add support for MSM8956 and MSM8976")

Anyway, for the code:

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

Cheers,
Angelo
diff mbox series

Patch

diff --git a/drivers/thermal/qcom/tsens-v1.c b/drivers/thermal/qcom/tsens-v1.c
index 868d7b4c9e36..e6ef3bacfc39 100644
--- a/drivers/thermal/qcom/tsens-v1.c
+++ b/drivers/thermal/qcom/tsens-v1.c
@@ -78,11 +78,6 @@ 
 
 #define MSM8976_CAL_SEL_MASK	0x3
 
-#define MSM8976_CAL_DEGC_PT1	30
-#define MSM8976_CAL_DEGC_PT2	120
-#define MSM8976_SLOPE_FACTOR	1000
-#define MSM8976_SLOPE_DEFAULT	3200
-
 /* eeprom layout data for qcs404/405 (v1) */
 #define BASE0_MASK	0x000007f8
 #define BASE1_MASK	0x0007f800
@@ -160,8 +155,8 @@  static void compute_intercept_slope_8976(struct tsens_priv *priv,
 	priv->sensor[10].slope = 3286;
 
 	for (i = 0; i < priv->num_sensors; i++) {
-		priv->sensor[i].offset = (p1[i] * MSM8976_SLOPE_FACTOR) -
-				(MSM8976_CAL_DEGC_PT1 *
+		priv->sensor[i].offset = (p1[i] * SLOPE_FACTOR) -
+				(CAL_DEGC_PT1 *
 				priv->sensor[i].slope);
 	}
 }