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

Commit bdab10c6 authored by Ram Chandrasekar's avatar Ram Chandrasekar
Browse files

drivers: msm_lmh_dcvs: Change devicetree optional properties



LMH DCVSh driver always expects the properties like interrupts, affinity
and reg as mandatory devicetree properties. The driver in certain
targets will have to just be probed with just isens regulator devicetree
properties with the others. In order to handle that make all the
properties as optional.

Change-Id: I5cacf7cce4b184d6926ae74d6097c9f956dd6595
Signed-off-by: default avatarRam Chandrasekar <rkumbako@codeaurora.org>
parent 4cb3f76d
Loading
Loading
Loading
Loading
+12 −6
Original line number Diff line number Diff line
@@ -543,16 +543,22 @@ static int limits_dcvs_probe(struct platform_device *pdev)
		of_node_put(lmh_node);
	}

	hw = devm_kzalloc(&pdev->dev, sizeof(*hw), GFP_KERNEL);
	if (!hw)
		return -ENOMEM;
	/*
	 * We return error if none of the CPUs have
	 * We just init regulator if none of the CPUs have
	 * reference to our LMH node
	 */
	if (cpumask_empty(&mask))
		return -EINVAL;
	if (cpumask_empty(&mask)) {
		limits_isens_vref_ldo_init(pdev, hw);
		mutex_lock(&lmh_dcvs_list_access);
		INIT_LIST_HEAD(&hw->list);
		list_add_tail(&hw->list, &lmh_dcvs_hw_list);
		mutex_unlock(&lmh_dcvs_list_access);
		return 0;
	}

	hw = devm_kzalloc(&pdev->dev, sizeof(*hw), GFP_KERNEL);
	if (!hw)
		return -ENOMEM;
	hw->cdev_data = devm_kcalloc(&pdev->dev, cpumask_weight(&mask),
				   sizeof(*hw->cdev_data),
				   GFP_KERNEL);