linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] phy: cadence: cdns-dphy-rx: Add runtime PM support
@ 2025-02-24 12:40 Jai Luthra
  2025-08-12  5:47 ` Jai Luthra
  2025-08-12 16:41 ` Vinod Koul
  0 siblings, 2 replies; 3+ messages in thread
From: Jai Luthra @ 2025-02-24 12:40 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I
  Cc: linux-phy, linux-kernel, Devarsh Thakkar, Tomi Valkeinen,
	Jai Luthra

Enable runtime power management for the device. The PHY framework
handles calling pm_runtime_(get|put)_sync when powering on/off this
device.

Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com>
---
 drivers/phy/cadence/cdns-dphy-rx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/phy/cadence/cdns-dphy-rx.c b/drivers/phy/cadence/cdns-dphy-rx.c
index 7729cf80a9bd892c3e5db6cdbdc4ece9ada2d99f..3ac80141189c4c8c350b678998e5dec7a15c3892 100644
--- a/drivers/phy/cadence/cdns-dphy-rx.c
+++ b/drivers/phy/cadence/cdns-dphy-rx.c
@@ -12,6 +12,7 @@
 #include <linux/phy/phy.h>
 #include <linux/phy/phy-mipi-dphy.h>
 #include <linux/platform_device.h>
+#include <linux/pm_runtime.h>
 #include <linux/sys_soc.h>
 
 #define DPHY_PMA_CMN(reg)		(reg)
@@ -265,7 +266,7 @@ static int cdns_dphy_rx_probe(struct platform_device *pdev)
 		return PTR_ERR(provider);
 	}
 
-	return 0;
+	return devm_pm_runtime_enable(dev);
 }
 
 static const struct of_device_id cdns_dphy_rx_of_match[] = {

---
base-commit: d082ecbc71e9e0bf49883ee4afd435a77a5101b6
change-id: 20250224-cdns_phy_pm-b2b7d472835d

Best regards,
-- 
Jai Luthra <jai.luthra@ideasonboard.com>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] phy: cadence: cdns-dphy-rx: Add runtime PM support
  2025-02-24 12:40 [PATCH] phy: cadence: cdns-dphy-rx: Add runtime PM support Jai Luthra
@ 2025-08-12  5:47 ` Jai Luthra
  2025-08-12 16:41 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Jai Luthra @ 2025-08-12  5:47 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Vinod Koul
  Cc: linux-phy, linux-kernel, Devarsh Thakkar, Tomi Valkeinen

Hi Vinod, Kishon,

Quoting Jai Luthra (2025-02-24 18:10:05)
> Enable runtime power management for the device. The PHY framework
> handles calling pm_runtime_(get|put)_sync when powering on/off this
> device.
> 

Can this patch get picked for the next merge window?

The CSI PM series is already reviewed [1], and it would be good to have
runtime PM for cameras working in 6.18, which needs both the PHY and CSI
IPs to be powered off.

[1]: https://lore.kernel.org/linux-media/20250224-ti_csi_pm-v1-0-8f8c29ef646d@ideasonboard.com/

> Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com>
> ---
>  drivers/phy/cadence/cdns-dphy-rx.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/phy/cadence/cdns-dphy-rx.c b/drivers/phy/cadence/cdns-dphy-rx.c
> index 7729cf80a9bd892c3e5db6cdbdc4ece9ada2d99f..3ac80141189c4c8c350b678998e5dec7a15c3892 100644
> --- a/drivers/phy/cadence/cdns-dphy-rx.c
> +++ b/drivers/phy/cadence/cdns-dphy-rx.c
> @@ -12,6 +12,7 @@
>  #include <linux/phy/phy.h>
>  #include <linux/phy/phy-mipi-dphy.h>
>  #include <linux/platform_device.h>
> +#include <linux/pm_runtime.h>
>  #include <linux/sys_soc.h>
>  
>  #define DPHY_PMA_CMN(reg)              (reg)
> @@ -265,7 +266,7 @@ static int cdns_dphy_rx_probe(struct platform_device *pdev)
>                 return PTR_ERR(provider);
>         }
>  
> -       return 0;
> +       return devm_pm_runtime_enable(dev);
>  }
>  
>  static const struct of_device_id cdns_dphy_rx_of_match[] = {
> 
> ---
> base-commit: d082ecbc71e9e0bf49883ee4afd435a77a5101b6
> change-id: 20250224-cdns_phy_pm-b2b7d472835d
> 
> Best regards,
> -- 
> Jai Luthra <jai.luthra@ideasonboard.com>
> 

Thanks,
Jai

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] phy: cadence: cdns-dphy-rx: Add runtime PM support
  2025-02-24 12:40 [PATCH] phy: cadence: cdns-dphy-rx: Add runtime PM support Jai Luthra
  2025-08-12  5:47 ` Jai Luthra
@ 2025-08-12 16:41 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2025-08-12 16:41 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Jai Luthra
  Cc: linux-phy, linux-kernel, Devarsh Thakkar, Tomi Valkeinen


On Mon, 24 Feb 2025 18:10:05 +0530, Jai Luthra wrote:
> Enable runtime power management for the device. The PHY framework
> handles calling pm_runtime_(get|put)_sync when powering on/off this
> device.
> 
> 

Applied, thanks!

[1/1] phy: cadence: cdns-dphy-rx: Add runtime PM support
      commit: a230d52c90cfb48f1f32d3957dc962165373895b

Best regards,
-- 
~Vinod



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-08-12 16:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-24 12:40 [PATCH] phy: cadence: cdns-dphy-rx: Add runtime PM support Jai Luthra
2025-08-12  5:47 ` Jai Luthra
2025-08-12 16:41 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).