diff options
| author | Siddartha Mohanadoss <smohanad@codeaurora.org> | 2016-06-28 16:40:38 -0700 |
|---|---|---|
| committer | Kyle Yan <kyan@codeaurora.org> | 2016-07-05 15:34:24 -0700 |
| commit | 52e8201e7bb9ddc1f4706f2d267366d0d058a925 (patch) | |
| tree | 490ceebecf5edb5478b91c241c268fceb8fd0582 | |
| parent | b55de1ea89c340fb17b07720fc8c83e7fe7764bb (diff) | |
thermal: tsens: Enable TSENS for msmhamster
Temperature sensor (TSENS) driver provides ability to
thermal clients to read from on-die temperature sensors.
msmhamster supports reading from 20 on-die temperature
sensors and clients can set temperature thresholds and
receive notification.
Change-Id: I57e98f2182d0c44e9c7cffec3528bb926a878fb8
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
| -rw-r--r-- | Documentation/devicetree/bindings/thermal/tsens.txt | 1 | ||||
| -rw-r--r-- | drivers/thermal/msm-tsens.c | 16 |
2 files changed, 13 insertions, 4 deletions
diff --git a/Documentation/devicetree/bindings/thermal/tsens.txt b/Documentation/devicetree/bindings/thermal/tsens.txt index 4f9a02065e44..c945be370d1a 100644 --- a/Documentation/devicetree/bindings/thermal/tsens.txt +++ b/Documentation/devicetree/bindings/thermal/tsens.txt @@ -30,6 +30,7 @@ Required properties: should be "qcom,msm8937-tsens" for 8937 TSENS driver. 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. 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 4b995dcd2d14..def942f16676 100644 --- a/drivers/thermal/msm-tsens.c +++ b/drivers/thermal/msm-tsens.c @@ -926,6 +926,9 @@ static struct of_device_id tsens_match[] = { { .compatible = "qcom,msmcobalt-tsens", .data = (void *)TSENS_CALIB_FUSE_MAP_NONE, }, + { .compatible = "qcom,msmhamster-tsens", + .data = (void *)TSENS_CALIB_FUSE_MAP_NONE, + }, {} }; @@ -970,7 +973,8 @@ static int32_t get_tsens_sensor_for_client_id(struct tsens_tm_device *tmdev, } if (!strcmp(id->compatible, "qcom,msm8996-tsens") || - (!strcmp(id->compatible, "qcom,msmcobalt-tsens"))) { + (!strcmp(id->compatible, "qcom,msmcobalt-tsens")) || + (!strcmp(id->compatible, "qcom,msmhamster-tsens"))) { while (i < tmdev->tsens_num_sensor && !id_found) { if (tmdev->sensor[i].sensor_client_id == sensor_client_id) { @@ -1090,7 +1094,8 @@ int tsens_get_hw_id_mapping(int sensor_sw_id, int *sensor_client_id) } if (!strcmp(id->compatible, "qcom,msm8996-tsens") || - (!strcmp(id->compatible, "qcom,msmcobalt-tsens"))) { + (!strcmp(id->compatible, "qcom,msmcobalt-tsens")) || + (!strcmp(id->compatible, "qcom,msmhamster-tsens"))) { /* Assign a client id which will be used to get the * controller and hw_sensor details */ @@ -5415,7 +5420,8 @@ static int get_device_tree_data(struct platform_device *pdev, else if (!strcmp(id->compatible, "qcom,msm8996-tsens")) tmdev->tsens_type = TSENS_TYPE3; else if (!strcmp(id->compatible, "qcom,msmtitanium-tsens") || - (!strcmp(id->compatible, "qcom,msmcobalt-tsens"))) { + (!strcmp(id->compatible, "qcom,msmcobalt-tsens")) || + (!strcmp(id->compatible, "qcom,msmhamster-tsens"))) { tmdev->tsens_type = TSENS_TYPE3; tsens_poll_check = 0; } else if (!strcmp(id->compatible, "qcom,msm8952-tsens") || @@ -5435,7 +5441,8 @@ static int get_device_tree_data(struct platform_device *pdev, (!strcmp(id->compatible, "qcom,msm8952-tsens")) || (!strcmp(id->compatible, "qcom,msm8937-tsens")) || (!strcmp(id->compatible, "qcom,msmtitanium-tsens")) || - (!strcmp(id->compatible, "qcom,msmcobalt-tsens"))) + (!strcmp(id->compatible, "qcom,msmcobalt-tsens")) || + (!strcmp(id->compatible, "qcom,msmhamster-tsens"))) tmdev->tsens_valid_status_check = true; } @@ -5449,6 +5456,7 @@ 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"))) { tmdev->tsens_critical_irq = platform_get_irq_byname(pdev, |
