summaryrefslogtreecommitdiffstats
path: root/drivers/thermal/qcom/tsens-common.c
diff options
context:
space:
mode:
authorEduardo Valentin <edubezval@gmail.com>2019-05-28 18:04:17 -0700
committerEduardo Valentin <edubezval@gmail.com>2019-05-28 19:30:33 -0700
commitca657468a0d4bcc25445f6636485a19a525267bd (patch)
tree6c233d9f148f1692f3daec27ca5451bacb359116 /drivers/thermal/qcom/tsens-common.c
parentcd6c84d8f0cdc911df435bb075ba22ce3c605b07 (diff)
downloadlinux-stable-ca657468a0d4bcc25445f6636485a19a525267bd.tar.gz
linux-stable-ca657468a0d4bcc25445f6636485a19a525267bd.tar.bz2
linux-stable-ca657468a0d4bcc25445f6636485a19a525267bd.zip
Revert "drivers: thermal: tsens: Add new operation to check if a sensor is enabled"
This reverts commit 3e6a8fb3308419129c7a52de6eb42feef5a919a0. Cc: Andy Gross <agross@kernel.org> Cc: David Brown <david.brown@linaro.org> Cc: Amit Kucheria <amit.kucheria@linaro.org> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Suggested-by: Amit Kucheria <amit.kucheria@linaro.org> Reported-by: Andy Gross <andygro@gmail.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'drivers/thermal/qcom/tsens-common.c')
-rw-r--r--drivers/thermal/qcom/tsens-common.c14
1 files changed, 0 insertions, 14 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,
}
}
-bool is_sensor_enabled(struct tsens_priv *priv, u32 hw_id)
-{
- u32 val;
- int ret;
-
- if ((hw_id > (priv->num_sensors - 1)) || (hw_id < 0))
- return -EINVAL;
- ret = regmap_field_read(priv->rf[SENSOR_EN], &val);
- if (ret)
- return ret;
-
- return val & (1 << hw_id);
-}
-
static inline int code_to_degc(u32 adc_code, const struct tsens_sensor *s)
{
int degc, num, den;