[PATCH] pmdomain: imx: gpc: set fwnode from parent device

Saravana Kannan saravanak at google.com
Fri Oct 13 14:29:35 PDT 2023


On Thu, Oct 12, 2023 at 6:22 AM Emil Kronborg Andersen <emkan at prevas.dk> wrote:
>
> Before commit 3fb16866b51d ("driver core: fw_devlink: Make cycle
> detection more robust"), consumer devices without their fwnode set
> printed errors like the one below:
>
> [    1.039830] imx-gpc 20dc000.gpc: Failed to create device link (0x180) with 20c8000.anatop:regulator-vddpu
>
> To fix this, set the fwnode so fw_devlink can find and handle it
> properly.
>
> Signed-off-by: Emil Kronborg Andersen <emkan at prevas.dk>
> ---
>  drivers/pmdomain/imx/gpc.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/pmdomain/imx/gpc.c b/drivers/pmdomain/imx/gpc.c
> index 90a8b2c0676f..8759eab72880 100644
> --- a/drivers/pmdomain/imx/gpc.c
> +++ b/drivers/pmdomain/imx/gpc.c
> @@ -411,6 +411,8 @@ static int imx_gpc_probe(struct platform_device *pdev)
>         void __iomem *base;
>         int ret;
>
> +       device_set_node(&pdev->dev, dev_fwnode(pdev->dev.parent));
> +

Similar question as the other patch. Can we do this at a pmdomain
framework level instead of per driver?

-Saravana

>         pgc_node = of_get_child_by_name(pdev->dev.of_node, "pgc");
>
>         /* bail out if DT too old and doesn't provide the necessary info */
> --
> 2.41.0
>



More information about the linux-arm-kernel mailing list