From 3afd0a224e3ac55d90c491e46ac3d86d04ca8562 Mon Sep 17 00:00:00 2001 From: Rama Krishna Phani A Date: Mon, 11 Jul 2016 20:11:22 +0530 Subject: [PATCH] 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 --- Documentation/devicetree/bindings/thermal/tsens.txt | 1 + drivers/thermal/msm-tsens.c | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/thermal/tsens.txt b/Documentation/devicetree/bindings/thermal/tsens.txt index c945be370d1a..9aa52dde2dd4 100644 --- a/Documentation/devicetree/bindings/thermal/tsens.txt +++ b/Documentation/devicetree/bindings/thermal/tsens.txt @@ -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. diff --git a/drivers/thermal/msm-tsens.c b/drivers/thermal/msm-tsens.c index 56daf237be45..9e2ba25ce1ac 100644 --- a/drivers/thermal/msm-tsens.c +++ b/drivers/thermal/msm-tsens.c @@ -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");