usb: dwc2: Add dwc2_gadget_dec_frame_num_by_one() function
authorGrigor Tovmasyan <Grigor.Tovmasyan@synopsys.com>
Wed, 29 Aug 2018 17:00:03 +0000 (21:00 +0400)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 2 Oct 2018 07:49:38 +0000 (10:49 +0300)
commit9d630b9cde28dc261cdfc608ed68ef5487404422
tree10704131d44aec15380821e82a50c72151ee2331
parentca531bc2bfa655a1a0acaac4f7a6ea4b2111cc43
usb: dwc2: Add dwc2_gadget_dec_frame_num_by_one() function

Added dwc2_gadget_dec_frame_num_by_one() function in gadget.c.
This function will be used to calculate descriptor frame number field
value. For service interval mode frame number in descriptor should point
to last (u)frame in the interval.

Acked-by: Minas Harutyunyan <hminas@synopsys.com>
Signed-off-by: Grigor Tovmasyan <tovmasya@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc2/gadget.c