MLK-22562 usb:common Separated decoding functions from dwc3 driver.
authorPawel Laszczak <pawell@cadence.com>
Sun, 21 Jul 2019 18:32:15 +0000 (19:32 +0100)
committerLeonard Crestez <leonard.crestez@nxp.com>
Thu, 5 Sep 2019 12:27:27 +0000 (15:27 +0300)
commit8cf084d26f541f33b85e31f47152093e712f8ea9
tree264ac29bef41736fd44183d2eca4614ea97a144a
parent6bf880792149920c6a8982b3c30f6a043368154c
MLK-22562 usb:common Separated decoding functions from dwc3 driver.

Patch moves some decoding functions from driver/usb/dwc3/debug.h driver
to driver/usb/common/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/ch9.h file.

Signed-off-by: Pawel Laszczak <pawell@cadence.com>
(cherry picked from commit 046b47df488c6956b9a4420e684274cc0ca0fb70)
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Peter Chen <peter.chen@nxp.com>
drivers/usb/common/Makefile
drivers/usb/common/debug.c [new file with mode: 0644]
drivers/usb/dwc3/debug.h
drivers/usb/dwc3/trace.h
include/linux/usb/ch9.h