[PATCH] phy: qualcomm: m31-eusb2: Add runtime pm ops

Prashanth K prashanth.k at oss.qualcomm.com
Tue Oct 28 04:11:45 PDT 2025



On 10/27/2025 4:41 PM, Konrad Dybcio wrote:
> On 10/27/25 12:09 PM, Prashanth K wrote:
>>
>>
>> On 10/27/2025 1:55 PM, Konrad Dybcio wrote:
>>> On 10/27/25 7:24 AM, Prashanth K wrote:
>>>> Add runtime power management operation callbacks for M31 EUSB2 PHY.
>>>> Enable/disable the clocks based on the runtime suspend/resume calls.
>>>>
>>>> Signed-off-by: Prashanth K <prashanth.k at oss.qualcomm.com>
>>>> ---
>>>
>>> [...]
>>>
>>>>  static int m31eusb2_phy_probe(struct platform_device *pdev)
>>>>  {
>>>>  	struct phy_provider *phy_provider;
>>>> @@ -270,6 +298,17 @@ static int m31eusb2_phy_probe(struct platform_device *pdev)
>>>>  		return dev_err_probe(dev, PTR_ERR(phy->clk),
>>>>  				     "failed to get clk\n");
>>>>  
>>>> +	dev_set_drvdata(dev, phy);
>>>> +	pm_runtime_set_active(dev);
>>>> +	pm_runtime_enable(dev);
>>>> +
>>>> +	/*
>>>> +	 * Prevent runtime pm from being ON by default. Users can enable
>>>> +	 * it using power/control in sysfs.
>>>> +	 */
>>>> +	pm_runtime_forbid(dev);
>>>
>>> This screams "this patch is broken" or "there are bad issues" which
>>> you did not describe at all.
>>>
>>> Konrad
>>
>> Hi Konrad, I was followed the same sequence from other phy drivers
>> containing pm_ops. I assume the runtime_forbid is added to control
>> runtime pm from userspace.
> 
> Other drivers call runtime_forbid() because the implementation doesn't
> work.. Or at least historically the usb3 part hasn't been able to sus/
> res properly
> 
> Konrad

Sure, I'll remove the runtime_forbid call and send v2. Let me know if
there's anything else.

Thanks in advance,
Prashanth K



More information about the linux-phy mailing list