diff mbox series

[v3,05/15] thermal/drivers/tsens: Drop msm8976-specific defines

Message ID 20221220024721.947147-6-dmitry.baryshkov@linaro.org (mailing list archive)
State Superseded
Headers show
Series thermal/drivers/tsens: specify nvmem cells in DT rather than parsing them manually | expand

Commit Message

Dmitry Baryshkov Dec. 20, 2022, 2:47 a.m. UTC
Drop msm8976-specific defines, which duplicate generic ones.

Fixes: 0e580290170d ("thermal: qcom: tsens-v1: Add support for MSM8956 and MSM8976")
Reviewed-by: 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

Konrad Dybcio Dec. 20, 2022, 10:08 a.m. UTC | #1
On 20.12.2022 03:47, Dmitry Baryshkov wrote:
> Drop msm8976-specific defines, which duplicate generic ones.
> 
> Fixes: 0e580290170d ("thermal: qcom: tsens-v1: Add support for MSM8956 and MSM8976")
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>  drivers/thermal/qcom/tsens-v1.c | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/thermal/qcom/tsens-v1.c b/drivers/thermal/qcom/tsens-v1.c
> index 96ef12d47bff..a7f53966156b 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);
>  	}
>  }
diff mbox series

Patch

diff --git a/drivers/thermal/qcom/tsens-v1.c b/drivers/thermal/qcom/tsens-v1.c
index 96ef12d47bff..a7f53966156b 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);
 	}
 }