Hi Heikki, > From: Heikki Krogerus, Sent: Tuesday, April 24, 2018 9:34 PM > > Hi Yoshihiro, > > On Wed, Apr 18, 2018 at 05:09:58PM +0900, Yoshihiro Shimoda wrote: <snip> > > + devcon->endpoint[0] = dev_name(&pdev->dev); > > + devcon->endpoint[1] = dev_name(&remote_pdev->dev); > > + > > + /* TODO: How to remove the connection? */ > > + device_connection_add(devcon); > > This is wrong. You are converting a connection that is described in > graph into a "build-in" one. If the connection is already described in > graph there is no need to, actually, we _should not_, add it to the > list of "build-in" connection descriptions. > > What should be done is that we parse the graph the moment > device_connection_find*() is called. And that should be done in > drivers/base/devcon.c . Thank you for the comments! I completely misunderstood which framework I should improve. I'll try to improve the devcon. However, I'll have a vacation in next week. So, I think I can submit next version in early May. Best regards, Yoshihiro Shimoda > > + } > > + > > + return 0; > > +} > > + > > /** > > * of_platform_bus_create() - Create a device for a node and its children. > > * @bus: device node of the bus to instantiate > > @@ -477,6 +535,14 @@ int of_platform_populate(struct device_node *root, > > } > > of_node_set_flag(root, OF_POPULATED_BUS); > > > > + for_each_child_of_node(root, child) { > > + rc = of_parse_device_connection(child); > > + if (rc) { > > + of_node_put(child); > > + break; > > + } > > + } > > + > > of_node_put(root); > > return rc; > > } > > diff --git a/include/linux/of.h b/include/linux/of.h > > index 4d25e4f..30aa103 100644 > > --- a/include/linux/of.h > > +++ b/include/linux/of.h > > @@ -143,6 +143,7 @@ static inline void of_node_put(struct device_node *node) { } > > #define OF_DETACHED 2 /* node has been detached from the device tree */ > > #define OF_POPULATED 3 /* device already created for the node */ > > #define OF_POPULATED_BUS 4 /* of_platform_populate recursed to children of this node */ > > +#define OF_DEVICE_CONNECTED 5 /* checked devcon on of_platform_populate */ > > > > #define OF_BAD_ADDR ((u64)-1) > > > Thanks, > > -- > heikki -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html