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

Commit 18f836e9 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 support to parse critical interrupt properties"

parents 11418bd5 e9a8a791
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -82,10 +82,13 @@ Optional properties:
		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.
- qcom,temp1-offset: If property is present, Use these offset values
- qcom,temp1-offset: If flag is present, Use these offset values
		to be added for 30 deg calib points.
- qcom,temp2-offset: If property is present, Use these offset values
- qcom,temp2-offset: If flag is present, Use these offset values
		to be added for 120 deg calib points.
- qcom,cycle-monitor: If flag is present, Use the value for cycle
		completion monitoring.
- qcom,wd-bark: If flag is present, Use the value for watchdog bark.

Example:

+27 −0
Original line number Diff line number Diff line
@@ -832,8 +832,12 @@ struct tsens_tm_device {
	bool				calibration_less_mode;
	bool				tsens_local_init;
	bool				gain_offset_programmed;
	bool				cycle_compltn_monitor;
	bool				wd_bark;
	int				tsens_factor;
	uint32_t			tsens_num_sensor;
	uint32_t			cycle_compltn_monitor_val;
	uint32_t			wd_bark_val;
	int				tsens_irq;
	int				tsens_critical_irq;
	void				*tsens_addr;
@@ -5331,6 +5335,7 @@ static int get_device_tree_data(struct platform_device *pdev,
	u32 *tsens_slope_data, *sensor_id, *client_id;
	u32 *temp1_calib_offset_factor, *temp2_calib_offset_factor;
	u32 rc = 0, i, tsens_num_sensors = 0;
	u32 cycle_monitor = 0, wd_bark = 0;
	const struct of_device_id *id;

	rc = of_property_read_u32(of_node,
@@ -5428,6 +5433,28 @@ static int get_device_tree_data(struct platform_device *pdev,
		}
	}

	rc = of_property_read_u32(of_node,
			"qcom,cycle-monitor", &cycle_monitor);
	if (rc) {
		pr_debug("Default cycle completion monitor\n");
		tmdev->cycle_compltn_monitor = false;
	} else {
		pr_debug("Use specified cycle completion monitor\n");
		tmdev->cycle_compltn_monitor = true;
		tmdev->cycle_compltn_monitor_val = cycle_monitor;
	}

	rc = of_property_read_u32(of_node,
			"qcom,wd-bark", &wd_bark);
	if (rc) {
		pr_debug("Default Watchdog bark\n");
		tmdev->wd_bark = false;
	} else {
		pr_debug("Use specified Watchdog bark\n");
		tmdev->wd_bark = true;
		tmdev->wd_bark_val = wd_bark;
	}

	if (!strcmp(id->compatible, "qcom,mdm9630-tsens") ||
		(!strcmp(id->compatible, "qcom,msmzirc-tsens")) ||
		(!strcmp(id->compatible, "qcom,msm8994-tsens")) ||