summaryrefslogtreecommitdiffstats
path: root/drivers/thermal/qcom/tsens-v2.c
diff options
context:
space:
mode:
authorAmit Kucheria2019-03-20 14:17:53 +0100
committerEduardo Valentin2019-05-14 15:59:17 +0200
commit3e6a8fb3308419129c7a52de6eb42feef5a919a0 (patch)
treeaa022b085fb0a5de3c5cdf87eae9eaeb3bed8937 /drivers/thermal/qcom/tsens-v2.c
parentdrivers: thermal: tsens: Don't print error message on -EPROBE_DEFER (diff)
downloadkernel-qcow2-linux-3e6a8fb3308419129c7a52de6eb42feef5a919a0.tar.gz
kernel-qcow2-linux-3e6a8fb3308419129c7a52de6eb42feef5a919a0.tar.xz
kernel-qcow2-linux-3e6a8fb3308419129c7a52de6eb42feef5a919a0.zip
drivers: thermal: tsens: Add new operation to check if a sensor is enabled
is_sensor_enabled() checks if the sensors are enabled on this platform. It is possible that the SoC might choose not to enable all the sensors that the IP block is capable of supporting. Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'drivers/thermal/qcom/tsens-v2.c')
-rw-r--r--drivers/thermal/qcom/tsens-v2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/thermal/qcom/tsens-v2.c b/drivers/thermal/qcom/tsens-v2.c
index b58f5af2fea7..788d5886cd1c 100644
--- a/drivers/thermal/qcom/tsens-v2.c
+++ b/drivers/thermal/qcom/tsens-v2.c
@@ -99,6 +99,7 @@ static const struct reg_field tsens_v2_regfields[MAX_REGFIELDS] = {
/* CTRL_OFF */
[TSENS_EN] = REG_FIELD(SROT_CTRL_OFF, 0, 0),
[TSENS_SW_RST] = REG_FIELD(SROT_CTRL_OFF, 1, 1),
+ [SENSOR_EN] = REG_FIELD(SROT_CTRL_OFF, 3, 18),
/* ----- TM ------ */
/* INTERRUPT ENABLE */