diff options
| author | Thierry Reding <treding@nvidia.com> | 2026-05-04 22:40:48 +0200 |
|---|---|---|
| committer | Thierry Reding <treding@nvidia.com> | 2026-05-04 22:40:48 +0200 |
| commit | b4890d2ec2a1237c59ef89e1725bd04b9c4b30ca (patch) | |
| tree | db37250dbd02cebe5ca37189e9952c65e28e6a92 | |
| parent | b509d0de6132c193d0b12bec4388283949800fb3 (diff) | |
| parent | f67ab4706ab72af29c331b21f431c463b00d447a (diff) | |
| download | linux-next-b4890d2ec2a1237c59ef89e1725bd04b9c4b30ca.tar.gz linux-next-b4890d2ec2a1237c59ef89e1725bd04b9c4b30ca.zip | |
Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.git
| -rw-r--r-- | drivers/phy/phy-airoha-pcie-regs.h | 2 | ||||
| -rw-r--r-- | drivers/phy/renesas/phy-rcar-gen3-usb2.c | 10 |
2 files changed, 5 insertions, 7 deletions
diff --git a/drivers/phy/phy-airoha-pcie-regs.h b/drivers/phy/phy-airoha-pcie-regs.h index b938a7b468fe..58572c793722 100644 --- a/drivers/phy/phy-airoha-pcie-regs.h +++ b/drivers/phy/phy-airoha-pcie-regs.h @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0-only +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (c) 2024 AIROHA Inc * Author: Lorenzo Bianconi <lorenzo@kernel.org> diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c index 79e820e2fe55..9a45d840efeb 100644 --- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c +++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c @@ -314,13 +314,11 @@ static void rcar_gen3_init_from_a_peri_to_a_host(struct rcar_gen3_chan *ch) static bool rcar_gen3_check_id(struct rcar_gen3_chan *ch) { if (ch->phy_data->vblvl_ctrl) { - bool vbus_valid; - bool device; + u32 val = readl(ch->base + USB2_ADPCTRL); + bool vbus_valid = val & USB2_ADPCTRL_VBUSVALID; + bool device = val & USB2_ADPCTRL_IDDIG; - device = !!(readl(ch->base + USB2_ADPCTRL) & USB2_ADPCTRL_IDDIG); - vbus_valid = !!(readl(ch->base + USB2_ADPCTRL) & USB2_ADPCTRL_VBUSVALID); - - return vbus_valid ? device : !device; + return device == vbus_valid; } if (!ch->uses_otg_pins) |
