devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krishna Kurapati PSSNV <quic_kriskura@quicinc.com>
To: Stephen Boyd <swboyd@chromium.org>,
	Pavan Kondeti <quic_pkondeti@quicinc.com>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>,
	Felipe Balbi <balbi@kernel.org>,
	Matthias Kaehlcke <mka@chromium.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	"Andy Gross" <agross@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Doug Anderson <dianders@chromium.org>,
	Mathias Nyman <mathias.nyman@intel.com>,
	<devicetree@vger.kernel.org>, <linux-arm-msm@vger.kernel.org>,
	<linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-pm@vger.kernel.org>, <quic_ppratap@quicinc.com>,
	<quic_vpulyala@quicinc.com>
Subject: Re: [PATCH v20 2/5] usb: dwc3: core: Host wake up support from system suspend
Date: Thu, 30 Jun 2022 23:43:01 +0530	[thread overview]
Message-ID: <c16a1c37-9183-8d0c-a5ad-39b897a0ab24@quicinc.com> (raw)
In-Reply-To: <CAE-0n50PGw_XSZ0-iV7gem6+-LENoq6ZVOwX3f+0XjkrHg-rLw@mail.gmail.com>


On 6/30/2022 3:45 AM, Stephen Boyd wrote:
> Quoting Pavan Kondeti (2022-06-27 22:31:48)
>> On Mon, Jun 27, 2022 at 01:02:49PM -0700, Stephen Boyd wrote:
>>> Quoting Pavan Kondeti (2022-06-20 01:54:15)
>>>> Would like to hear other people thoughts on this.
>>>>
>>> I'm not following very closely but it sounds like a problem that may be
>>> solved by using the component driver code (see
>>> include/linux/component.h). That would let you move anything that needs
>>> to be done once the child devices probe to the aggregate driver 'bind'
>>> function (see struct component_master_ops::bind).
>> Thanks Stephen for letting us know about the component device framework.
>>
>> IIUC,
>>
>> - dwc3-qcom (parent of the dwc3 core) registers as a component master by
>> calling component_master_add_with_match() before calling
>> of_platform_populate(). The match callback could be as simple as comparing
>> the device against our child device.
>>
>> - The dwc3 core (child) at the end of its probe can add as a component by calling
>> component_add().
>>
>> - The above triggers the component_master_ops::bind callback implemented in
>>    dwc3-qcom driver which signals that we are good to go.
>>
>> - The dwc-qcom can call component_bind_all() to finish the formality i.e
>>    telling the dwc3 core that we are good to go.
>>
>> Is my understanding correct? This is what we are looking for i.e a way for
>> the child device(s) to signal the parent when the former is bounded.
> Sounds about right to me.
>
>> Also what happens when the child device probe fails for any reason. i.e
>> component_add() would never be called so the master driver i.e dwc3-qcom would
>> wait indefinitely. May be it needs to implement a timeout or runtime suspend
>> etc should take care of keeping the resoures in suspend state.
> When the child fails probe, it should return -EPROBE_DEFER if probe
> needs to be deferred. Then the driver will attempt probe at a later
> time. If probe fails without defer then it will never work and dwc3-qcom
> will wait indefinitely. Not much we can do in that situation.
Hi Stephen,

   Thanks for the idea. But doesn't adding dwc3 as a component to an agg
driver meanthat this change needs to be done on all glue drivers, as
component_bind_all( ) from master componentis supposed to let the dwc3
core know that we are good to go ?
> dwc3-qcom should wait for dwc3 core to call component_add() and then do
> whatever needs to be done once the dwc3 core is registered in the
> dwc3-qcom bind callback. Honestly this may all be a little overkill if
> there's only two drivers here, dwc3-qcom and dwc3 core. It could
> probably just be some callback from dwc3 core at the end of probe that
> calls some function in dwc3-qcom.
Since the issue we are facing is that the ssphy device links are not ready
causing the dwc3 probe not being invoked, can we add an API as Pavan 
suggested
to check if deferred_probe listfor dwc3 device is empty or not andbased on
that we can choose to defer our qcomprobe ? In this case, we don't need to
touch the dwc3 core driver and would be making changesonly in qcom glue 
driver.

  reply	other threads:[~2022-06-30 18:13 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-02  8:24 [PATCH v20 0/5] USB DWC3 host wake up support from system suspend Krishna Kurapati
2022-06-02  8:24 ` [PATCH v20 1/5] dt-bindings: usb: dwc3: Add wakeup-source property support Krishna Kurapati
2022-06-02  8:24 ` [PATCH v20 2/5] usb: dwc3: core: Host wake up support from system suspend Krishna Kurapati
2022-06-02 19:35   ` Matthias Kaehlcke
2022-06-06 20:45     ` Matthias Kaehlcke
2022-06-13 18:08       ` Matthias Kaehlcke
2022-06-14 17:53         ` Matthias Kaehlcke
2022-06-14 19:37           ` Krishna Kurapati PSSNV
2022-06-16  9:11           ` Pavan Kondeti
2022-06-16 17:15             ` Matthias Kaehlcke
2022-06-20  8:54               ` Pavan Kondeti
2022-06-23 18:38                 ` Matthias Kaehlcke
2022-06-24  8:58                   ` Pavan Kondeti
2022-06-27 20:02                 ` Stephen Boyd
2022-06-28  5:31                   ` Pavan Kondeti
2022-06-29 22:15                     ` Stephen Boyd
2022-06-30 18:13                       ` Krishna Kurapati PSSNV [this message]
2022-07-01  1:10                         ` Matthias Kaehlcke
2022-07-01 10:15                           ` Pavan Kondeti
2022-07-01 15:52                             ` Matthias Kaehlcke
     [not found]                               ` <09f6a717-2bbb-6bd3-f7a8-5ac9e3db51f3@quicinc.com>
     [not found]                                 ` <9f9f9abc-9b37-8bfb-3efa-6c860b5dba8d@quicinc.com>
2022-07-13  1:34                                   ` Matthias Kaehlcke
2022-06-02  8:24 ` [PATCH v20 3/5] usb: dwc3: qcom: Add helper functions to enable,disable wake irqs Krishna Kurapati
2022-06-02  8:24 ` [PATCH v20 4/5] usb: dwc3: qcom: Configure wakeup interrupts during suspend Krishna Kurapati
2022-06-02 13:07   ` Pavan Kondeti
2022-06-02  8:24 ` [PATCH v20 5/5] usb: dwc3: qcom: Keep power domain on to retain controller status Krishna Kurapati
2022-06-02 13:07   ` Pavan Kondeti
2022-06-02 13:09 ` [PATCH v20 0/5] USB DWC3 host wake up support from system suspend Pavan Kondeti

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=c16a1c37-9183-8d0c-a5ad-39b897a0ab24@quicinc.com \
    --to=quic_kriskura@quicinc.com \
    --cc=agross@kernel.org \
    --cc=balbi@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=mka@chromium.org \
    --cc=quic_pkondeti@quicinc.com \
    --cc=quic_ppratap@quicinc.com \
    --cc=quic_vpulyala@quicinc.com \
    --cc=robh+dt@kernel.org \
    --cc=swboyd@chromium.org \
    /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;
as well as URLs for NNTP newsgroup(s).