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

Commit 641d4412 authored by Ram Chandrasekar's avatar Ram Chandrasekar
Browse files

regulator: rpmh-regulator: initiate child device probe



There can be child devices for a rpmh-regulator resource, which
have to be probed after the rpmh-regulator resource probes
successfully. Call of_platform_populate to initiate the probing
of child devices.

Change-Id: If45613e2e15a2179a62c1eb94a915407d80aff6d
Signed-off-by: default avatarRam Chandrasekar <rkumbako@codeaurora.org>
parent cfab3842
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1187,6 +1187,9 @@ static int rpmh_regulator_allocate_vreg(struct rpmh_aggr_vreg *aggr_vreg)
	aggr_vreg->vreg_count = 0;

	for_each_available_child_of_node(aggr_vreg->dev->of_node, node) {
		/* Skip child nodes handled by other drivers. */
		if (of_find_property(node, "compatible", NULL))
			continue;
		aggr_vreg->vreg_count++;
	}

@@ -1202,6 +1205,10 @@ static int rpmh_regulator_allocate_vreg(struct rpmh_aggr_vreg *aggr_vreg)

	i = 0;
	for_each_available_child_of_node(aggr_vreg->dev->of_node, node) {
		/* Skip child nodes handled by other drivers. */
		if (of_find_property(node, "compatible", NULL))
			continue;

		aggr_vreg->vreg[i].of_node = node;
		aggr_vreg->vreg[i].aggr_vreg = aggr_vreg;

@@ -1623,6 +1630,7 @@ static int rpmh_regulator_probe(struct platform_device *pdev)
		mutex_unlock(&aggr_vreg->lock);
	}

	of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev);
	platform_set_drvdata(pdev, aggr_vreg);

	aggr_vreg_debug(aggr_vreg, "successfully probed; addr=0x%05X, type=%s\n",