From: Lucas Stach Date: Sat, 2 Oct 2021 12:48:52 +0000 (+0200) Subject: soc: imx: gpcv2: allow to disable individual power domains X-Git-Tag: v6.6.17~8918^2~15^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8da8bd5399cfc2ff98514a6b31a3aa2159516fe6;p=platform%2Fkernel%2Flinux-rpi.git soc: imx: gpcv2: allow to disable individual power domains 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 Reviewed-By: Tim Harvey Tested-By: Tim Harvey Signed-off-by: Shawn Guo --- diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c index 46aac23..39a581f 100644 --- a/drivers/soc/imx/gpcv2.c +++ b/drivers/soc/imx/gpcv2.c @@ -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");