irqchip/irq-imx-gpcv2: Mark fwnode device as not initialized
authorSaravana Kannan <saravanak@google.com>
Tue, 7 Feb 2023 01:42:02 +0000 (17:42 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Feb 2023 12:37:55 +0000 (13:37 +0100)
Since this device is only partially initialized by the irqchip driver,
we need to mark the fwnode device as not initialized. This is to let
fw_devlink know that the device will be completely initialized at a
later point. That way, fw_devlink will continue to defer the probe of
the power domain consumers till the power domain driver successfully
binds to the struct device and completes the initialization of the
device.

Signed-off-by: Saravana Kannan <saravanak@google.com>
Tested-by: Douglas Anderson <dianders@chromium.org>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Luca Weiss <luca.weiss@fairphone.com> # qcom/sm7225-fairphone-fp4
Link: https://lore.kernel.org/r/20230207014207.1678715-11-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/irqchip/irq-imx-gpcv2.c
drivers/soc/imx/gpcv2.c

index b9c22f764b4d9e2f947e3dce3aeac2b85125019b..8a0e82067924ebe342046a176f255c63a177e81d 100644 (file)
@@ -283,6 +283,7 @@ static int __init imx_gpcv2_irqchip_init(struct device_node *node,
         * later the GPC power domain driver will not be skipped.
         */
        of_node_clear_flag(node, OF_POPULATED);
+       fwnode_dev_initialized(domain->fwnode, false);
        return 0;
 }
 
index 7a47d14fde445daccaa72299213da8188751dbab..4b3300b090a8aa37805f4117416fe8e1625f6f24 100644 (file)
@@ -1518,7 +1518,7 @@ static int imx_gpcv2_probe(struct platform_device *pdev)
                domain->genpd.power_off = imx_pgc_power_down;
 
                pd_pdev->dev.parent = dev;
-               pd_pdev->dev.of_node = np;
+               device_set_node(&pd_pdev->dev, of_fwnode_handle(np));
 
                ret = platform_device_add(pd_pdev);
                if (ret) {