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

Commit 4770c1b7 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: Enable debug logging for tsens driver"

parents 368b19a3 6ad66332
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -77,11 +77,10 @@ static int tsens_dbg_log_interrupt_timestamp(struct tsens_device *data,
	pr_debug("%d %d\n", id, dbg_type);
	tmdev = data;
	/* debug */
	idx = tmdev->tsens_dbg.tsens_thread_iq_dbg.idx;
	tmdev->tsens_dbg.tsens_thread_iq_dbg.dbg_count[idx%10]++;
	tmdev->tsens_dbg.tsens_thread_iq_dbg.time_stmp[idx%10] =
	idx = tmdev->tsens_dbg.irq_idx;
	tmdev->tsens_dbg.irq_time_stmp[idx%10] =
							sched_clock();
	tmdev->tsens_dbg.tsens_thread_iq_dbg.idx++;
	tmdev->tsens_dbg.irq_idx++;

	return 0;
}
+2 −3
Original line number Diff line number Diff line
@@ -48,7 +48,6 @@ static inline int tsens2xxx_dbg(struct tsens_device *data, u32 id,
#endif

struct tsens_dbg {
	u32				dbg_count[DEBUG_SIZE];
	u32				idx;
	unsigned long long		time_stmp[DEBUG_SIZE];
	unsigned long			temp[DEBUG_SIZE];
@@ -56,9 +55,10 @@ struct tsens_dbg {

struct tsens_dbg_context {
	struct tsens_device		*tmdev;
	struct tsens_dbg		tsens_thread_iq_dbg;
	struct tsens_dbg		sensor_dbg_info[TSENS_MAX_SENSORS];
	int				tsens_critical_wd_cnt;
	u32				irq_idx;
	unsigned long long		irq_time_stmp[DEBUG_SIZE];
	struct delayed_work		tsens_critical_poll_test;
};

@@ -120,7 +120,6 @@ struct tsens_device {
	struct device			*dev;
	struct platform_device		*pdev;
	struct list_head		list;
	u32				num_sensors;
	struct regmap			*map;
	struct regmap_field		*status_field;
	void __iomem			*tsens_srot_addr;
+4 −3
Original line number Diff line number Diff line
@@ -94,7 +94,7 @@ static int tsens2xxx_get_temp(struct tsens_sensor *sensor, int *temp)

	if (code & TSENS_TM_SN_STATUS_VALID_BIT) {
		msm_tsens_convert_temp(last_temp, temp);
		return 0;
		goto dbg;
	}

	code = readl_relaxed_no_log(sensor_addr +
@@ -103,7 +103,7 @@ static int tsens2xxx_get_temp(struct tsens_sensor *sensor, int *temp)
	if (code & TSENS_TM_SN_STATUS_VALID_BIT) {
		last_temp = last_temp2;
		msm_tsens_convert_temp(last_temp, temp);
		return 0;
		goto dbg;
	}

	code = readl_relaxed_no_log(sensor_addr +
@@ -113,7 +113,7 @@ static int tsens2xxx_get_temp(struct tsens_sensor *sensor, int *temp)
	if (code & TSENS_TM_SN_STATUS_VALID_BIT) {
		last_temp = last_temp3;
		msm_tsens_convert_temp(last_temp, temp);
		return 0;
		goto dbg;
	}

	if (last_temp == last_temp2)
@@ -123,6 +123,7 @@ static int tsens2xxx_get_temp(struct tsens_sensor *sensor, int *temp)

	msm_tsens_convert_temp(last_temp, temp);

dbg:
	if (tmdev->ops->dbg)
		tmdev->ops->dbg(tmdev, (u32) sensor->hw_id,
					TSENS_DBG_LOG_TEMP_READS, temp);