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

Commit 52bd9263 authored by Manaf Meethalavalappu Pallikunhi's avatar Manaf Meethalavalappu Pallikunhi
Browse files

drivers: thermal: Add shared interrupt handler support to LMH DCVS



Add support for shared interrupt handler to LMH DCVS. It helps to
notify scheduler properly for target which has common LMH hardware
and different clock domains.

Ignore thermal zone register error in case if thermal zone is not
defined for the shared LMH DCVS instance.

Change-Id: I2f0aa3da4e5a1d032602dd7c1e595830c7883c4e
Signed-off-by: default avatarManaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
parent db9db735
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -645,8 +645,14 @@ static int limits_dcvs_probe(struct platform_device *pdev)
			affinity);
	tzdev = thermal_zone_of_sensor_register(&pdev->dev, 0, hw,
			&limits_sensor_ops);
	if (IS_ERR_OR_NULL(tzdev))
	if (IS_ERR_OR_NULL(tzdev)) {
		/*
		 * Ignore error in case if thermal zone devicetree node is not
		 * defined for this lmh hardware.
		 */
		if (!tzdev || PTR_ERR(tzdev) != -ENODEV)
			return PTR_ERR(tzdev);
	}

	hw->min_freq_reg = devm_ioremap(&pdev->dev, min_reg, 0x4);
	if (!hw->min_freq_reg) {
@@ -677,7 +683,7 @@ static int limits_dcvs_probe(struct platform_device *pdev)
	hw->is_irq_enabled = true;
	ret = devm_request_threaded_irq(&pdev->dev, hw->irq_num, NULL,
		lmh_dcvs_handle_isr, IRQF_TRIGGER_HIGH | IRQF_ONESHOT
		| IRQF_NO_SUSPEND, hw->sensor_name, hw);
		| IRQF_NO_SUSPEND | IRQF_SHARED, hw->sensor_name, hw);
	if (ret) {
		pr_err("Error registering for irq. err:%d\n", ret);
		ret = 0;