Skip to content

Commit

Permalink
soc: imx: gpcv2: allow to disable individual power domains
Browse files Browse the repository at this point in the history
Some board designs don't supply power to all of the power domains,
as they are not used anyways. In that case we must make sure to
not touch those power domains at all, as trying to power up a
domain that has no power supplied to it will obviously end in a
system crash. Allow to disable those domains via the standard DT
status property.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-By: Tim Harvey <tharvey@gateworks.com>
Tested-By: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
  • Loading branch information
Lucas Stach authored and Shawn Guo committed Oct 5, 2021
1 parent f617a87 commit 8da8bd5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/soc/imx/gpcv2.c
Original file line number Diff line number Diff line change
Expand Up @@ -990,6 +990,9 @@ static int imx_gpcv2_probe(struct platform_device *pdev)
struct imx_pgc_domain *domain;
u32 domain_index;

if (!of_device_is_available(np))
continue;

ret = of_property_read_u32(np, "reg", &domain_index);
if (ret) {
dev_err(dev, "Failed to read 'reg' property\n");
Expand Down

0 comments on commit 8da8bd5

Please sign in to comment.