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

Commit cd65e010 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "thermal: tsens: Add optional property to check valid bit"

parents 6f392719 a639259d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -68,6 +68,9 @@ Optional properties:
		each controller is done using the qcom,sensor-id property. If the
		property is not present the SW ID mapping with default from 0 to
		total number of supported sensors with each controller instance.
- qcom,valid-status-check: If property is present, check the VALID bit is set
		before reporting the temperature data.

Example:

tsens@fc4a8000 {
+6 −4
Original line number Diff line number Diff line
@@ -5262,14 +5262,16 @@ static int get_device_tree_data(struct platform_device *pdev,
	else
		tmdev->tsens_type = TSENS_TYPE0;

	tmdev->tsens_valid_status_check = of_property_read_bool(of_node,
				"qcom,valid-status-check");
	if (!tmdev->tsens_valid_status_check) {
		if (!strcmp(id->compatible, "qcom,msm8994-tsens") ||
		(!strcmp(id->compatible, "qcom,msmzirc-tsens")) ||
		(!strcmp(id->compatible, "qcom,msm8992-tsens")) ||
		(!strcmp(id->compatible, "qcom,msm8996-tsens")) ||
		(!strcmp(id->compatible, "qcom,msmtitanium-tsens")))
			tmdev->tsens_valid_status_check = true;
	else
		tmdev->tsens_valid_status_check = false;
	}

	tmdev->tsens_irq = platform_get_irq_byname(pdev,
					"tsens-upper-lower");