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

Commit 51a38bdc authored by Shiju Mathew's avatar Shiju Mathew Committed by Matt Wagantall
Browse files

msm: thermal: Add kernel boot command to disable KTM



Add support in KTM to parse early kernel boot command,
qcomthermal=disable, to disable KTM.

Change-Id: I268e652239573ff368f8ccbfdff354eb6c24a90a
Signed-off-by: default avatarShiju Mathew <shijum@codeaurora.org>
parent d6442cd2
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -6423,6 +6423,9 @@ static int msm_thermal_dev_probe(struct platform_device *pdev)
	struct device_node *node = pdev->dev.of_node;
	struct msm_thermal_data data;

	if (!mitigation)
		return ret;

	memset(&data, 0, sizeof(struct msm_thermal_data));
	data.pdev = pdev;

@@ -6591,6 +6594,18 @@ static int msm_thermal_dev_exit(struct platform_device *inp_dev)
	return 0;
}

static int __init ktm_params(char *str)
{
	if (str != NULL && !strcmp(str, "disable")) {
		pr_info("KTM Disabled at Boot\n");
		mitigation = 0;
	}

	return 0;
}

early_param("qcomthermal", ktm_params);

static struct of_device_id msm_thermal_match_table[] = {
	{.compatible = "qcom,msm-thermal"},
	{},