public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: CK Hu <ck.hu@mediatek.com>
Cc: linux-mediatek@lists.infradead.org, linux-usb@vger.kernel.org,
	Zhanyong Wang <zhanyong.wang@mediatek.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC PATCH 3/4] usb: xhci-mtk: add support runtime pm
Date: Fri, 4 Sep 2020 15:20:18 +0800	[thread overview]
Message-ID: <1599204018.11403.34.camel@mhfsdcap03> (raw)
In-Reply-To: <1599203472.23494.3.camel@mtksdaap41>

Hi CK,
On Fri, 2020-09-04 at 15:11 +0800, CK Hu wrote:
> Hi, Chunfeng:
> 
> On Thu, 2020-09-03 at 11:34 +0800, Chunfeng Yun wrote:
> > From: CK Hu <ck.hu@mediatek.com>
> > 
> > add support runtime pm feature
> > 
> > Signed-off-by: Zhanyong Wang <zhanyong.wang@mediatek.com>
> > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> > ---
> >  drivers/usb/host/xhci-mtk.c | 446 +++++++++++++++++++++++++++++++++++++++++++-
> >  drivers/usb/host/xhci-mtk.h |  14 ++
> >  2 files changed, 455 insertions(+), 5 deletions(-)
> >  mode change 100644 => 100755 drivers/usb/host/xhci-mtk.h
> > 
> 
> [snip]
> 
> > @@ -562,6 +794,31 @@ static int xhci_mtk_probe(struct platform_device *pdev)
> >  	if (ret)
> >  		goto dealloc_usb2_hcd;
> >  
> > +	INIT_DELAYED_WORK(&mtk->seal, xhci_mtk_seal_work);
> > +	snprintf(mtk->seal_descr, sizeof(mtk->seal_descr), "seal%s:usb%d",
> > +		 hcd->driver->description, hcd->self.busnum);
> > +	ret = devm_request_irq(mtk->seal_irq, &xhci_mtk_seal_irq,
> > +			  IRQF_TRIGGER_FALLING,	mtk->seal_descr, mtk);
> 
> In interrupt.h [1], devm_request_irq() need 6 parameters:
> 
> static inline int __must_check
> devm_request_irq(struct device *dev, unsigned int irq, irq_handler_t
> handler,
> 		 unsigned long irqflags, const char *devname, void *dev_id)
> {
> 	return devm_request_threaded_irq(dev, irq, handler, NULL, irqflags,
> 					 devname, dev_id);
> }
> 
Will fix it, thanks
> 
> [1]
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/interrupt.h?h=v5.9-rc1
> 
> Regards,
> CK
> 
> > +	if (ret != 0) {
> > +		dev_err(dev, "seal request interrupt %d failed\n",
> > +			mtk->seal_irq);
> > +		goto dealloc_usb2_hcd;
> > +	}
> > +	xhci_mtk_seal_wakeup_enable(mtk, false);
> > +
> > +	device_enable_async_suspend(dev);
> > +	xhci_mtk_runtime_ready = 1;
> > +
> > +	ret = add_power_attributes(dev);
> > +	if (ret)
> > +		goto dealloc_usb2_hcd;
> > +
> > +	pm_runtime_mark_last_busy(dev);
> > +	pm_runtime_put_autosuspend(dev);
> > +
> > +	dev_dbg(dev, "%s: xhci_mtk_runtime_ready %i",
> > +		 __func__, xhci_mtk_runtime_ready);
> > +
> >  	return 0;
> >  
> >  dealloc_usb2_hcd:
> > @@ -584,7 +841,7 @@ static int xhci_mtk_probe(struct platform_device *pdev)
> >  	xhci_mtk_ldos_disable(mtk);
> >  
> >  disable_pm:
> > -	pm_runtime_put_sync(dev);
> > +	pm_runtime_put_sync_autosuspend(dev);
> >  	pm_runtime_disable(dev);
> >  	return ret;
> >  }
> 
> 
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-09-04  7:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-03  3:34 [RFC PATCH 1/4] usb: xhci-mtk: improve bandwidth scheduling with multi-TT Chunfeng Yun
2020-09-03  3:34 ` [RFC PATCH 2/4] usb: xhci-mtk: add mt8192 wakeup Chunfeng Yun
2020-09-03  3:34 ` [RFC PATCH 3/4] usb: xhci-mtk: add support runtime pm Chunfeng Yun
2020-09-04  7:11   ` CK Hu
2020-09-04  7:20     ` Chunfeng Yun [this message]
2020-09-03  3:34 ` [RFC PATCH 4/4] arm64: dts: mt8192: add SSUSB related nodes Chunfeng Yun
  -- strict thread matches above, loose matches on Subject: below --
2020-09-03  3:28 [RFC PATCH 1/4] usb: xhci-mtk: improve bandwidth scheduling with multi-TT Chunfeng Yun
2020-09-03  3:28 ` [RFC PATCH 3/4] usb: xhci-mtk: add support runtime pm Chunfeng Yun

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=1599204018.11403.34.camel@mhfsdcap03 \
    --to=chunfeng.yun@mediatek.com \
    --cc=ck.hu@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=zhanyong.wang@mediatek.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