Re: [PATCH] usb: dwc3: debugfs: Dump internal states

2018-11-07 Thread Greg Kroah-Hartman
On Wed, Nov 07, 2018 at 12:45:50PM +0200, Felipe Balbi wrote: > > Hi, > > Greg Kroah-Hartman writes: > >> Thinh Nguyen writes: > >> > +static ssize_t dwc3_internal_states_write(struct file *file, > >> > +const char __user *ubuf, size_t count, loff_t *ppos) > >> why is

Re: [PATCH] usb: dwc3: debugfs: Dump internal states

2018-11-07 Thread Felipe Balbi
Hi, Greg Kroah-Hartman writes: >> Thinh Nguyen writes: >> > +static ssize_t dwc3_internal_states_write(struct file *file, >> > + const char __user *ubuf, size_t count, loff_t *ppos) >> why is this necessary? Seems like it would be nicer to create a >> directory

Re: [PATCH] usb: dwc3: debugfs: Dump internal states

2018-11-07 Thread Greg Kroah-Hartman
On Wed, Nov 07, 2018 at 08:39:41AM +0200, Felipe Balbi wrote: > > Hi, > > Thinh Nguyen writes: > > +static ssize_t dwc3_internal_states_write(struct file *file, > > + const char __user *ubuf, size_t count, loff_t *ppos) > why is this necessary? Seems like it would be

Re: [PATCH] usb: dwc3: debugfs: Dump internal states

2018-11-06 Thread Thinh Nguyen
Hi Felipe, On 11/5/2018 11:35 PM, Felipe Balbi wrote: > Hi, > > Thinh Nguyen writes: +static int dwc3_internal_states_show(struct seq_file *s, void *unused) +{ + struct dwc3 *dwc = s->private; + unsigned intcurrent_mode; + unsigned long

Re: [PATCH] usb: dwc3: debugfs: Dump internal states

2018-11-05 Thread Felipe Balbi
Hi, Thinh Nguyen writes: >>> +static int dwc3_internal_states_show(struct seq_file *s, void *unused) >>> +{ >>> + struct dwc3 *dwc = s->private; >>> + unsigned intcurrent_mode; >>> + unsigned long flags; >>> + u32 reg; >>> + >>> +

Re: [PATCH] usb: dwc3: debugfs: Dump internal states

2018-11-05 Thread Thinh Nguyen
Hi Felipe, On 11/5/2018 4:16 AM, Felipe Balbi wrote: > Hi, > > Thinh Nguyen writes: >> +static void dwc3_dump_gadget_internal_states(struct seq_file *s) >> +{ >> +struct dwc3 *dwc = s->private; >> +int num_selects = 16; >> +int i;

Re: [PATCH] usb: dwc3: debugfs: Dump internal states

2018-11-05 Thread Felipe Balbi
Hi, Thinh Nguyen writes: > +static void dwc3_dump_gadget_internal_states(struct seq_file *s) > +{ > + struct dwc3 *dwc = s->private; > + int num_selects = 16; > + int i; > + u32 reg; > + u64

[PATCH] usb: dwc3: debugfs: Dump internal states

2018-11-02 Thread Thinh Nguyen
To dump internal LSP and endpoint state debug registers, we must write to GDBGLSPMUX register. This patch correctly dump internal BMU, LSP, and endpoint states from the debug registers. If the controller is in device mode, all LSP and endpoint state registers will be dumped. In host mode, the