From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>,
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Cc: Vinod Koul <vkoul@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Manivannan Sadhasivam <mani@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"linux-phy@lists.infradead.org" <linux-phy@lists.infradead.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: Re: [PATCH v6 5/5] usb: dwc3: qcom: Modify interrupt handling for eUSB2 Phy targets
Date: Fri, 4 Sep 2026 23:07:47 +0000 [thread overview]
Message-ID: <aptOOZxuRzUy4kHT@vbox> (raw)
In-Reply-To: <3d31f750-750b-4561-96a3-d265b632da6d@oss.qualcomm.com>
On Wed, Sep 02, 2026, Konrad Dybcio wrote:
> On 8/26/26 7:02 PM, Krishna Kurapati wrote:
> > eUSB2 targets handle wakeup interrupts differently depending on device
> > speed when operating in host mode.
> >
> > According to the eUSB2 specification, remote wakeup signaling in host
> > mode is detected via different data-line assertions based on the
> > connected device speed.
> >
> > When a low-speed device is connected, the host repeater drives eD+ to
> > logic '1' upon detecting a K-state on the USB lines during remote wakeup
> > (eUSB2 specification, Section 5.5.14).
> >
> > When a full-speed or high-speed device is connected, the host repeater
> > drives eD- to logic '1' upon detecting a K-state on the USB line during
> > remote wakeup (eUSB2 specification, Sections 5.5.15 and 5.5.18).
> >
> > Since the eUSB2 PHY's "DP" and "DM" interrupt lines monitor the eD+ and
> > eD- line states, query the phy type and configure the wakeup interrupts
> > accordingly.
> >
> > Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
> > ---
>
> [...]
>
> > + phy = devm_of_phy_get_by_index(dev, dev->of_node, 0);
> > + if (IS_ERR(phy)) {
> > + if (PTR_ERR(phy) != -ENODEV) {
> > + ret = dev_err_probe(dev, PTR_ERR(phy),
> > + "failed to get usb2 phy\n");
> > + goto clk_disable;
> > + }
> > + phy = NULL;
> > + }
>
> Looks like we don't have a devm_of_phy_optional_get_by_index()..
>
> > + qcom->has_eusb2_phy = phy && (phy_get_type(phy) == PHY_TYPE_EUSB2);
>
> phy_get_type() and generally all PHY APIs accept nullptrs just fine,
> no need for the first check
>
Also, there may be merge conflict. Can you rebase this change on top of
Greg's usb-testing branch. Other than that, it looks good to me.
After applying the change and rebase, you can add this:
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Thanks,
Thinh
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
WARNING: multiple messages have this Message-ID (diff)
From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>,
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Cc: Vinod Koul <vkoul@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Manivannan Sadhasivam <mani@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"linux-phy@lists.infradead.org" <linux-phy@lists.infradead.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: Re: [PATCH v6 5/5] usb: dwc3: qcom: Modify interrupt handling for eUSB2 Phy targets
Date: Fri, 4 Sep 2026 23:07:47 +0000 [thread overview]
Message-ID: <aptOOZxuRzUy4kHT@vbox> (raw)
In-Reply-To: <3d31f750-750b-4561-96a3-d265b632da6d@oss.qualcomm.com>
On Wed, Sep 02, 2026, Konrad Dybcio wrote:
> On 8/26/26 7:02 PM, Krishna Kurapati wrote:
> > eUSB2 targets handle wakeup interrupts differently depending on device
> > speed when operating in host mode.
> >
> > According to the eUSB2 specification, remote wakeup signaling in host
> > mode is detected via different data-line assertions based on the
> > connected device speed.
> >
> > When a low-speed device is connected, the host repeater drives eD+ to
> > logic '1' upon detecting a K-state on the USB lines during remote wakeup
> > (eUSB2 specification, Section 5.5.14).
> >
> > When a full-speed or high-speed device is connected, the host repeater
> > drives eD- to logic '1' upon detecting a K-state on the USB line during
> > remote wakeup (eUSB2 specification, Sections 5.5.15 and 5.5.18).
> >
> > Since the eUSB2 PHY's "DP" and "DM" interrupt lines monitor the eD+ and
> > eD- line states, query the phy type and configure the wakeup interrupts
> > accordingly.
> >
> > Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
> > ---
>
> [...]
>
> > + phy = devm_of_phy_get_by_index(dev, dev->of_node, 0);
> > + if (IS_ERR(phy)) {
> > + if (PTR_ERR(phy) != -ENODEV) {
> > + ret = dev_err_probe(dev, PTR_ERR(phy),
> > + "failed to get usb2 phy\n");
> > + goto clk_disable;
> > + }
> > + phy = NULL;
> > + }
>
> Looks like we don't have a devm_of_phy_optional_get_by_index()..
>
> > + qcom->has_eusb2_phy = phy && (phy_get_type(phy) == PHY_TYPE_EUSB2);
>
> phy_get_type() and generally all PHY APIs accept nullptrs just fine,
> no need for the first check
>
Also, there may be merge conflict. Can you rebase this change on top of
Greg's usb-testing branch. Other than that, it looks good to me.
After applying the change and rebase, you can add this:
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Thanks,
Thinh
next prev parent reply other threads:[~2026-09-04 23:08 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-26 17:02 [PATCH v6 0/5] Modify interrupt handling for eUSB2 Phy targets Krishna Kurapati
2026-08-26 17:02 ` Krishna Kurapati
2026-08-26 17:02 ` [PATCH v6 1/5] dt-bindings: phy: Add PHY_TYPE_EUSB2 definition Krishna Kurapati
2026-08-26 17:02 ` Krishna Kurapati
2026-08-31 6:46 ` Krzysztof Kozlowski
2026-08-31 6:46 ` Krzysztof Kozlowski
2026-08-26 17:02 ` [PATCH v6 2/5] include: linux: phy: Add phy attribute "type" and associated helpers Krishna Kurapati
2026-08-26 17:02 ` Krishna Kurapati
2026-09-04 23:01 ` Thinh Nguyen
2026-09-04 23:01 ` Thinh Nguyen
2026-08-26 17:02 ` [PATCH v6 3/5] phy: snps-eusb2: Set phy type to EUSB2 Krishna Kurapati
2026-08-26 17:02 ` Krishna Kurapati
2026-09-04 23:02 ` Thinh Nguyen
2026-09-04 23:02 ` Thinh Nguyen
2026-08-26 17:02 ` [PATCH v6 4/5] phy: qcom: m31-eusb2: " Krishna Kurapati
2026-08-26 17:02 ` Krishna Kurapati
2026-08-26 17:10 ` sashiko-bot
2026-08-26 17:10 ` sashiko-bot
2026-09-04 23:02 ` Thinh Nguyen
2026-09-04 23:02 ` Thinh Nguyen
2026-08-26 17:02 ` [PATCH v6 5/5] usb: dwc3: qcom: Modify interrupt handling for eUSB2 Phy targets Krishna Kurapati
2026-08-26 17:02 ` Krishna Kurapati
2026-08-26 17:19 ` sashiko-bot
2026-08-26 17:19 ` sashiko-bot
2026-09-02 10:28 ` Konrad Dybcio
2026-09-02 10:28 ` Konrad Dybcio
2026-09-04 23:07 ` Thinh Nguyen [this message]
2026-09-04 23:07 ` Thinh Nguyen
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=aptOOZxuRzUy4kHT@vbox \
--to=thinh.nguyen@synopsys.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=krishna.kurapati@oss.qualcomm.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=mani@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=robh@kernel.org \
--cc=vkoul@kernel.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 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.