Re: [PATCH v2 3/5] phy: meson-gxl-usb2: remove phy_meson_gxl_usb2_set_mode

Marek Vasut <[email protected]>
Newsgroups io.groups.u-boot-amlogic,org.u-boot-project.lists.u-boot
Message-ID <[email protected]>
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 <[email protected]>

Reviewed-by: Marek Vasut <[email protected]>

> -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 ;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.