OSDN Git Service

usb: gadget: udc: renesas_usb3: add debugfs to set the b-device mode
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Fri, 4 Aug 2017 02:16:56 +0000 (11:16 +0900)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Wed, 9 Aug 2017 10:12:06 +0000 (13:12 +0300)
commit43ba968b00ea4d0876f4074e190ad98aefaba25d
treef5c38bbad1855d888d4c678fbb93e35b67c9cd75
parent7d343a6a88d40b12f882ffd99aa79ef70a3849d2
usb: gadget: udc: renesas_usb3: add debugfs to set the b-device mode

This patch adds debugfs to set the "b-device" mode for using a board
which is not connected to the ID pin (e.g. CN11 on Salvator-X).
If we want to use peripheral mode on such a board, we have to disable
VBUS output first. So, this patch can set such a mode as the following:

 # mount -t debugfs none /sys/kernel/debug
 # modprobe renesas_usb3
 # modprobe g_mass_storage file=/dev/shm/test.bin
 # echo 1 > /sys/kernel/debug/ee020000.usb/b_device

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/udc/renesas_usb3.c