aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/thermal/qcom/tsens-common.c14
-rw-r--r--drivers/thermal/qcom/tsens-v0_1.c1
-rw-r--r--drivers/thermal/qcom/tsens-v2.c1
-rw-r--r--drivers/thermal/qcom/tsens.c5
-rw-r--r--drivers/thermal/qcom/tsens.h1
5 files changed, 0 insertions, 22 deletions
diff --git a/drivers/thermal/qcom/tsens-common.c b/drivers/thermal/qcom/tsens-common.c
index 928e8e81ba69..528df8801254 100644
--- a/drivers/thermal/qcom/tsens-common.c
+++ b/drivers/thermal/qcom/tsens-common.c
@@ -64,20 +64,6 @@ void compute_intercept_slope(struct tsens_priv *priv, u32 *p1,
64 } 64 }
65} 65}
66 66
67bool is_sensor_enabled(struct tsens_priv *priv, u32 hw_id)
68{
69 u32 val;
70 int ret;
71
72 if ((hw_id > (priv->num_sensors - 1)) || (hw_id < 0))
73 return -EINVAL;
74 ret = regmap_field_read(priv->rf[SENSOR_EN], &val);
75 if (ret)
76 return ret;
77
78 return val & (1 << hw_id);
79}
80
81static inline int code_to_degc(u32 adc_code, const struct tsens_sensor *s) 67static inline int code_to_degc(u32 adc_code, const struct tsens_sensor *s)
82{ 68{
83 int degc, num, den; 69 int degc, num, den;
diff --git a/drivers/thermal/qcom/tsens-v0_1.c b/drivers/thermal/qcom/tsens-v0_1.c
index a319283c223f..6f26fadf4c27 100644
--- a/drivers/thermal/qcom/tsens-v0_1.c
+++ b/drivers/thermal/qcom/tsens-v0_1.c
@@ -334,7 +334,6 @@ static const struct reg_field tsens_v0_1_regfields[MAX_REGFIELDS] = {
334 /* CTRL_OFFSET */ 334 /* CTRL_OFFSET */
335 [TSENS_EN] = REG_FIELD(SROT_CTRL_OFF, 0, 0), 335 [TSENS_EN] = REG_FIELD(SROT_CTRL_OFF, 0, 0),
336 [TSENS_SW_RST] = REG_FIELD(SROT_CTRL_OFF, 1, 1), 336 [TSENS_SW_RST] = REG_FIELD(SROT_CTRL_OFF, 1, 1),
337 [SENSOR_EN] = REG_FIELD(SROT_CTRL_OFF, 3, 13),
338 337
339 /* ----- TM ------ */ 338 /* ----- TM ------ */
340 /* INTERRUPT ENABLE */ 339 /* INTERRUPT ENABLE */
diff --git a/drivers/thermal/qcom/tsens-v2.c b/drivers/thermal/qcom/tsens-v2.c
index 1099069f2aa3..0a4f2b8fcab6 100644
--- a/drivers/thermal/qcom/tsens-v2.c
+++ b/drivers/thermal/qcom/tsens-v2.c
@@ -44,7 +44,6 @@ static const struct reg_field tsens_v2_regfields[MAX_REGFIELDS] = {
44 /* CTRL_OFF */ 44 /* CTRL_OFF */
45 [TSENS_EN] = REG_FIELD(SROT_CTRL_OFF, 0, 0), 45 [TSENS_EN] = REG_FIELD(SROT_CTRL_OFF, 0, 0),
46 [TSENS_SW_RST] = REG_FIELD(SROT_CTRL_OFF, 1, 1), 46 [TSENS_SW_RST] = REG_FIELD(SROT_CTRL_OFF, 1, 1),
47 [SENSOR_EN] = REG_FIELD(SROT_CTRL_OFF, 3, 18),
48 47
49 /* ----- TM ------ */ 48 /* ----- TM ------ */
50 /* INTERRUPT ENABLE */ 49 /* INTERRUPT ENABLE */
diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
index 36b0b52db524..0627d8615c30 100644
--- a/drivers/thermal/qcom/tsens.c
+++ b/drivers/thermal/qcom/tsens.c
@@ -85,11 +85,6 @@ static int tsens_register(struct tsens_priv *priv)
85 struct thermal_zone_device *tzd; 85 struct thermal_zone_device *tzd;
86 86
87 for (i = 0; i < priv->num_sensors; i++) { 87 for (i = 0; i < priv->num_sensors; i++) {
88 if (!is_sensor_enabled(priv, priv->sensor[i].hw_id)) {
89 dev_err(priv->dev, "sensor %d: disabled\n",
90 priv->sensor[i].hw_id);
91 continue;
92 }
93 priv->sensor[i].priv = priv; 88 priv->sensor[i].priv = priv;
94 priv->sensor[i].id = i; 89 priv->sensor[i].id = i;
95 tzd = devm_thermal_zone_of_sensor_register(priv->dev, i, 90 tzd = devm_thermal_zone_of_sensor_register(priv->dev, i,
diff --git a/drivers/thermal/qcom/tsens.h b/drivers/thermal/qcom/tsens.h
index eefe3844fb4e..2fd94997245b 100644
--- a/drivers/thermal/qcom/tsens.h
+++ b/drivers/thermal/qcom/tsens.h
@@ -315,7 +315,6 @@ void compute_intercept_slope(struct tsens_priv *priv, u32 *pt1, u32 *pt2, u32 mo
315int init_common(struct tsens_priv *priv); 315int init_common(struct tsens_priv *priv);
316int get_temp_tsens_valid(struct tsens_priv *priv, int i, int *temp); 316int get_temp_tsens_valid(struct tsens_priv *priv, int i, int *temp);
317int get_temp_common(struct tsens_priv *priv, int i, int *temp); 317int get_temp_common(struct tsens_priv *priv, int i, int *temp);
318bool is_sensor_enabled(struct tsens_priv *priv, u32 hw_id);
319 318
320/* TSENS target */ 319/* TSENS target */
321extern const struct tsens_plat_data data_8960; 320extern const struct tsens_plat_data data_8960;