aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/fwnode.h
diff options
context:
space:
mode:
authorSaravana Kannan <saravanak@google.com>2023-02-06 17:41:58 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-02-08 13:37:54 +0100
commit6a6dfdf8b3ff337be5a447e9f4e71969f18370ad (patch)
tree3199b529d31da40184d873b74839652d984f333e /include/linux/fwnode.h
parentdriver core: fw_devlink: Add DL_FLAG_CYCLE support to device links (diff)
downloadwireguard-linux-6a6dfdf8b3ff337be5a447e9f4e71969f18370ad.tar.xz
wireguard-linux-6a6dfdf8b3ff337be5a447e9f4e71969f18370ad.zip
driver core: fw_devlink: Allow marking a fwnode link as being part of a cycle
To improve detection and handling of dependency cycles, we need to be able to mark fwnode links as being part of cycles. fwnode links marked as being part of a cycle should not block their consumers from probing. Fixes: 2de9d8e0d2fe ("driver core: fw_devlink: Improve handling of cyclic dependencies") Signed-off-by: Saravana Kannan <saravanak@google.com> Tested-by: Colin Foster <colin.foster@in-advantage.com> Tested-by: Sudeep Holla <sudeep.holla@arm.com> Tested-by: Douglas Anderson <dianders@chromium.org> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Tested-by: Luca Weiss <luca.weiss@fairphone.com> # qcom/sm7225-fairphone-fp4 Link: https://lore.kernel.org/r/20230207014207.1678715-7-saravanak@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/fwnode.h')
-rw-r--r--include/linux/fwnode.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/fwnode.h b/include/linux/fwnode.h
index 89b9bdfca925..fdf2ee0285b7 100644
--- a/include/linux/fwnode.h
+++ b/include/linux/fwnode.h
@@ -18,7 +18,7 @@ struct fwnode_operations;
struct device;
/*
- * fwnode link flags
+ * fwnode flags
*
* LINKS_ADDED: The fwnode has already be parsed to add fwnode links.
* NOT_DEVICE: The fwnode will never be populated as a struct device.
@@ -36,6 +36,7 @@ struct device;
#define FWNODE_FLAG_INITIALIZED BIT(2)
#define FWNODE_FLAG_NEEDS_CHILD_BOUND_ON_ADD BIT(3)
#define FWNODE_FLAG_BEST_EFFORT BIT(4)
+#define FWNODE_FLAG_VISITED BIT(5)
struct fwnode_handle {
struct fwnode_handle *secondary;
@@ -46,11 +47,19 @@ struct fwnode_handle {
u8 flags;
};
+/*
+ * fwnode link flags
+ *
+ * CYCLE: The fwnode link is part of a cycle. Don't defer probe.
+ */
+#define FWLINK_FLAG_CYCLE BIT(0)
+
struct fwnode_link {
struct fwnode_handle *supplier;
struct list_head s_hook;
struct fwnode_handle *consumer;
struct list_head c_hook;
+ u8 flags;
};
/**