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

Commit ad3636ed authored by Pavankumar Kondeti's avatar Pavankumar Kondeti Committed by Stephen Boyd
Browse files

USB: ci13xxx_udc: Add module param to enable streaming mode



The streaming mode is disabled by default for ci13xxx_msm.  Add
a module param to enable streaming.  This module param overrides
flag.

This allows user space to enable streaming mode for selected USB
compositions.

CRs-Fixed: 429212
Change-Id: I9ee76841d7de9797452090e29d00d09385024ae5
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent 55bc2419
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -229,9 +229,6 @@ int hw_device_reset(struct ci13xxx *ci, u32 mode)
		ci->platdata->notify_event(ci,
			CI13XXX_CONTROLLER_RESET_EVENT);

	if (ci->platdata->flags & CI13XXX_DISABLE_STREAMING)
		hw_write(ci, OP_USBMODE, USBMODE_CI_SDIS, USBMODE_CI_SDIS);

	/* USBMODE should be configured step by step */
	hw_write(ci, OP_USBMODE, USBMODE_CM, USBMODE_CM_IDLE);
	hw_write(ci, OP_USBMODE, USBMODE_CM, mode);
+11 −0
Original line number Diff line number Diff line
@@ -31,6 +31,10 @@

#define ATDTW_SET_DELAY		100 /* 100msec delay */

/* Turns on streaming. overrides CI13XXX_DISABLE_STREAMING */
static unsigned int streaming;
module_param(streaming, uint, S_IRUGO | S_IWUSR);

/* control endpoint description */
static const struct usb_endpoint_descriptor
ctrl_endpt_out_desc = {
@@ -83,6 +87,13 @@ static inline int ep_to_bit(struct ci13xxx *ci, int n)
static int hw_device_state(struct ci13xxx *ci, u32 dma)
{
	if (dma) {
		if (streaming ||
		    !(ci->platdata->flags & CI13XXX_DISABLE_STREAMING))
			hw_write(ci, OP_USBMODE, USBMODE_CI_SDIS, 0);
		else
			hw_write(ci, OP_USBMODE, USBMODE_CI_SDIS,
					USBMODE_CI_SDIS);

		hw_write(ci, OP_ENDPTLISTADDR, ~0, dma);
		/* interrupt, error, port change, reset, sleep/suspend */
		hw_write(ci, OP_USBINTR, ~0,