Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3afd0a22 authored by Rama Krishna Phani A's avatar Rama Krishna Phani A
Browse files

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: default avatarRama Krishna Phani A <rphani@codeaurora.org>
parent 1f1574bb
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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.
+9 −3
Original line number Diff line number Diff line
@@ -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");