On Wed, Sep 02, 2026, Konrad Dybcio wrote:
On 8/26/26 7:02 PM, Krishna Kurapati wrote:
quoted
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 <redacted>
---
[...]
quoted
+ 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()..
quoted
+ 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