Re: [PATCH 3/9] can: rcar_can: Convert to Runtime PM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 14.08.2025 14:02:01, Geert Uytterhoeven wrote:
> The R-Car CAN module is part of a Clock Domain on all supported SoCs.
> Hence convert its driver from explicit clock management to Runtime PM.

Does kconfig ensure that Runtime PM is selected?
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> ---
>  drivers/net/can/rcar/rcar_can.c | 46 +++++++++++++++++----------------
>  1 file changed, 24 insertions(+), 22 deletions(-)
> 
> diff --git a/drivers/net/can/rcar/rcar_can.c b/drivers/net/can/rcar/rcar_can.c
> index 57030992141cc523..aecbb02c7dc9c90a 100644
> --- a/drivers/net/can/rcar/rcar_can.c
> +++ b/drivers/net/can/rcar/rcar_can.c
> @@ -16,6 +16,7 @@
>  #include <linux/can/dev.h>
>  #include <linux/clk.h>
>  #include <linux/of.h>
> +#include <linux/pm_runtime.h>
>  
>  #define RCAR_CAN_DRV_NAME	"rcar_can"
>  
> @@ -92,7 +93,6 @@ struct rcar_can_priv {
>  	struct net_device *ndev;
>  	struct napi_struct napi;
>  	struct rcar_can_regs __iomem *regs;
> -	struct clk *clk;
>  	struct clk *can_clk;
>  	u32 tx_head;
>  	u32 tx_tail;
> @@ -506,10 +506,10 @@ static int rcar_can_open(struct net_device *ndev)
>  	struct rcar_can_priv *priv = netdev_priv(ndev);
>  	int err;
>  
> -	err = clk_prepare_enable(priv->clk);
> +	err = pm_runtime_resume_and_get(ndev->dev.parent);
>  	if (err) {
>  		netdev_err(ndev,
> -			   "failed to enable peripheral clock, error %d\n",
> +			   "pm_runtime_resume_and_get() failed, error %d\n",

Can you convert the errors to %pE?

Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde          |
Embedded Linux                   | https://www.pengutronix.de |
Vertretung Nürnberg              | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-9   |

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux