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

Commit 162e59ac authored by Manaf Meethalavalappu Pallikunhi's avatar Manaf Meethalavalappu Pallikunhi
Browse files

drivers: lmh_dcvs: Add support to selectively register cooling devices



CPU cooling device register and handling max and min limit
functionalities are moved to cpu clock driver and cpu vdd min voltage
cooling device driver respectively. Add support to selectively
register cooling devices for LMH DCVSh driver so that other LMH DCVSh
features can be enabled without cooling device register.

Change-Id: I9e346c2410ff34c5b1dc9d0fdc19970a403007cc
Signed-off-by: default avatarManaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
parent 1fbb233d
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -529,6 +529,7 @@ static int limits_dcvs_probe(struct platform_device *pdev)
	int cpu, idx = 0;
	cpumask_t mask = { CPU_BITS_NONE };
	const __be32 *addr;
	bool no_cdev_register = false;

	for_each_possible_cpu(cpu) {
		cpu_node = of_cpu_device_node_get(cpu);
@@ -590,6 +591,9 @@ static int limits_dcvs_probe(struct platform_device *pdev)
		return -EINVAL;
	}

	no_cdev_register = of_property_read_bool(dn,
				"qcom,no-cooling-device-register");

	addr = of_get_address(dn, 0, NULL, NULL);
	if (!addr) {
		pr_err("Property llm-base-addr not found\n");
@@ -675,11 +679,14 @@ static int limits_dcvs_probe(struct platform_device *pdev)
	mutex_unlock(&lmh_dcvs_list_access);
	lmh_debug_register(pdev);

	ret = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "lmh-dcvs/cdev:online",
	if (!no_cdev_register) {
		ret = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN,
					"lmh-dcvs/cdev:online",
					limits_cpu_online, NULL);
		if (ret < 0)
			goto unregister_sensor;
		ret = 0;
	}

	return ret;