usb: chipidea: imx: get available runtime dr mode for wakeup setting

If runtime dr_mode is not dual-role, it doesn't need to enable ID
wakeup interrupt.
If runtime dr_mode is host, it doesn't need to enable VBUS
wakeup interrupt.
With these changes, the user will not get the unexpected wakeup
for single role use case. For example, the host-only use case at
Micro-AB port, the controller should not be waken up by only
plug in Micro-AB cable or the Micro-B cable with host.
Signed-off-by: Peter Chen <peter.chen@nxp.com>
This commit is contained in:
Peter Chen
2020-07-28 14:12:11 +08:00
부모 62b9825827
커밋 d6f93d2100
3개의 변경된 파일7개의 추가작업 그리고 2개의 파일을 삭제

파일 보기

@@ -25,6 +25,7 @@ struct imx_usbmisc_data {
unsigned int ext_id:1; /* ID from exteranl event */
unsigned int ext_vbus:1; /* Vbus from exteranl event */
struct usb_phy *usb_phy;
enum usb_dr_mode available_role; /* runtime usb dr mode */
};
int imx_usbmisc_init(struct imx_usbmisc_data *data);