Commit fadf79a0 authored by Lucas Stach's avatar Lucas Stach Committed by Shawn Guo
Browse files

soc: imx: gpcv2: add lockdep annotation



Some of the GPCv2 power domains are nested inside each other without
visibility to lockdep at the genpd level, as they are in separate
driver instances and don't have a parent/child power-domain relationship.

Add a subclass annotation to the nested domains to let lockdep know that
it is okay to take the genpd lock in a nested fashion.

Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
Reviewed-by: default avatarPeng Fan <peng.fan@nxp.com>
Signed-off-by: default avatarShawn Guo <shawnguo@kernel.org>
parent 2b2f106e
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -898,6 +898,10 @@ static int imx_pgc_domain_probe(struct platform_device *pdev)
		goto out_domain_unmap;
		goto out_domain_unmap;
	}
	}


	if (IS_ENABLED(CONFIG_LOCKDEP) &&
	    of_property_read_bool(domain->dev->of_node, "power-domains"))
		lockdep_set_subclass(&domain->genpd.mlock, 1);

	ret = of_genpd_add_provider_simple(domain->dev->of_node,
	ret = of_genpd_add_provider_simple(domain->dev->of_node,
					   &domain->genpd);
					   &domain->genpd);
	if (ret) {
	if (ret) {