aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/mtu3/mtu3_debugfs.c
AgeCommit message (Collapse)AuthorFilesLines
2022-07-08usb: mtu3: print endpoint type as stringChunfeng Yun1-4/+4
Print endpoint type as string instead of decimal value to make the log more readable. Signed-off-by: Chunfeng Yun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-06-03usb: mtu3: dump a status register of IPPCChunfeng Yun1-0/+1
Add a SSUSB_IP_PW_STS1 register to show ip sleep status Signed-off-by: Chunfeng Yun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2020-12-07usb: mtu3: fix memory corruption in mtu3_debugfs_regset()Dan Carpenter1-1/+1
This code is using the wrong sizeof() so it does not allocate enough memory. It allocates 32 bytes but 72 are required. That will lead to memory corruption. Fixes: ae07809255d3 ("usb: mtu3: add debugfs interface files") Signed-off-by: Dan Carpenter <[email protected]> Link: https://lore.kernel.org/r/X8ikqc4Mo2/0G72j@mwanda Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2020-05-14usb: mtu3: constify struct debugfs_reg32Rikard Falkeborn1-2/+2
mtu3_prb_regs is never changed and can therefore be made const. This allows the compiler to put it in the text section instead of the data section. Before: text data bss dec hex filename 19966 7120 0 27086 69ce drivers/usb/mtu3/mtu3_debugfs.o After: text data bss dec hex filename 20142 6992 0 27134 69fe drivers/usb/mtu3/mtu3_debugfs.o Signed-off-by: Rikard Falkeborn <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2019-09-03usb: mtu3: register a USB Role Switch for dual role modeChunfeng Yun1-2/+2
Because extcon is not allowed for new bindings, and the dual role switch is supported by USB Role Switch, especially for Type-C drivers, so register a USB Role Switch to support the new way Signed-off-by: Chunfeng Yun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-10Revert "usb: mtu3: fix up undefined reference to usb_debug_root"Chunfeng Yun1-1/+2
It's not needed after [1] is applied, because usb_debug_root is created by usb common core but not usbcore now. [1] 812086d362a1 ("USB: move usb debugfs directory creation to the usb common core") Signed-off-by: Chunfeng Yun <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-05-21usb: mtu3: fix up undefined reference to usb_debug_rootChunfeng Yun1-2/+1
When CONFIG_USB is not set, and CONFIG_USB_GADGET is set, there is an issue: ld: drivers/usb/mtu3/mtu3_debugfs.o: in function 'ssusb_debugfs_create_root': mtu3_debugfs.c:(.text+0xba3): undefined reference to 'usb_debug_root' usb_debug_root is only built when CONFIG_USB is enabled, so here drop it and use NULL instead. Reported-by: Randy Dunlap <[email protected]> Signed-off-by: Chunfeng Yun <[email protected]> Acked-by: Randy Dunlap <[email protected]> # build-tested Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-03-26usb: mtu3: move vbus and mode debugfs interfaces into mtu3_debugfs.cChunfeng Yun1-0/+101
Due to the separated debugfs files are added, move vbus and mode debugfs interfaces related with dual-role switch from mtu3_dr.c into mtu3_debugfs.c Signed-off-by: Chunfeng Yun <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-03-26usb: mtu3: add debugfs interface filesChunfeng Yun1-0/+438
This adds more debugfs consumers. The debugfs entries read some important registers, fifo status, QMU ring, endpoint status, and IPPC probe interface to get internal status. With these entries, users can check the registers, endpoint and GPD used during run time. Signed-off-by: Chunfeng Yun <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>