Commit bab2d712 authored by Saravana Kannan's avatar Saravana Kannan Committed by Greg Kroah-Hartman

PM: domains: Mark fwnodes when their powerdomain is added/removed

This allows fw_devlink to recognize power domain 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 power domain aren't
indefinitely blocked from probing, waiting for the power domain device
to appear and bind to a driver.
Tested-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: default avatarSaravana Kannan <saravanak@google.com>
Link: https://lore.kernel.org/r/20210205222644.2357303-8-saravanak@google.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ed1054a0
...@@ -2164,6 +2164,7 @@ static int genpd_add_provider(struct device_node *np, genpd_xlate_t xlate, ...@@ -2164,6 +2164,7 @@ static int genpd_add_provider(struct device_node *np, genpd_xlate_t xlate,
cp->node = of_node_get(np); cp->node = of_node_get(np);
cp->data = data; cp->data = data;
cp->xlate = xlate; cp->xlate = xlate;
fwnode_dev_initialized(&np->fwnode, true);
mutex_lock(&of_genpd_mutex); mutex_lock(&of_genpd_mutex);
list_add(&cp->link, &of_genpd_providers); list_add(&cp->link, &of_genpd_providers);
...@@ -2353,6 +2354,7 @@ void of_genpd_del_provider(struct device_node *np) ...@@ -2353,6 +2354,7 @@ void of_genpd_del_provider(struct device_node *np)
} }
} }
fwnode_dev_initialized(&cp->node->fwnode, false);
list_del(&cp->link); list_del(&cp->link);
of_node_put(cp->node); of_node_put(cp->node);
kfree(cp); kfree(cp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment