Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1341205
| From | Doug Anderson <dianders@chromium.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH RESEND 2/2] usb: dwc2: Move host-specific core functions into hcd.c |
| Date | 2016-02-24 01:30 +0100 |
| Message-ID | <r5vv4-4S2-9@gated-at.bofh.it> (permalink) |
| References | <r5sQy-2Oz-11@gated-at.bofh.it> <r5sQy-2Oz-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
John, On Tue, Feb 23, 2016 at 1:33 PM, John Youn <johnyoun@synopsys.com> wrote: > +u32 dwc2_calc_frame_interval(struct dwc2_hsotg *hsotg) You seem to have lost the function comments for dwc2_calc_frame_interval(). Was that intentional? If not, can you add them back? > +/** > + * dwc2_hc_do_ping() - Starts a PING transfer > + * > + * @hsotg: Programming view of DWC_otg controller > + * @chan: Information needed to initialize the host channel > + * > + * This function should only be called in Slave mode. The Do Ping bit is set in > + * the HCTSIZ register, then the channel is enabled. > + */ > +void dwc2_hc_do_ping(struct dwc2_hsotg *hsotg, struct dwc2_host_chan *chan) Presumably can be static? ...and remove prototype from "core.h"? > +/** > + * dwc2_core_init() - Initializes the DWC_otg controller registers and > + * prepares the core for device mode or host mode operation > + * > + * @hsotg: Programming view of the DWC_otg controller > + * @initial_setup: If true then this is the first init for this instance. > + */ > +int dwc2_core_init(struct dwc2_hsotg *hsotg, bool initial_setup) Presumably can be static? ...and remove prototype from "core.h"? > +/** > + * dwc2_core_host_init() - Initializes the DWC_otg controller registers for > + * Host mode > + * > + * @hsotg: Programming view of DWC_otg controller > + * > + * This function flushes the Tx and Rx FIFOs and flushes any entries in the > + * request queues. Host channels are reset to ensure that they are ready for > + * performing transfers. > + */ > +void dwc2_core_host_init(struct dwc2_hsotg *hsotg) Presumably can be static? ...and remove prototype from "core.h"? Other than those nits, things look good. I didn't analyze exactly where you placed all the functions but a quick glance shows that they seem sanely organized. :) I picked these back to my chromeos-3.14 kernel (with many many dwc2 backports) and I confirmed that I can still compile the kernel, boot it, and use USB. I also confirmed no warnings were introduced for me. I'm only testing HOST, not gadget mode. Feel free to add my Reviewed-by and Tested-by once nits are fixed up. -Doug
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH RESEND 0/2] usb: dwc2: Remove host and gadget only code from core John Youn <johnyoun@synopsys.com> - 2016-02-23 22:40 +0100 Re: [PATCH RESEND 2/2] usb: dwc2: Move host-specific core functions into hcd.c Doug Anderson <dianders@chromium.org> - 2016-02-24 01:30 +0100
csiph-web