From cb0d99c23fca705b068c0f80fab1e1f7a870884b Mon Sep 17 00:00:00 2001 From: Sriharsha Allenki Date: Fri, 23 Sep 2016 14:52:41 +0530 Subject: [PATCH] thermal: tsens: Enable TSENS for msmtriton Temperature sensor (TSENS) driver provides ability to thermal clients to read from on-die temperature sensors. msmtriton supports reading from 12 on-die temperature sensors and clients can set temperature thresholds and receive notification. Change-Id: Ia296ff112456f8959a2c769ab1e7afbccec23ba1 Signed-off-by: Sriharsha Allenki --- 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 684bea131405..7189edbf8c5c 100644 --- a/Documentation/devicetree/bindings/thermal/tsens.txt +++ b/Documentation/devicetree/bindings/thermal/tsens.txt @@ -32,6 +32,7 @@ Required properties: 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. + should be "qcom,msmtriton-tsens" for triton 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 with associated property in reg-names diff --git a/drivers/thermal/msm-tsens.c b/drivers/thermal/msm-tsens.c index 97ab02dfc753..aad3363c489f 100644 --- a/drivers/thermal/msm-tsens.c +++ b/drivers/thermal/msm-tsens.c @@ -933,6 +933,9 @@ static struct of_device_id tsens_match[] = { { .compatible = "qcom,msmfalcon-tsens", .data = (void *)TSENS_CALIB_FUSE_MAP_NONE, }, + { .compatible = "qcom,msmtriton-tsens", + .data = (void *)TSENS_CALIB_FUSE_MAP_NONE, + }, {} }; @@ -5435,7 +5438,8 @@ static int get_device_tree_data(struct platform_device *pdev, tmdev->tsens_type = TSENS_TYPE3; else if (!strcmp(id->compatible, "qcom,msmtitanium-tsens") || (!strcmp(id->compatible, "qcom,msmfalcon-tsens") || - (!strcmp(id->compatible, "qcom,msmhamster-tsens")))) { + (!strcmp(id->compatible, "qcom,msmtriton-tsens") || + (!strcmp(id->compatible, "qcom,msmhamster-tsens"))))) { tmdev->tsens_type = TSENS_TYPE3; tsens_poll_check = 0; } else if (!strcmp(id->compatible, "qcom,msm8952-tsens") || @@ -5457,7 +5461,8 @@ static int get_device_tree_data(struct platform_device *pdev, (!strcmp(id->compatible, "qcom,msmtitanium-tsens")) || (!strcmp(id->compatible, "qcom,msmcobalt-tsens")) || (!strcmp(id->compatible, "qcom,msmfalcon-tsens") || - (!strcmp(id->compatible, "qcom,msmhamster-tsens")))) + (!strcmp(id->compatible, "qcom,msmtriton-tsens") || + (!strcmp(id->compatible, "qcom,msmhamster-tsens"))))) tmdev->tsens_valid_status_check = true; } @@ -5473,7 +5478,8 @@ static int get_device_tree_data(struct platform_device *pdev, (!strcmp(id->compatible, "qcom,msmcobalt-tsens")) || (!strcmp(id->compatible, "qcom,msmhamster-tsens")) || (!strcmp(id->compatible, "qcom,msmfalcon-tsens") || - (!strcmp(id->compatible, "qcom,msmtitanium-tsens")))) { + (!strcmp(id->compatible, "qcom,msmtriton-tsens") || + (!strcmp(id->compatible, "qcom,msmtitanium-tsens"))))) { tmdev->tsens_critical_irq = platform_get_irq_byname(pdev, "tsens-critical"); -- 2.11.0