
20 Jun
2024
20 Jun
'24
1:54 p.m.
On 6/20/24 9:42 AM, Neil Armstrong wrote:
Remove the public phy_meson_gxl_usb2_set_mode and move the implementation in the the set_mode callback.
Signed-off-by: Neil Armstrong neil.armstrong@linaro.org
Reviewed-by: Marek Vasut marex@denx.de
-static int _phy_meson_gxl_usb2_set_mode(struct phy *phy, enum phy_mode mode, int submode) -{
if (submode)
return -EOPNOTSUPP;
switch (mode) {
case PHY_MODE_USB_DEVICE:
phy_meson_gxl_usb2_set_mode(phy, USB_DR_MODE_PERIPHERAL);
break;
case PHY_MODE_USB_HOST: case PHY_MODE_USB_OTG:
phy_meson_gxl_usb2_set_mode(phy, USB_DR_MODE_HOST);
val |= U2P_R0_DM_PULLDOWN;
val |= U2P_R0_DP_PULLDOWN;
btw this could be a one-liner val |= macro1 | macro2 ;