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

Commit 5483be2f authored by Ram Chandrasekar's avatar Ram Chandrasekar
Browse files

drivers: thermal: virtual-sensor: Add support for gpu skin sensor



Add a new virtual sensor based on gpu and skin sensors. This sensor will
do a weighted average of both the sensors.

Change-Id: I403ab74814090604f54c4f5858bbdfb77930a930
Signed-off-by: default avatarRam Chandrasekar <rkumbako@codeaurora.org>
parent 33f56542
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 */

#include <linux/thermal.h>
@@ -163,6 +163,16 @@ static const struct virtual_sensor_data qti_virtual_sensors[] = {
				"cpuss-2-usr"},
		.logic = VIRT_MAXIMUM,
	},
	{
		.virt_zone_name = "gpu-skin-avg-step",
		.num_sensors = 2,
		.sensor_names = {"skin-msm-therm-usr",
				"gpuss-0-usr"},
		.logic = VIRT_WEIGHTED_AVG,
		.coefficient_ct = 2,
		.coefficients = {30, 70},
		.avg_denominator = 100,
	},
};

int qti_virtual_sensor_register(struct device *dev)