All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] soc: imx: gpcv2: allow to disable individual power domains
@ 2021-10-02 12:48 Lucas Stach
  2021-10-03 16:49 ` Tim Harvey
  2021-10-05  6:28 ` Shawn Guo
  0 siblings, 2 replies; 3+ messages in thread
From: Lucas Stach @ 2021-10-02 12:48 UTC (permalink / raw)
  To: Shawn Guo, Tim Harvey
  Cc: Fabio Estevam, NXP Linux Team, linux-arm-kernel, kernel, patchwork-lst

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>
---
 drivers/soc/imx/gpcv2.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
index 811e9d29a079..b8d52d8d29db 100644
--- a/drivers/soc/imx/gpcv2.c
+++ b/drivers/soc/imx/gpcv2.c
@@ -1035,6 +1035,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");
-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-05  6:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-02 12:48 [PATCH] soc: imx: gpcv2: allow to disable individual power domains Lucas Stach
2021-10-03 16:49 ` Tim Harvey
2021-10-05  6:28 ` Shawn Guo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.