mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +02:00
UPSTREAM: 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: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Saravana Kannan <saravanak@google.com>
Link: https://lore.kernel.org/r/20210205222644.2357303-8-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit bab2d712ee)
Bug: 181264536
Change-Id: I31f01b54642bfa395b282c03b9d2ddd4ff69b8f9
This commit is contained in:
parent
97860deed3
commit
559e5a7de1
|
|
@ -2223,6 +2223,7 @@ static int genpd_add_provider(struct device_node *np, genpd_xlate_t xlate,
|
|||
cp->node = of_node_get(np);
|
||||
cp->data = data;
|
||||
cp->xlate = xlate;
|
||||
fwnode_dev_initialized(&np->fwnode, true);
|
||||
|
||||
mutex_lock(&of_genpd_mutex);
|
||||
list_add(&cp->link, &of_genpd_providers);
|
||||
|
|
@ -2412,6 +2413,7 @@ void of_genpd_del_provider(struct device_node *np)
|
|||
}
|
||||
}
|
||||
|
||||
fwnode_dev_initialized(&cp->node->fwnode, false);
|
||||
list_del(&cp->link);
|
||||
of_node_put(cp->node);
|
||||
kfree(cp);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user