diff options
author | Lucas Stach <l.stach@pengutronix.de> | 2021-10-02 14:48:52 +0200 |
---|---|---|
committer | Shawn Guo <shawnguo@kernel.org> | 2021-10-05 08:27:52 +0200 |
commit | 8da8bd5399cfc2ff98514a6b31a3aa2159516fe6 (patch) | |
tree | 560c8e4a0edbe9670629f8fd2133e582fa5f75bd /drivers | |
parent | imx: soc: Select REGMAP_MMIO (diff) | |
download | linux-8da8bd5399cfc2ff98514a6b31a3aa2159516fe6.tar.xz linux-8da8bd5399cfc2ff98514a6b31a3aa2159516fe6.zip |
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 <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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/soc/imx/gpcv2.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c index 46aac23a35e3..39a581f9b4ac 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"); |