diff mbox series

[v4,01/11] soc: imx: imx8m-blk-ctrl: set power device name

Message ID 20220406153402.1265474-2-l.stach@pengutronix.de (mailing list archive)
State New, archived
Headers show
Series consolidated i.MX8MP HSIO/MEDIA/HDMI blk-ctrl series | expand

Commit Message

Lucas Stach April 6, 2022, 3:33 p.m. UTC
Set the name for the virtual power device to the name of the attached
blk-ctrl domain. Makes the debug output for the power domains a lot
more pleasant to read.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 drivers/soc/imx/imx8m-blk-ctrl.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Laurent Pinchart April 25, 2022, 9:28 p.m. UTC | #1
Hi Lucas,

Thank you for the patch.

On Wed, Apr 06, 2022 at 05:33:52PM +0200, Lucas Stach wrote:
> Set the name for the virtual power device to the name of the attached
> blk-ctrl domain. Makes the debug output for the power domains a lot
> more pleasant to read.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
>  drivers/soc/imx/imx8m-blk-ctrl.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/soc/imx/imx8m-blk-ctrl.c b/drivers/soc/imx/imx8m-blk-ctrl.c
> index 122f9c884b38..3071a8eca8ef 100644
> --- a/drivers/soc/imx/imx8m-blk-ctrl.c
> +++ b/drivers/soc/imx/imx8m-blk-ctrl.c
> @@ -241,6 +241,7 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev)
>  			ret = PTR_ERR(domain->power_dev);
>  			goto cleanup_pds;
>  		}
> +		dev_set_name(domain->power_dev, "%s", data->name);

Would it make sense to keep "genpd" in the name ? Maybe "genpd:%s" ?

With or without that,

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

>  
>  		domain->genpd.name = data->name;
>  		domain->genpd.power_on = imx8m_blk_ctrl_power_on;
diff mbox series

Patch

diff --git a/drivers/soc/imx/imx8m-blk-ctrl.c b/drivers/soc/imx/imx8m-blk-ctrl.c
index 122f9c884b38..3071a8eca8ef 100644
--- a/drivers/soc/imx/imx8m-blk-ctrl.c
+++ b/drivers/soc/imx/imx8m-blk-ctrl.c
@@ -241,6 +241,7 @@  static int imx8m_blk_ctrl_probe(struct platform_device *pdev)
 			ret = PTR_ERR(domain->power_dev);
 			goto cleanup_pds;
 		}
+		dev_set_name(domain->power_dev, "%s", data->name);
 
 		domain->genpd.name = data->name;
 		domain->genpd.power_on = imx8m_blk_ctrl_power_on;