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

Commit e20fe99a authored by Sujeev Dias's avatar Sujeev Dias Committed by Gerrit - the friendly Code Review server
Browse files

mhi: core: put mhi channel, events, and device into a child node



Fix devicetree warning "duplicate unit-address" between MHI channel
nodes, MHI event nodes, and MHI device node by moving each group into
child nodes.

CRs-Fixed: 2313588
Change-Id: I9824025f37f65c34103365ef96e7c23367f5a16e
Signed-off-by: default avatarSujeev Dias <sdias@codeaurora.org>
parent 712e7c39
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -773,6 +773,10 @@ static int of_parse_ev_cfg(struct mhi_controller *mhi_cntrl,
	struct mhi_event *mhi_event;
	struct device_node *child;

	of_node = of_find_node_by_name(of_node, "mhi_events");
	if (!of_node)
		return -EINVAL;

	for_each_available_child_of_node(of_node, child) {
		if (!strcmp(child->name, "mhi_event"))
			num++;
@@ -888,6 +892,10 @@ static int of_parse_ch_cfg(struct mhi_controller *mhi_cntrl,
	if (ret)
		return ret;

	of_node = of_find_node_by_name(of_node, "mhi_channels");
	if (!of_node)
		return -EINVAL;

	mhi_cntrl->mhi_chan = kcalloc(mhi_cntrl->max_chan,
				      sizeof(*mhi_cntrl->mhi_chan), GFP_KERNEL);
	if (!mhi_cntrl->mhi_chan)
+4 −1
Original line number Diff line number Diff line
@@ -583,7 +583,10 @@ static void mhi_assign_of_node(struct mhi_controller *mhi_cntrl,
	const char *dt_name;
	int ret;

	controller = mhi_cntrl->of_node;
	controller = of_find_node_by_name(mhi_cntrl->of_node, "mhi_devices");
	if (!controller)
		return;

	for_each_available_child_of_node(controller, node) {
		ret = of_property_read_string(node, "mhi,chan", &dt_name);
		if (ret)