thermal: tsens: Enable TSENS for msmfalcon

Temperature sensor (TSENS) driver provides ability to
thermal clients to read from on-die temperature sensors.
msmfalcon supports reading from 14 on-die temperature
sensors and clients can set temperature thresholds and
receive notification.

Change-Id: I9421af7d1b2b83abb81af38fab5f7c6e9285a29d
Signed-off-by: Rama Krishna Phani A <rphani@codeaurora.org>
This commit is contained in:
Rama Krishna Phani A 2016-07-11 20:11:22 +05:30
parent 1f1574bb18
commit 3afd0a224e
2 changed files with 10 additions and 3 deletions

View file

@ -31,6 +31,7 @@ Required properties:
should be "qcom,msmgold-tsens" for gold TSENS driver.
should be "qcom,msmcobalt-tsens" for cobalt TSENS driver.
should be "qcom,msmhamster-tsens" for hamster TSENS driver.
should be "qcom,msmfalcon-tsens" for falcon TSENS driver.
The compatible property is used to identify the respective fusemap to use
for the corresponding SoC.
- reg : offset and length of the TSENS registers.

View file

@ -929,6 +929,9 @@ static struct of_device_id tsens_match[] = {
{ .compatible = "qcom,msmhamster-tsens",
.data = (void *)TSENS_CALIB_FUSE_MAP_NONE,
},
{ .compatible = "qcom,msmfalcon-tsens",
.data = (void *)TSENS_CALIB_FUSE_MAP_NONE,
},
{}
};
@ -5421,7 +5424,8 @@ static int get_device_tree_data(struct platform_device *pdev,
(!strcmp(id->compatible, "qcom,msmcobalt-tsens")))
tmdev->tsens_type = TSENS_TYPE3;
else if (!strcmp(id->compatible, "qcom,msmtitanium-tsens") ||
(!strcmp(id->compatible, "qcom,msmhamster-tsens"))) {
(!strcmp(id->compatible, "qcom,msmfalcon-tsens") ||
(!strcmp(id->compatible, "qcom,msmhamster-tsens")))) {
tmdev->tsens_type = TSENS_TYPE3;
tsens_poll_check = 0;
} else if (!strcmp(id->compatible, "qcom,msm8952-tsens") ||
@ -5442,7 +5446,8 @@ static int get_device_tree_data(struct platform_device *pdev,
(!strcmp(id->compatible, "qcom,msm8937-tsens")) ||
(!strcmp(id->compatible, "qcom,msmtitanium-tsens")) ||
(!strcmp(id->compatible, "qcom,msmcobalt-tsens")) ||
(!strcmp(id->compatible, "qcom,msmhamster-tsens")))
(!strcmp(id->compatible, "qcom,msmfalcon-tsens") ||
(!strcmp(id->compatible, "qcom,msmhamster-tsens"))))
tmdev->tsens_valid_status_check = true;
}
@ -5457,7 +5462,8 @@ static int get_device_tree_data(struct platform_device *pdev,
if (!strcmp(id->compatible, "qcom,msm8996-tsens") ||
(!strcmp(id->compatible, "qcom,msmcobalt-tsens")) ||
(!strcmp(id->compatible, "qcom,msmhamster-tsens")) ||
(!strcmp(id->compatible, "qcom,msmtitanium-tsens"))) {
(!strcmp(id->compatible, "qcom,msmfalcon-tsens") ||
(!strcmp(id->compatible, "qcom,msmtitanium-tsens")))) {
tmdev->tsens_critical_irq =
platform_get_irq_byname(pdev,
"tsens-critical");