Skip to content

Commit c6f5c05

Browse files
Mian Yousaf KaukabFelipe Balbi
authored andcommitted
usb: dwc2: gadget: add bi-directional endpoint support
GHWCFG1 provides hardware configuration of each endpoint. Use it to configure the endpoints instead of assuming all even endpoint are OUT and all odd endpoints are IN. Tested-by: Robert Baldyga <[email protected]> Acked-by: Paul Zimmerman <[email protected]> Signed-off-by: Mian Yousaf Kaukab <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
1 parent b2f93ef commit c6f5c05

File tree

2 files changed

+210
-119
lines changed

2 files changed

+210
-119
lines changed

drivers/usb/dwc2/core.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,8 @@ struct dwc2_hsotg {
696696
unsigned int connected:1;
697697
unsigned int setup:1;
698698
unsigned long last_rst;
699-
struct s3c_hsotg_ep *eps;
699+
struct s3c_hsotg_ep *eps_in[MAX_EPS_CHANNELS];
700+
struct s3c_hsotg_ep *eps_out[MAX_EPS_CHANNELS];
700701
u32 g_using_dma;
701702
#endif /* CONFIG_USB_DWC2_PERIPHERAL || CONFIG_USB_DWC2_DUAL_ROLE */
702703
};

0 commit comments

Comments
 (0)