mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-26 14:17:26 -04:00
clk: Mark fwnodes when their clock provider is added/removed
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>
This commit is contained in:
parent
bab2d712ee
commit
3c9ea42802
1 changed files with 3 additions and 0 deletions
|
@ -4555,6 +4555,8 @@ int of_clk_add_provider(struct device_node *np,
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
of_clk_del_provider(np);
|
of_clk_del_provider(np);
|
||||||
|
|
||||||
|
fwnode_dev_initialized(&np->fwnode, true);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(of_clk_add_provider);
|
EXPORT_SYMBOL_GPL(of_clk_add_provider);
|
||||||
|
@ -4672,6 +4674,7 @@ void of_clk_del_provider(struct device_node *np)
|
||||||
list_for_each_entry(cp, &of_clk_providers, link) {
|
list_for_each_entry(cp, &of_clk_providers, link) {
|
||||||
if (cp->node == np) {
|
if (cp->node == np) {
|
||||||
list_del(&cp->link);
|
list_del(&cp->link);
|
||||||
|
fwnode_dev_initialized(&np->fwnode, false);
|
||||||
of_node_put(cp->node);
|
of_node_put(cp->node);
|
||||||
kfree(cp);
|
kfree(cp);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue