Skip to content

Commit

Permalink
clk: Mark fwnodes when their clock provider is added/removed
Browse files Browse the repository at this point in the history
This allows fw_devlink to recognize clock provider drivers that don't
use the device-driver model to initialize the device. fw_devlink will
use this information to make sure consumers of such clock providers
aren't indefinitely blocked from probing, waiting for the power domain
device to appear and bind to a driver.

Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Saravana Kannan <saravanak@google.com>
Link: https://lore.kernel.org/r/20210205222644.2357303-9-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Saravana Kannan authored and Greg Kroah-Hartman committed Feb 9, 2021
1 parent bab2d71 commit 3c9ea42
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/clk/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -4555,6 +4555,8 @@ int of_clk_add_provider(struct device_node *np,
if (ret < 0)
of_clk_del_provider(np);

fwnode_dev_initialized(&np->fwnode, true);

return ret;
}
EXPORT_SYMBOL_GPL(of_clk_add_provider);
Expand Down Expand Up @@ -4672,6 +4674,7 @@ void of_clk_del_provider(struct device_node *np)
list_for_each_entry(cp, &of_clk_providers, link) {
if (cp->node == np) {
list_del(&cp->link);
fwnode_dev_initialized(&np->fwnode, false);
of_node_put(cp->node);
kfree(cp);
break;
Expand Down

0 comments on commit 3c9ea42

Please sign in to comment.