thermal: qcom: tsens-8996: Add support for 8996 family of SoCs

The TSENS controller in 8996 family of SoCs is capable of converting the
ADC code outputs to real temperature values (in decidegree Celsius).
It can also be programmed to provide raw ADC code, but the secure software
on 8996 programs it to provide real temperatures and also does the needed
calibrations.

We check the valid bit to ensure valid data is read by the AHB master.
And the spec recommends the below algorithm to read data 3 consecutive
times, which takes care of the worst case delay taken to propagate the
updated data to the register.

Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
This commit is contained in:
Rajendra Nayak
2016-05-05 14:21:44 +05:30
committed by Zhang Rui
parent 20d4fd84bf
commit d059c739aa
4 changed files with 89 additions and 2 deletions

View File

@@ -69,6 +69,9 @@ static const struct of_device_id tsens_table[] = {
}, {
.compatible = "qcom,msm8974-tsens",
.data = &data_8974,
}, {
.compatible = "qcom,msm8996-tsens",
.data = &data_8996,
},
{}
};