mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
To: Peter Chen <hzpeterchen@gmail.com>
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Mathias Nyman <mathias.nyman@intel.com>,
	Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>,
	Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
	Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
	linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 3/3] usb: xhci: plat: Facilitate using autosuspend for xhci plat devices
Date: Wed, 13 Aug 2025 12:19:30 +0530	[thread overview]
Message-ID: <38a8afb8-01f9-46a8-ac87-be1e4ab53136@oss.qualcomm.com> (raw)
In-Reply-To: <CAL411-qmWLJ9vYTc+NHFYymsJ27ryge88nTc71NAnzDa7TrExg@mail.gmail.com>



On 8/13/2025 11:46 AM, Peter Chen wrote:
> On Tue, Aug 12, 2025 at 1:58 PM Krishna Kurapati
> <krishna.kurapati@oss.qualcomm.com> wrote:
>>
>> Allow autosuspend to be used by xhci plat device. For Qualcomm SoCs,
>> when in host mode, it is intended that the controller goes to suspend
>> state to save power and wait for interrupts from connected peripheral
>> to wake it up. This is particularly used in cases where a HID or Audio
>> device is connected. In such scenarios, the usb controller can enter
>> auto suspend and resume action after getting interrupts from the
>> connected device.
>>
>> Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
>> ---
>>   drivers/usb/host/xhci-plat.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
>> index 5eb51797de32..dd57ffedcaa2 100644
>> --- a/drivers/usb/host/xhci-plat.c
>> +++ b/drivers/usb/host/xhci-plat.c
>> @@ -171,6 +171,7 @@ int xhci_plat_probe(struct platform_device *pdev, struct device *sysdev, const s
>>                  return ret;
>>
>>          pm_runtime_set_active(&pdev->dev);
>> +       pm_runtime_use_autosuspend(&pdev->dev);
>>          pm_runtime_enable(&pdev->dev);
>>          pm_runtime_get_noresume(&pdev->dev);
>>
> 
> There is an xhci quirk XHCI_DEFAULT_PM_RUNTIME_ALLOW for it, try to use it.
> 

Hi Peter,

I see it being used only in xhci-pci.c.

In xhci-plat, I intended to only allow usage of autosuspend and let 
userspace decide whether to use it or not (echo (auto or on) > control).

Hence I only did use_autosuspend() instead of doing runtime_allow.

Regards,
Krishna,

  reply	other threads:[~2025-08-13  6:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-12  5:55 [PATCH v4 0/3] usb: dwc3: Modify role-switching QC drd usb controllers Krishna Kurapati
2025-08-12  5:55 ` [PATCH v4 1/3] usb: dwc3: core: Introduce glue callbacks for flattened implementations Krishna Kurapati
2025-08-15  0:42   ` Thinh Nguyen
2025-08-12  5:55 ` [PATCH v4 2/3] usb: dwc3: qcom: Implement glue callbacks to facilitate runtime suspend Krishna Kurapati
2025-08-12  9:09   ` Konrad Dybcio
2025-08-12 10:23     ` Krishna Kurapati
2025-08-14  0:16   ` Thinh Nguyen
2025-08-14  1:36     ` Krishna Kurapati
2025-08-15  0:51       ` Thinh Nguyen
2025-08-12  5:55 ` [PATCH v4 3/3] usb: xhci: plat: Facilitate using autosuspend for xhci plat devices Krishna Kurapati
2025-08-13  6:16   ` Peter Chen
2025-08-13  6:49     ` Krishna Kurapati [this message]
2025-08-25  5:40   ` Krishna Kurapati PSSNV
2025-08-28 12:15     ` Udipto Goswami
2025-09-07  7:48 ` [PATCH v4 0/3] usb: dwc3: Modify role-switching QC drd usb controllers Krishna Kurapati PSSNV
2025-09-07  8:11   ` Greg Kroah-Hartman
2025-09-07 18:17     ` Krishna Kurapati PSSNV

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=38a8afb8-01f9-46a8-ac87-be1e4ab53136@oss.qualcomm.com \
    --to=krishna.kurapati@oss.qualcomm.com \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=bjorn.andersson@oss.qualcomm.com \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hzpeterchen@gmail.com \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®