Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c3a2ae17 authored by Manu Gautam's avatar Manu Gautam Committed by Matt Wagantall
Browse files

USB: gadget: Add support for UI interrupts counting



Add counting of UI or USB transfers completion interrupts
so that it can be used to determine USB transfers or
BUS usage. This is a simple approach which gives
reasonable accuracy to avoid counting actual bytes
that got transferred over USB.

Change-Id: I1ee3c6997e40ee5db1da26af1e68fced06ea2de4
Signed-off-by: default avatarManu Gautam <mgautam@codeaurora.org>
parent 64b410bf
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -527,6 +527,7 @@ struct usb_gadget_ops {
 *	enabled HNP support.
 * @quirk_ep_out_aligned_size: epout requires buffer size to be aligned to
 *	MaxPacketSize.
 * @xfer_isr_count: UI (transfer complete) interrupts count
 *
 * Gadgets have a mostly-portable "gadget driver" implementing device
 * functions, handling all usb configurations and interfaces.  Gadget
@@ -568,6 +569,7 @@ struct usb_gadget {
	unsigned			a_alt_hnp_support:1;
	unsigned			quirk_ep_out_aligned_size:1;
	bool				remote_wakeup;
	u32				xfer_isr_count;
};
#define work_to_gadget(w)	(container_of((w), struct usb_gadget, work))