All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: Alan Cooper <alcooperx@gmail.com>
Cc: ": Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	Alan Stern <stern@rowland.harvard.edu>,
	Alban Bedel <albeu@free.fr>, Alex Elder <elder@linaro.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Arnd Bergmann" <arnd@arndb.de>,
	Avi Fishman <avifishman70@gmail.com>,
	<bcm-kernel-feedback-list@broadcom.com>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	"David S. Miller" <davem@davemloft.net>,
	DTML <devicetree@vger.kernel.org>,
	Dmitry Osipenko <digetx@gmail.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
	Hans de Goede <hdegoede@redhat.com>,
	James Hogan <jhogan@kernel.org>,
	Jianguo Sun <sunjianguo1@huawei.com>,
	Johan Hovold <johan@kernel.org>,
	Kees Cook <keescook@chromium.org>,
	USB list <linux-usb@vger.kernel.org>,
	Lu Baolu <baolu.lu@linux.intel.com>,
	"Mark Rutland" <mark.rutland@arm.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Mathias Nyman <mathias.nyman@intel.com>,
	Mathias Nyman <mathias.nyman@linux.intel.com>,
	Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
	Rishabh Bhatnagar <rishabhb@codeaurora.org>,
	Rob Herring <robh+dt@kernel.org>, Roger Quadros <rogerq@ti.com>
Subject: Re: [PATCH V2 2/6] usb: core: Add ability to skip phy exit on suspend and init on resume
Date: Thu, 8 Nov 2018 09:43:52 +0800	[thread overview]
Message-ID: <1541641432.32173.71.camel@mhfsdcap03> (raw)
In-Reply-To: <CAOGqxeWBmAahswHp+b_PzkyGs-9sOx3COpJnFVsbKhx14KLuUw@mail.gmail.com>

hi,
On Tue, 2018-10-30 at 18:30 -0400, Alan Cooper wrote:
> On 10/17/18 9:46 PM, Chunfeng Yun wrote:> hi,
> >
> > On Wed, 2018-10-17 at 18:29 -0400, Al Cooper wrote:
> >> Add the ability to skip calling the PHY's exit routine on suspend
> >> and the PHY's init routine on resume. This is to handle a USB PHY
> >> that should have it's power_off function called on suspend but
> cannot
> >> have it's exit function called because on exit it will disable the
> >> PHY to the point where register accesses to the Host Controllers
> >> using the PHY will be disabled and the host drivers will crash.
> >>
> >> This is enabled with the HCD flag "suspend_without_phy_exit" which
> >> can be set from any HCD driver.
> >>
> >> Signed-off-by: Al Cooper<alcooperx@gmail.com>
> >> ---
> >>   drivers/usb/core/hcd.c  |  8 ++++----
> >>   drivers/usb/core/phy.c  | 18 ++++++++++++------
> >>   drivers/usb/core/phy.h  |  9 ++++++---
> >>   include/linux/usb/hcd.h |  3 +++
> >>   4 files changed, 25 insertions(+), 13 deletions(-)
> >>


> >>       unsigned        skip_phy_initialization:1;
> >>  
> >> +    /* Some phys don't want the phy's exit/init called on
> suspend/resume */
> >> +    unsigned        suspend_without_phy_exit:1;
> > As suggested before, you can skip phy's exit/init during
> suspend/resume
> > by enabling wakeup of hcd, so needn't add a new variable for it.
> 
> I still need to be able to enable and disable wakeup for this driver.
Just use device_init_wakeup(dev, true) instead of
device_wakeup_enable(dev) for your controller driver, you can try it.

Sorry for the late replay
> 
> >
> >> +
> >>       /* The next flag is a stopgap, to be removed when all the
> HCDs
> >>        * support the new root-hub polling mechanism. */
> >>       unsigned        uses_new_polling:1;
> >



WARNING: multiple messages have this Message-ID (diff)
From: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: Alan Cooper <alcooperx@gmail.com>
Cc: ": Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	Alan Stern <stern@rowland.harvard.edu>,
	Alban Bedel <albeu@free.fr>, Alex Elder <elder@linaro.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Avi Fishman <avifishman70@gmail.com>,
	bcm-kernel-feedback-list@broadcom.com,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	"David S. Miller" <davem@davemloft.net>,
	DTML <devicetree@vger.kernel.org>,
	Dmitry Osipenko <digetx@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
	Hans de Goede <hdegoede@redhat.com>,
	James Hogan <jhogan@kernel.org>,
	Jianguo Sun <sunjianguo1@huawei.com>,
	Johan Hovold <johan@kernel.org>,
	Kees Cook <keescook@chromium.org>,
	US
