usb:gadget Separated decoding functions from dwc3 driver.
authorPawel Laszczak <pawell@cadence.com>
Tue, 2 Jul 2019 13:37:58 +0000 (14:37 +0100)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Wed, 3 Jul 2019 07:45:58 +0000 (10:45 +0300)
commit3db1b636c07e15ff7410db782832dc2e7ffd2bce
treef0f14d806efed42f28323299db8a0a7e30c062d4
parente8a8b40cc8922b38f91c6562d525f21f312f235c
usb:gadget Separated decoding functions from dwc3 driver.

Patch moves some decoding functions from driver/usb/dwc3/debug.h driver
to driver/usb/gadget/debug.c file. These moved functions include:
    dwc3_decode_get_status
    dwc3_decode_set_clear_feature
    dwc3_decode_set_address
    dwc3_decode_get_set_descriptor
    dwc3_decode_get_configuration
    dwc3_decode_set_configuration
    dwc3_decode_get_intf
    dwc3_decode_set_intf
    dwc3_decode_synch_frame
    dwc3_decode_set_sel
    dwc3_decode_set_isoch_delay
    dwc3_decode_ctrl

These functions are used also in inroduced cdns3 driver.

All functions prefixes were changed from dwc3 to usb.
Also, function's parameters has been extended according to the name
of fields in standard SETUP packet.
Additionally, patch adds usb_decode_ctrl function to
include/linux/usb/gadget.h file.

Signed-off-by: Pawel Laszczak <pawell@cadence.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/debug.h
drivers/usb/dwc3/trace.h
drivers/usb/gadget/Makefile
drivers/usb/gadget/debug.c [new file with mode: 0644]
include/linux/usb/gadget.h