Lines Matching defs:con
50 * @con: Consumer end of the link.
53 * Create a fwnode link between fwnode handles @con and @sup. The fwnode link
55 * resource to @con.
58 * two device objects corresponding to @con and @sup when they are created. The
59 * driver core will automatically delete the fwnode link between @con and @sup
65 static int __fwnode_link_add(struct fwnode_handle *con,
71 if (link->consumer == con) {
82 link->consumer = con;
87 list_add(&link->c_hook, &con->suppliers);
89 con, sup);
94 int fwnode_link_add(struct fwnode_handle *con, struct fwnode_handle *sup)
99 ret = __fwnode_link_add(con, sup, 0);
552 struct device *con = link->consumer;
556 strlen(dev_bus_name(con)) + strlen(dev_name(con)));
567 ret = sysfs_create_link(&link->link_dev.kobj, &con->kobj, "consumer");
571 snprintf(buf, len, "consumer:%s:%s", dev_bus_name(con), dev_name(con));
577 ret = sysfs_create_link(&con->kobj, &link->link_dev.kobj, buf);
584 snprintf(buf, len, "consumer:%s:%s", dev_bus_name(con), dev_name(con));
600 struct device *con = link->consumer;
607 strlen(dev_bus_name(con)) + strlen(dev_name(con)));
616 if (device_is_registered(con)) {
618 sysfs_remove_link(&con->kobj, buf);
620 snprintf(buf, len, "consumer:%s:%s", dev_bus_name(con), dev_name(con));
1905 * @con: Potential consumer device.
1911 * depend on @con. This function can detect multiple cyles between @sup_handle
1912 * and @con. When such dependency cycles are found, convert all device links
1923 static bool __fw_devlink_relax_cycles(struct device *con,
1935 * We aren't trying to find all cycles. Just a cycle between con and
1946 if (sup_dev == con) {
1952 * If sup_dev is bound to a driver and @con hasn't started binding to a
1953 * driver, sup_dev can't be a consumer of @con. So, no need to check
1957 con->links.status == DL_DEV_NO_DRIVER) {
1963 if (__fw_devlink_relax_cycles(con, link->supplier)) {
1978 if (par_dev && __fw_devlink_relax_cycles(con, par_dev->fwnode))
1993 if (__fw_devlink_relax_cycles(con,
2010 * @con: consumer device for the device link
2015 * @con and the supplier device represented by @sup_handle.
2028 static int fw_devlink_create_devlink(struct device *con,
2036 if (con->fwnode == link->consumer)
2057 fwnode_is_ancestor_of(sup_handle, con->fwnode))
2071 if (__fw_devlink_relax_cycles(con, sup_handle)) {
2074 dev_info(con, "Fixed dependency cycle(s) with %pfwf\n",
2093 dev_dbg(con,
2100 if (con != sup_dev && !device_link_add(con, sup_dev, flags)) {
2101 dev_err(con, "Failed to create device link (0x%x) with %s\n",
2115 dev_dbg(con, "Not linking %pfwf - might never become dev\n",