Subject: Re: [PATCH V2 2/6] usb: core: Add ability to skip phy exit on suspend and init on resume
Date: Thu, 8 Nov 2018 09:43:52 +0800	[thread overview]
Message-ID: <1541641432.32173.71.camel@mhfsdcap03> (raw)
In-Reply-To: <CAOGqxeWBmAahswHp+b_PzkyGs-9sOx3COpJnFVsbKhx14KLuUw@mail.gmail.com>

hi,
On Tue, 2018-10-30 at 18:30 -0400, Alan Cooper wrote:
> On 10/17/18 9:46 PM, Chunfeng Yun wrote:> hi,
> >
> > On Wed, 2018-10-17 at 18:29 -0400, Al Cooper wrote:
> >> Add the ability to skip calling the PHY's exit routine on suspend
> >> and the PHY's init routine on resume. This is to handle a USB PHY
> >> that should have it's power_off function called on suspend but
> cannot
> >> have it's exit function called because on exit it will disable the
> >> PHY to the point where register accesses to the Host Controllers
> >> using the PHY will be disabled and the host drivers will crash.
> >>
> >> This is enabled with the HCD flag "suspend_without_phy_exit" which
> >> can be set from any HCD driver.
> >>
> >> Signed-off-by: Al Cooper<alcooperx@gmail.com>
> >> ---
> >>   drivers/usb/core/hcd.c  |  8 ++++----
> >>   drivers/usb/core/phy.c  | 18 ++++++++++++------
> >>   drivers/usb/core/phy.h  |  9 ++++++---
> >>   include/linux/usb/hcd.h |  3 +++
> >>   4 files changed, 25 insertions(+), 13 deletions(-)
> >>


> >>       unsigned        skip_phy_initialization:1;
> >>  
> >> +    /* Some phys don't want the phy's exit/init called on
> suspend/resume */
> >> +    unsigned        suspend_without_phy_exit:1;
> > As suggested before, you can skip phy's exit/init during
> suspend/resume
> > by enabling wakeup of hcd, so needn't add a new variable for it.
> 
> I still need to be able to enable and disable wakeup for this driver.
Just use device_init_wakeup(dev, true) instead of
device_wakeup_enable(dev) for your controller driver, you can try it.

Sorry for the late replay
> 
> >
> >> +
> >>       /* The next flag is a stopgap, to be removed when all the
> HCDs
> >>        * support the new root-hub polling mechanism. */
> >>       unsigned        uses_new_polling:1;
> >

  reply	other threads:[~2018-11-08  1:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-30 22:30 [PATCH V2 2/6] usb: core: Add ability to skip phy exit on suspend and init on resume Alan Cooper
2018-11-08  1:43 ` Chunfeng Yun [this message]
2018-11-08  1:43   ` Chunfeng Yun
2018-11-08 22:50   ` Alan Cooper
2018-11-08 22:50     ` Alan Cooper
2018-11-09  8:08     ` Chunfeng Yun
2018-11-09  8:08       ` Chunfeng Yun
2018-11-09 12:14       ` Alan Cooper
2018-11-09 12:14         ` Alan Cooper
  -- strict thread matches above, loose matches on Subject: below --
2018-10-17 22:29 [PATCH V2 0/6] Add XHCI, EHCI and OHCI support for Broadcom STB SoS's Al Cooper
2018-10-17 22:29 ` [PATCH V2 2/6] usb: core: Add ability to skip phy exit on suspend and init on resume Al Cooper
2018-10-17 22:29   ` Al Cooper
2018-10-18  1:46   ` Chunfeng Yun
2018-10-18  1:46     ` 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=1541641432.32173.71.camel@mhfsdcap03 \
    --to=chunfeng.yun@mediatek.com \
    --cc=akpm@linux-foundation.org \
    --cc=albeu@free.fr \
    --cc=alcooperx@gmail.com \
    --cc=arnd@arndb.de \
    --cc=avifishman70@gmail.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=digetx@gmail.com \
    --cc=elder@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=gustavo@embeddedor.com \
    --cc=hdegoede@redhat.com \
    --cc=jhogan@kernel.org \
    --cc=johan@kernel.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=mathias.nyman@intel.com \
    --cc=mathias.nyman@linux.intel.com \
    --cc=mchehab+samsung@kernel.org \
    --cc=rishabhb@codeaurora.org \
    --cc=robh+dt@kernel.org \
    --cc=rogerq@ti.com \
    --cc=stern@rowland.harvard.edu \
    --cc=sunjianguo1@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.