[PATCH] soc: imx: imx8m-blk-ctrl: Make error prints useful

Martyn Welch martyn.welch at collabora.com
Fri Jul 8 07:09:51 PDT 2022


On Fri, 2022-06-24 at 20:29 +0200, Marek Vasut wrote:
> Print the name of the power domain which failed to make the error
> prints actually useful for finding the error.
> 

Boot tested on top of drm-misc-next-2022-06-30 using Innolux g121x1
LVDS panel connected to NXP i.MX8MP EVK.

Tested in combination with other patches, tree found here:
https://gitlab.collabora.com/martyn/linux/-/tree/6a4cccf50ea793d9e608ccda13468f8645aff6ad

Tested-by: Martyn Welch <martyn.welch at collabora.com>

> Signed-off-by: Marek Vasut <marex at denx.de>
> Cc: Alexander Stein <alexander.stein at ew.tq-group.com>
> Cc: Lucas Stach <l.stach at pengutronix.de>
> Cc: Martyn Welch <martyn.welch at collabora.com>
> Cc: Paul Elder <paul.elder at ideasonboard.com>
> Cc: Shawn Guo <shawnguo at kernel.org>
> ---
>  drivers/soc/imx/imx8m-blk-ctrl.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/soc/imx/imx8m-blk-ctrl.c
> b/drivers/soc/imx/imx8m-blk-ctrl.c
> index 7ebc28709e945..dff7529268e4d 100644
> --- a/drivers/soc/imx/imx8m-blk-ctrl.c
> +++ b/drivers/soc/imx/imx8m-blk-ctrl.c
> @@ -216,7 +216,7 @@ static int imx8m_blk_ctrl_probe(struct
> platform_device *pdev)
>         bc->bus_power_dev = genpd_dev_pm_attach_by_name(dev, "bus");
>         if (IS_ERR(bc->bus_power_dev))
>                 return dev_err_probe(dev, PTR_ERR(bc->bus_power_dev),
> -                                    "failed to attach power
> domain\n");
> +                                    "failed to attach power domain
> \"bus\"\n");
>  
>         for (i = 0; i < bc_data->num_domains; i++) {
>                 const struct imx8m_blk_ctrl_domain_data *data =
> &bc_data->domains[i];
> @@ -238,7 +238,8 @@ static int imx8m_blk_ctrl_probe(struct
> platform_device *pdev)
>                         dev_pm_domain_attach_by_name(dev, data-
> >gpc_name);
>                 if (IS_ERR(domain->power_dev)) {
>                         dev_err_probe(dev, PTR_ERR(domain-
> >power_dev),
> -                                     "failed to attach power
> domain\n");
> +                                     "failed to attach power domain
> \"%s\"\n",
> +                                     data->gpc_name);
>                         ret = PTR_ERR(domain->power_dev);
>                         goto cleanup_pds;
>                 }
> @@ -251,7 +252,9 @@ static int imx8m_blk_ctrl_probe(struct
> platform_device *pdev)
>  
>                 ret = pm_genpd_init(&domain->genpd, NULL, true);
>                 if (ret) {
> -                       dev_err_probe(dev, ret, "failed to init power
> domain\n");
> +                       dev_err_probe(dev, ret,
> +                                     "failed to init power domain
> \"%s\"\n",
> +                                     data->gpc_name);
>                         dev_pm_domain_detach(domain->power_dev,
> true);
>                         goto cleanup_pds;
>                 }



More information about the linux-arm-kernel mailing list