Discussion:
[PATCH 00/67] usb: pending changes for next merge window
(too old to reply)
Felipe Balbi
2014-10-17 17:16:07 UTC
Permalink
Raw Message
Hi folks,

here's a giant set of patches which I already have pending
for v3.19 merge window. They still sit in my testing/next
and will only be moved to next once all fixes reach v3.18-rc.

Until then, I will keep rebasing them.

Note that for this set to properly work, we are still pending
a fix being reworked by Marek Szyprowski. As long as you don't
build dwc2, everything should work fine, however.

Please test. I mean it. Don't want nobody whinning after these
patches are moved to my 'next' branch; so please go ahead and
test.

Andrzej Pietrasiewicz (1):
usb: gadget: configfs: add suspend/resume

Dan Carpenter (1):
usb: gadget: f_uac1: remove an unneeded NULL check

Felipe Balbi (36):
usb: dwc3: core: write LINUX_VERSION_CODE to our GUID register
usb: dwc3: trace: remove unnecessary newline character
usb: gadget: composite: introduce setup and os_desc pending flags
usb: gadget: composite: set our req->context to cdev
usb: gadget: composite: conditionally dequeue os_desc and setup
requests
usb: dwc3: ep0: trace ep0 TRBs too
usb: dwc3: get rid of ->prepare()/->complete()
usb: gadget: udc-core: call ->disconnect() when soft disconnecting
usb: gadget: udc: document our sysfs ABI
usb: dwc3: gadget: set state to NOT_ATTACHED on disconnect_irq
usb: dwc3: gadget: WARN() on bogus usb_ep_queue()
usb: gadget: udc: amd5536: do not rely on 'driver' argument
usb: gadget: udc: at91: do not rely on 'driver' argument
usb: gadget: udc: dummy: do not rely on 'driver' argument
usb: gadget: udc: fsl_qe: do not rely on 'driver' argument
usb: gadget: udc: lpc32xx: do not rely on 'driver' argument
usb: gadget: udc: mv_u3d: do not rely on 'driver' argument
usb: gadget: udc: mv_udc: do not rely on 'driver' argument
usb: gadget: udc: net2272: do not rely on 'driver' argument
usb: gadget: udc: net2280: do not rely on 'driver' argument
usb: gadget: udc: pxa25x: do not rely on 'driver' argument
usb: gadget: udc: pxa27x: do not rely on 'driver' argument
usb: gadget: udc: s3c-hsudc: do not rely on 'driver' argument
usb: musb: gadget: do not rely on 'driver' argument
usb: gadget: udc: pass a single argument to usb_gadget_udc_start/stop
usb: gadget: udc: at91: remove bind/unbind messages
usb: gadget: udc: atmel_usba: remove bind/unbind messages
usb: gadget: udc: dummy: remove bind/unbind messages
usb: gadget: udc: fsl_qe: remove bind/unbind messages
usb: gadget: udc: gr_udc: remove bind/unbind messages
usb: gadget: udc: net2272: remove bind/unbind messages
usb: gadget: udc: net2280: remove bind/unbind messages
usb: gadget: udc: s3c-hsudc: remove bind/unbind messages
usb: musb: gadget: remove bind/unbind messages
usb: gadget: udc: core: fix unregistering message
usb: gadget: remove unnecessary 'driver' argument

George Cherian (1):
usb: dwc3: dwc3-omap: get rid of ->prepare()/->complete()

Heikki Krogerus (3):
ACPI: platform: provide default DMA mask
usb: dwc3: core: only setting the dma_mask when needed
usb: dwc3: add ACPI support

Peter Chen (18):
usb: gadget: mv_udc_core: delete unnecessary 'out of memory' messages
usb: gadget: fsl_qe_udc: delete unnecessary 'out of memory' messages
usb: gadget: bcm63xx_udc: delete unnecessary 'out of memory' messages
usb: gadget: s3c-hsudc: delete unnecessary 'out of memory' messages
usb: musb: davinci: delete unnecessary 'out of memory' messages
usb: musb: ux500: delete unnecessary 'out of memory' messages
usb: musb: omap2430: delete unnecessary 'out of memory' messages
usb: musb: blackfin: delete unnecessary 'out of memory' messages
usb: musb: tusb6010: delete unnecessary 'out of memory' messages
usb: musb: musb_dsps: delete unnecessary 'out of memory' messages
usb: phy: phy-rcar-usb: delete unnecessary 'out of memory' messages
usb: phy: phy-tegra-usb: delete unnecessary 'out of memory' messages
usb: phy: phy-am335x-control: delete unnecessary 'out of memory'
messages
usb: phy: phy-rcar-gen2-usb: delete unnecessary 'out of memory'
messages
usb: phy: phy-mxs-usb: delete unnecessary 'out of memory' messages
usb: phy: phy-msm-usb: delete unnecessary 'out of memory' messages
usb: phy: phy-mv-usb: delete unnecessary 'out of memory' messages
usb: renesas_usbhs: delete unnecessary 'out of memory' messages

Robert Jarzmik (3):
usb: gadget: pxa27x_udc: prepare device-tree support
usb: gadget: pxa27x_udc: transfer mach_info into pxa_udc
usb: gadget: pxa27x_udc: add devicetree support

Vinod Koul (1):
usb: musb: ux500_dma: use dmaengine_xxx() APIs

Yoshihiro Shimoda (3):
usb: renesas_usbhs: rename phy to usb_phy in usbhs_priv
usb: renesas_usbhs: clean up rcar2.c to support a generic PHY
usb: renesas_usbhs: add support for generic PHY

Documentation/ABI/stable/sysfs-class-udc | 93 ++++++++++++++++++++++++++++++++
drivers/acpi/acpi_platform.c | 2 +
drivers/usb/chipidea/udc.c | 6 +--
drivers/usb/dwc2/gadget.c | 3 +-
drivers/usb/dwc3/core.c | 78 ++++++++++-----------------
drivers/usb/dwc3/core.h | 11 ----
drivers/usb/dwc3/dwc3-omap.c | 20 +------
drivers/usb/dwc3/ep0.c | 24 +++++----
drivers/usb/dwc3/gadget.c | 28 +++++-----
drivers/usb/dwc3/trace.h | 8 +--
drivers/usb/gadget/composite.c | 64 +++++++++++++++++++---
drivers/usb/gadget/configfs.c | 3 ++
drivers/usb/gadget/function/u_uac1.c | 3 --
drivers/usb/gadget/udc/amd5536udc.c | 10 ++--
drivers/usb/gadget/udc/at91_udc.c | 9 ++--
drivers/usb/gadget/udc/atmel_usba_udc.c | 11 ++--
drivers/usb/gadget/udc/bcm63xx_udc.c | 7 +--
drivers/usb/gadget/udc/dummy_hcd.c | 14 ++---
drivers/usb/gadget/udc/fotg210-udc.c | 3 +-
drivers/usb/gadget/udc/fsl_qe_udc.c | 11 +---
drivers/usb/gadget/udc/fsl_udc_core.c | 8 ++-
drivers/usb/gadget/udc/fusb300_udc.c | 3 +-
drivers/usb/gadget/udc/goku_udc.c | 6 +--
drivers/usb/gadget/udc/gr_udc.c | 8 +--
drivers/usb/gadget/udc/lpc32xx_udc.c | 8 +--
drivers/usb/gadget/udc/m66592-udc.c | 3 +-
drivers/usb/gadget/udc/mv_u3d_core.c | 5 +-
drivers/usb/gadget/udc/mv_udc_core.c | 13 ++---
drivers/usb/gadget/udc/net2272.c | 11 ++--
drivers/usb/gadget/udc/net2280.c | 16 ++----
drivers/usb/gadget/udc/omap_udc.c | 6 +--
drivers/usb/gadget/udc/pch_udc.c | 7 ++-
drivers/usb/gadget/udc/pxa25x_udc.c | 8 ++-
drivers/usb/gadget/udc/pxa27x_udc.c | 78 +++++++++++++++------------
drivers/usb/gadget/udc/pxa27x_udc.h | 6 ++-
drivers/usb/gadget/udc/r8a66597-udc.c | 3 +-
drivers/usb/gadget/udc/s3c-hsudc.c | 16 ++----
drivers/usb/gadget/udc/s3c2410_udc.c | 6 +--
drivers/usb/gadget/udc/udc-core.c | 24 ++++-----
drivers/usb/gadget/udc/udc-xilinx.c | 3 +-
drivers/usb/musb/blackfin.c | 8 +--
drivers/usb/musb/davinci.c | 4 +-
drivers/usb/musb/musb_dsps.c | 5 +-
drivers/usb/musb/musb_gadget.c | 13 ++---
drivers/usb/musb/omap2430.c | 19 ++-----
drivers/usb/musb/tusb6010.c | 4 +-
drivers/usb/musb/ux500.c | 4 +-
drivers/usb/musb/ux500_dma.c | 7 +--
drivers/usb/phy/phy-am335x-control.c | 4 +-
drivers/usb/phy/phy-msm-usb.c | 12 ++---
drivers/usb/phy/phy-mv-usb.c | 4 +-
drivers/usb/phy/phy-mxs-usb.c | 4 +-
drivers/usb/phy/phy-rcar-gen2-usb.c | 4 +-
drivers/usb/phy/phy-rcar-usb.c | 4 +-
drivers/usb/phy/phy-tegra-usb.c | 9 +---
drivers/usb/renesas_usbhs/common.c | 4 +-
drivers/usb/renesas_usbhs/common.h | 3 +-
drivers/usb/renesas_usbhs/mod_gadget.c | 3 +-
drivers/usb/renesas_usbhs/rcar2.c | 73 ++++++++++++++++++-------
include/linux/usb/composite.h | 7 +++
include/linux/usb/gadget.h | 3 +-
61 files changed, 423 insertions(+), 421 deletions(-)
create mode 100644 Documentation/ABI/stable/sysfs-class-udc
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:14 UTC
Permalink
Raw Message
by doing that we will be able to match our
requests against req and os_desc_req and also
clear our pending flags from complete callback.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/composite.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index f6a51fd..09602dc 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -1428,6 +1428,7 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
* when we delegate to it.
*/
req->zero = 0;
+ req->context = cdev;
req->complete = composite_setup_complete;
req->length = 0;
gadget->ep0->driver_data = cdev;
@@ -1624,6 +1625,7 @@ unknown:
int count = 0;

req = cdev->os_desc_req;
+ req->context = cdev;
req->complete = composite_setup_complete;
buf = req->buf;
os_desc_cfg = cdev->os_desc_config;
@@ -1686,6 +1688,7 @@ unknown:
break;
}
req->length = value;
+ req->context = cdev;
req->zero = value < w_length;
value = usb_ep_queue(gadget->ep0, req, GFP_ATOMIC);
if (value < 0) {
@@ -1757,6 +1760,7 @@ unknown:
/* respond with data transfer before status phase? */
if (value >= 0 && value != USB_GADGET_DELAYED_STATUS) {
req->length = value;
+ req->context = cdev;
req->zero = value < w_length;
value = usb_ep_queue(gadget->ep0, req, GFP_ATOMIC);
if (value < 0) {
@@ -1893,6 +1897,7 @@ int composite_dev_prepare(struct usb_composite_driver *composite,
goto fail_dev;

cdev->req->complete = composite_setup_complete;
+ cdev->req->context = cdev;
gadget->ep0->driver_data = cdev;

cdev->driver = composite;
@@ -1937,6 +1942,7 @@ int composite_os_desc_req_prepare(struct usb_composite_dev *cdev,
kfree(cdev->os_desc_req);
goto end;
}
+ cdev->os_desc_req->context = cdev;
cdev->os_desc_req->complete = composite_setup_complete;
end:
return ret;
@@ -2158,6 +2164,7 @@ void usb_composite_setup_continue(struct usb_composite_dev *cdev)
} else if (--cdev->delayed_status == 0) {
DBG(cdev, "%s: Completing delayed status\n", __func__);
req->length = 0;
+ req->context = cdev;
value = usb_ep_queue(cdev->gadget->ep0, req, GFP_ATOMIC);
if (value < 0) {
DBG(cdev, "ep_queue --> %d\n", value);
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:09 UTC
Permalink
Raw Message
tracing infrastructure already adds those for us.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/dwc3/ep0.c | 18 +++++++++---------
drivers/usb/dwc3/trace.h | 8 ++++----
2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c
index 0a34e71..ee216c6 100644
--- a/drivers/usb/dwc3/ep0.c
+++ b/drivers/usb/dwc3/ep0.c
@@ -700,35 +700,35 @@ static int dwc3_ep0_std_request(struct dwc3 *dwc, struct usb_ctrlrequest *ctrl)

switch (ctrl->bRequest) {
case USB_REQ_GET_STATUS:
- dwc3_trace(trace_dwc3_ep0, "USB_REQ_GET_STATUS\n");
+ dwc3_trace(trace_dwc3_ep0, "USB_REQ_GET_STATUS");
ret = dwc3_ep0_handle_status(dwc, ctrl);
break;
case USB_REQ_CLEAR_FEATURE:
- dwc3_trace(trace_dwc3_ep0, "USB_REQ_CLEAR_FEATURE\n");
+ dwc3_trace(trace_dwc3_ep0, "USB_REQ_CLEAR_FEATURE");
ret = dwc3_ep0_handle_feature(dwc, ctrl, 0);
break;
case USB_REQ_SET_FEATURE:
- dwc3_trace(trace_dwc3_ep0, "USB_REQ_SET_FEATURE\n");
+ dwc3_trace(trace_dwc3_ep0, "USB_REQ_SET_FEATURE");
ret = dwc3_ep0_handle_feature(dwc, ctrl, 1);
break;
case USB_REQ_SET_ADDRESS:
- dwc3_trace(trace_dwc3_ep0, "USB_REQ_SET_ADDRESS\n");
+ dwc3_trace(trace_dwc3_ep0, "USB_REQ_SET_ADDRESS");
ret = dwc3_ep0_set_address(dwc, ctrl);
break;
case USB_REQ_SET_CONFIGURATION:
- dwc3_trace(trace_dwc3_ep0, "USB_REQ_SET_CONFIGURATION\n");
+ dwc3_trace(trace_dwc3_ep0, "USB_REQ_SET_CONFIGURATION");
ret = dwc3_ep0_set_config(dwc, ctrl);
break;
case USB_REQ_SET_SEL:
- dwc3_trace(trace_dwc3_ep0, "USB_REQ_SET_SEL\n");
+ dwc3_trace(trace_dwc3_ep0, "USB_REQ_SET_SEL");
ret = dwc3_ep0_set_sel(dwc, ctrl);
break;
case USB_REQ_SET_ISOCH_DELAY:
- dwc3_trace(trace_dwc3_ep0, "USB_REQ_SET_ISOCH_DELAY\n");
+ dwc3_trace(trace_dwc3_ep0, "USB_REQ_SET_ISOCH_DELAY");
ret = dwc3_ep0_set_isoch_delay(dwc, ctrl);
break;
default:
- dwc3_trace(trace_dwc3_ep0, "Forwarding to gadget driver\n");
+ dwc3_trace(trace_dwc3_ep0, "Forwarding to gadget driver");
ret = dwc3_ep0_delegate_req(dwc, ctrl);
break;
}
@@ -874,7 +874,7 @@ static void dwc3_ep0_complete_status(struct dwc3 *dwc,

status = DWC3_TRB_SIZE_TRBSTS(trb->size);
if (status == DWC3_TRBSTS_SETUP_PENDING)
- dwc3_trace(trace_dwc3_ep0, "Setup Pending received\n");
+ dwc3_trace(trace_dwc3_ep0, "Setup Pending received");

dwc->ep0state = EP0_SETUP_PHASE;
dwc3_ep0_out_start(dwc);
diff --git a/drivers/usb/dwc3/trace.h b/drivers/usb/dwc3/trace.h
index 60b0f41..7a9d780 100644
--- a/drivers/usb/dwc3/trace.h
+++ b/drivers/usb/dwc3/trace.h
@@ -61,7 +61,7 @@ DECLARE_EVENT_CLASS(dwc3_log_event,
TP_fast_assign(
__entry->event = event;
),
- TP_printk("event %08x\n", __entry->event)
+ TP_printk("event %08x", __entry->event)
);

DEFINE_EVENT(dwc3_log_event, dwc3_event,
@@ -157,7 +157,7 @@ DECLARE_EVENT_CLASS(dwc3_log_generic_cmd,
__entry->cmd = cmd;
__entry->param = param;
),
- TP_printk("cmd '%s' [%d] param %08x\n",
+ TP_printk("cmd '%s' [%d] param %08x",
dwc3_gadget_generic_cmd_string(__entry->cmd),
__entry->cmd, __entry->param
)
@@ -182,7 +182,7 @@ DECLARE_EVENT_CLASS(dwc3_log_gadget_ep_cmd,
__entry->cmd = cmd;
__entry->params = params;
),
- TP_printk("%s: cmd '%s' [%d] params %08x %08x %08x\n",
+ TP_printk("%s: cmd '%s' [%d] params %08x %08x %08x",
__get_str(name), dwc3_gadget_ep_cmd_string(__entry->cmd),
__entry->cmd, __entry->params->param0,
__entry->params->param1, __entry->params->param2
@@ -214,7 +214,7 @@ DECLARE_EVENT_CLASS(dwc3_log_trb,
__entry->size = trb->size;
__entry->ctrl = trb->ctrl;
),
- TP_printk("%s: trb %p bph %08x bpl %08x size %08x ctrl %08x\n",
+ TP_printk("%s: trb %p bph %08x bpl %08x size %08x ctrl %08x",
__get_str(name), __entry->trb, __entry->bph, __entry->bpl,
__entry->size, __entry->ctrl
)
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:13 UTC
Permalink
Raw Message
These flags we be set to true whenever their
matching request is queued. They will be cleared
to false when that request completes.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
include/linux/usb/composite.h | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h
index c330f5e..ed3811c 100644
--- a/include/linux/usb/composite.h
+++ b/include/linux/usb/composite.h
@@ -427,6 +427,8 @@ static inline struct usb_composite_driver *to_cdriver(
* @b_vendor_code: bMS_VendorCode part of the OS string
* @use_os_string: false by default, interested gadgets set it
* @os_desc_config: the configuration to be used with OS descriptors
+ * @setup_pending: true when setup request is queued but not completed
+ * @os_desc_pending: true when os_desc request is queued but not completed
*
* One of these devices is allocated and initialized before the
* associated device driver's bind() is called.
@@ -488,6 +490,9 @@ struct usb_composite_dev {

/* protects deactivations and delayed_status counts*/
spinlock_t lock;
+
+ unsigned setup_pending:1;
+ unsigned os_desc_pending:1;
};

extern int usb_string_id(struct usb_composite_dev *c);
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:11 UTC
Permalink
Raw Message
From: Heikki Krogerus <heikki.krogerus-VuQAYsv1563Yd54FQh9/***@public.gmane.org>

If the probe drivers have already set the dma_mask, not
replacing the value.

Signed-off-by: Heikki Krogerus <heikki.krogerus-VuQAYsv1563Yd54FQh9/***@public.gmane.org>
Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/dwc3/core.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index ddfe771..1384300 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -715,9 +715,11 @@ static int dwc3_probe(struct platform_device *pdev)
spin_lock_init(&dwc->lock);
platform_set_drvdata(pdev, dwc);

- dev->dma_mask = dev->parent->dma_mask;
- dev->dma_parms = dev->parent->dma_parms;
- dma_set_coherent_mask(dev, dev->parent->coherent_dma_mask);
+ if (!dev->dma_mask) {
+ dev->dma_mask = dev->parent->dma_mask;
+ dev->dma_parms = dev->parent->dma_parms;
+ dma_set_coherent_mask(dev, dev->parent->coherent_dma_mask);
+ }

pm_runtime_enable(dev);
pm_runtime_get_sync(dev);
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:17 UTC
Permalink
Raw Message
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh-***@public.gmane.org>

To support a generic phy driver in this driver later, this patch
renames "struct usb_phy *phy" to "struct usb_phy *usb_phy".

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh-***@public.gmane.org>
Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/renesas_usbhs/common.h | 2 +-
drivers/usb/renesas_usbhs/rcar2.c | 26 +++++++++++++-------------
2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/usb/renesas_usbhs/common.h b/drivers/usb/renesas_usbhs/common.h
index a7996da..e0d53c5 100644
--- a/drivers/usb/renesas_usbhs/common.h
+++ b/drivers/usb/renesas_usbhs/common.h
@@ -269,7 +269,7 @@ struct usbhs_priv {
*/
struct usbhs_fifo_info fifo_info;

- struct usb_phy *phy;
+ struct usb_phy *usb_phy;
};

/*
diff --git a/drivers/usb/renesas_usbhs/rcar2.c b/drivers/usb/renesas_usbhs/rcar2.c
index e6b9dcc..f264cad 100644
--- a/drivers/usb/renesas_usbhs/rcar2.c
+++ b/drivers/usb/renesas_usbhs/rcar2.c
@@ -20,13 +20,13 @@
static int usbhs_rcar2_hardware_init(struct platform_device *pdev)
{
struct usbhs_priv *priv = usbhs_pdev_to_priv(pdev);
- struct usb_phy *phy;
+ struct usb_phy *usb_phy;

- phy = usb_get_phy_dev(&pdev->dev, 0);
- if (IS_ERR(phy))
- return PTR_ERR(phy);
+ usb_phy = usb_get_phy_dev(&pdev->dev, 0);
+ if (IS_ERR(usb_phy))
+ return PTR_ERR(usb_phy);

- priv->phy = phy;
+ priv->usb_phy = usb_phy;
return 0;
}

@@ -34,11 +34,11 @@ static int usbhs_rcar2_hardware_exit(struct platform_device *pdev)
{
struct usbhs_priv *priv = usbhs_pdev_to_priv(pdev);

- if (!priv->phy)
+ if (!priv->usb_phy)
return 0;

- usb_put_phy(priv->phy);
- priv->phy = NULL;
+ usb_put_phy(priv->usb_phy);
+ priv->usb_phy = NULL;

return 0;
}
@@ -48,19 +48,19 @@ static int usbhs_rcar2_power_ctrl(struct platform_device *pdev,
{
struct usbhs_priv *priv = usbhs_pdev_to_priv(pdev);

- if (!priv->phy)
+ if (!priv->usb_phy)
return -ENODEV;

if (enable) {
- int retval = usb_phy_init(priv->phy);
+ int retval = usb_phy_init(priv->usb_phy);

if (!retval)
- retval = usb_phy_set_suspend(priv->phy, 0);
+ retval = usb_phy_set_suspend(priv->usb_phy, 0);
return retval;
}

- usb_phy_set_suspend(priv->phy, 1);
- usb_phy_shutdown(priv->phy);
+ usb_phy_set_suspend(priv->usb_phy, 1);
+ usb_phy_shutdown(priv->usb_phy);
return 0;
}
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:19 UTC
Permalink
Raw Message
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh-***@public.gmane.org>

This patch adds support for the generic PHY. The generic PHY will be
used in multiplatform environment.

Acked-by: Kishon Vijay Abraham I <kishon-***@public.gmane.org>
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh-***@public.gmane.org>
Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/renesas_usbhs/common.h | 1 +
drivers/usb/renesas_usbhs/rcar2.c | 29 +++++++++++++++++++++++++++++
2 files changed, 30 insertions(+)

diff --git a/drivers/usb/renesas_usbhs/common.h b/drivers/usb/renesas_usbhs/common.h
index e0d53c5..c45667f 100644
--- a/drivers/usb/renesas_usbhs/common.h
+++ b/drivers/usb/renesas_usbhs/common.h
@@ -270,6 +270,7 @@ struct usbhs_priv {
struct usbhs_fifo_info fifo_info;

struct usb_phy *usb_phy;
+ struct phy *phy;
};

/*
diff --git a/drivers/usb/renesas_usbhs/rcar2.c b/drivers/usb/renesas_usbhs/rcar2.c
index 485b889..8fc15c0 100644
--- a/drivers/usb/renesas_usbhs/rcar2.c
+++ b/drivers/usb/renesas_usbhs/rcar2.c
@@ -12,6 +12,7 @@

#include <linux/gpio.h>
#include <linux/of_gpio.h>
+#include <linux/phy/phy.h>
#include <linux/platform_data/gpio-rcar.h>
#include <linux/usb/phy.h>
#include "common.h"
@@ -21,6 +22,16 @@ static int usbhs_rcar2_hardware_init(struct platform_device *pdev)
{
struct usbhs_priv *priv = usbhs_pdev_to_priv(pdev);

+ if (IS_ENABLED(CONFIG_GENERIC_PHY)) {
+ struct phy *phy = phy_get(&pdev->dev, "usb");
+
+ if (IS_ERR(phy))
+ return PTR_ERR(phy);
+
+ priv->phy = phy;
+ return 0;
+ }
+
if (IS_ENABLED(CONFIG_USB_PHY)) {
struct usb_phy *usb_phy = usb_get_phy_dev(&pdev->dev, 0);

@@ -38,6 +49,11 @@ static int usbhs_rcar2_hardware_exit(struct platform_device *pdev)
{
struct usbhs_priv *priv = usbhs_pdev_to_priv(pdev);

+ if (priv->phy) {
+ phy_put(priv->phy);
+ priv->phy = NULL;
+ }
+
if (priv->usb_phy) {
usb_put_phy(priv->usb_phy);
priv->usb_phy = NULL;
@@ -52,6 +68,19 @@ static int usbhs_rcar2_power_ctrl(struct platform_device *pdev,
struct usbhs_priv *priv = usbhs_pdev_to_priv(pdev);
int retval = -ENODEV;

+ if (priv->phy) {
+ if (enable) {
+ retval = phy_init(priv->phy);
+
+ if (!retval)
+ retval = phy_power_on(priv->phy);
+ } else {
+ phy_power_off(priv->phy);
+ phy_exit(priv->phy);
+ retval = 0;
+ }
+ }
+
if (priv->usb_phy) {
if (enable) {
retval = usb_phy_init(priv->usb_phy);
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:31 UTC
Permalink
Raw Message
From: Peter Chen <peter.chen-***@public.gmane.org>

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen-***@public.gmane.org>
Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/udc/mv_udc_core.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/usb/gadget/udc/mv_udc_core.c b/drivers/usb/gadget/udc/mv_udc_core.c
index 3c5db80..cebb948 100644
--- a/drivers/usb/gadget/udc/mv_udc_core.c
+++ b/drivers/usb/gadget/udc/mv_udc_core.c
@@ -2107,10 +2107,8 @@ static int mv_udc_probe(struct platform_device *pdev)
}

udc = devm_kzalloc(&pdev->dev, sizeof(*udc), GFP_KERNEL);
- if (udc == NULL) {
- dev_err(&pdev->dev, "failed to allocate memory for udc\n");
+ if (udc == NULL)
return -ENOMEM;
- }

udc->done = &release_done;
udc->pdata = dev_get_platdata(&pdev->dev);
@@ -2207,7 +2205,6 @@ static int mv_udc_probe(struct platform_device *pdev)
size = udc->max_eps * sizeof(struct mv_ep) *2;
udc->eps = devm_kzalloc(&pdev->dev, size, GFP_KERNEL);
if (udc->eps == NULL) {
- dev_err(&pdev->dev, "allocate ep memory failed\n");
retval = -ENOMEM;
goto err_destroy_dma;
}
@@ -2216,7 +2213,6 @@ static int mv_udc_probe(struct platform_device *pdev)
udc->status_req = devm_kzalloc(&pdev->dev, sizeof(struct mv_req),
GFP_KERNEL);
if (!udc->status_req) {
- dev_err(&pdev->dev, "allocate status_req memory failed\n");
retval = -ENOMEM;
goto err_destroy_dma;
}
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:27 UTC
Permalink
Raw Message
From: Andrzej Pietrasiewicz <andrzej.p-***@public.gmane.org>

USB gadgets composed with configfs lack suspend and resume
methods. This patch uses composite_suspend()/composite_resume()
the same way e.g. composite_setup() or composite_disconnect()
are used in a configfs-based gadget.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p-***@public.gmane.org>
Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/composite.c | 6 ++----
drivers/usb/gadget/configfs.c | 3 +++
include/linux/usb/composite.h | 2 ++
3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index e071d58..6178353 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -2064,8 +2064,7 @@ fail:

/*-------------------------------------------------------------------------*/

-static void
-composite_suspend(struct usb_gadget *gadget)
+void composite_suspend(struct usb_gadget *gadget)
{
struct usb_composite_dev *cdev = get_gadget_data(gadget);
struct usb_function *f;
@@ -2088,8 +2087,7 @@ composite_suspend(struct usb_gadget *gadget)
usb_gadget_vbus_draw(gadget, 2);
}

-static void
-composite_resume(struct usb_gadget *gadget)
+void composite_resume(struct usb_gadget *gadget)
{
struct usb_composite_dev *cdev = get_gadget_data(gadget);
struct usb_function *f;
diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c
index 3403433..d25f9f3 100644
--- a/drivers/usb/gadget/configfs.c
+++ b/drivers/usb/gadget/configfs.c
@@ -1453,6 +1453,9 @@ static const struct usb_gadget_driver configfs_driver_template = {
.reset = composite_disconnect,
.disconnect = composite_disconnect,

+ .suspend = composite_suspend,
+ .resume = composite_resume,
+
.max_speed = USB_SPEED_SUPER,
.driver = {
.owner = THIS_MODULE,
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h
index ed3811c..3d87def 100644
--- a/include/linux/usb/composite.h
+++ b/include/linux/usb/composite.h
@@ -506,6 +506,8 @@ extern int usb_string_ids_n(struct usb_composite_dev *c, unsigned n);
extern void composite_disconnect(struct usb_gadget *gadget);
extern int composite_setup(struct usb_gadget *gadget,
const struct usb_ctrlrequest *ctrl);
+extern void composite_suspend(struct usb_gadget *gadget);
+extern void composite_resume(struct usb_gadget *gadget);

/*
* Some systems will need runtime overrides for the product identifiers
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:29 UTC
Permalink
Raw Message
whenever we get a Disconnect Interrupt, we should
make sure to update out udc state to NOT_ATTACHED,
otherwise sysfs will show wrong values.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/dwc3/gadget.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 89cfdbf..d08666d 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -2141,6 +2141,7 @@ static void dwc3_gadget_disconnect_interrupt(struct dwc3 *dwc)

dwc->gadget.speed = USB_SPEED_UNKNOWN;
dwc->setup_packet_pending = false;
+ usb_gadget_set_state(&dwc->gadget, USB_STATE_NOTATTACHED);
}

static void dwc3_gadget_reset_interrupt(struct dwc3 *dwc)
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:26 UTC
Permalink
Raw Message
From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+***@public.gmane.org>

This NULL check sets off a static checker warning because we already
dereferenced "card" earlier in the function. However, since "card" is
never NULL so we can just remove the check.

Signed-off-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+***@public.gmane.org>
Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/function/u_uac1.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/drivers/usb/gadget/function/u_uac1.c b/drivers/usb/gadget/function/u_uac1.c
index a44a07f..53842a1 100644
--- a/drivers/usb/gadget/function/u_uac1.c
+++ b/drivers/usb/gadget/function/u_uac1.c
@@ -213,9 +213,6 @@ static int gaudio_open_snd_dev(struct gaudio *card)
fn_cap = opts->fn_cap;
fn_cntl = opts->fn_cntl;

- if (!card)
- return -ENODEV;
Felipe Balbi
2014-10-17 17:16:38 UTC
Permalink
Raw Message
From: Peter Chen <peter.chen-***@public.gmane.org>

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen-***@public.gmane.org>
Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/musb/blackfin.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c
index ac4422b..8554c6f 100644
--- a/drivers/usb/musb/blackfin.c
+++ b/drivers/usb/musb/blackfin.c
@@ -456,16 +456,12 @@ static int bfin_probe(struct platform_device *pdev)
int ret = -ENOMEM;

glue = devm_kzalloc(&pdev->dev, sizeof(*glue), GFP_KERNEL);
- if (!glue) {
- dev_err(&pdev->dev, "failed to allocate glue context\n");
+ if (!glue)
goto err0;
- }

musb = platform_device_alloc("musb-hdrc", PLATFORM_DEVID_AUTO);
- if (!musb) {
- dev_err(&pdev->dev, "failed to allocate musb device\n");
+ if (!musb)
goto err0;
- }

musb->dev.parent = &pdev->dev;
musb->dev.dma_mask = &bfin_dmamask;
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:39 UTC
Permalink
Raw Message
From: Peter Chen <peter.chen-***@public.gmane.org>

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen-***@public.gmane.org>
Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/musb/tusb6010.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/usb/musb/tusb6010.c b/drivers/usb/musb/tusb6010.c
index 2daa779..25f02df 100644
--- a/drivers/usb/musb/tusb6010.c
+++ b/drivers/usb/musb/tusb6010.c
@@ -1164,10 +1164,8 @@ static int tusb_probe(struct platform_device *pdev)
int ret;

glue = devm_kzalloc(&pdev->dev, sizeof(*glue), GFP_KERNEL);
- if (!glue) {
- dev_err(&pdev->dev, "failed to allocate glue context\n");
+ if (!glue)
return -ENOMEM;
- }

glue->dev = &pdev->dev;
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:40 UTC
Permalink
Raw Message
From: Peter Chen <peter.chen-***@public.gmane.org>

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen-***@public.gmane.org>
Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/musb/musb_dsps.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
index 48bc09e..6209456 100644
--- a/drivers/usb/musb/musb_dsps.c
+++ b/drivers/usb/musb/musb_dsps.c
@@ -729,7 +729,6 @@ static int dsps_create_musb_pdev(struct dsps_glue *glue,

config = devm_kzalloc(&parent->dev, sizeof(*config), GFP_KERNEL);
if (!config) {
- dev_err(dev, "failed to allocate musb hdrc config\n");
ret = -ENOMEM;
goto err;
}
@@ -781,10 +780,8 @@ static int dsps_probe(struct platform_device *pdev)

/* allocate glue */
glue = devm_kzalloc(&pdev->dev, sizeof(*glue), GFP_KERNEL);
- if (!glue) {
- dev_err(&pdev->dev, "unable to allocate glue memory\n");
+ if (!glue)
return -ENOMEM;
- }

glue->dev = &pdev->dev;
glue->wrp = wrp;
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:58 UTC
Permalink
Raw Message
future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/udc/net2280.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/gadget/udc/net2280.c b/drivers/usb/gadget/udc/net2280.c
index 8d13337..a15a343 100644
--- a/drivers/usb/gadget/udc/net2280.c
+++ b/drivers/usb/gadget/udc/net2280.c
@@ -2449,8 +2449,6 @@ static int net2280_stop(struct usb_gadget *_gadget,
stop_activity(dev, driver);
spin_unlock_irqrestore(&dev->lock, flags);

- dev->driver = NULL;
Felipe Balbi
2014-10-17 19:04:13 UTC
Permalink
Raw Message
future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/udc/net2280.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/gadget/udc/net2280.c b/drivers/usb/gadget/udc/net2280.c
index 8d13337..ee74b9d 100644
--- a/drivers/usb/gadget/udc/net2280.c
+++ b/drivers/usb/gadget/udc/net2280.c
@@ -2446,11 +2446,9 @@ static int net2280_stop(struct usb_gadget *_gadget,
dev = container_of(_gadget, struct net2280, gadget);

spin_lock_irqsave(&dev->lock, flags);
- stop_activity(dev, driver);
+ stop_activity(dev, NULL);
spin_unlock_irqrestore(&dev->lock, flags);

- dev->driver = NULL;
Felipe Balbi
2014-10-17 17:16:32 UTC
Permalink
Raw Message
From: Peter Chen <peter.chen-***@public.gmane.org>

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen-***@public.gmane.org>
Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/udc/fsl_qe_udc.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/fsl_qe_udc.c b/drivers/usb/gadget/udc/fsl_qe_udc.c
index dd18ea3..6601b0f 100644
--- a/drivers/usb/gadget/udc/fsl_qe_udc.c
+++ b/drivers/usb/gadget/udc/fsl_qe_udc.c
@@ -2538,7 +2538,6 @@ static int qe_udc_probe(struct platform_device *ofdev)
/* create a buf for ZLP send, need to remain zeroed */
udc->nullbuf = devm_kzalloc(&ofdev->dev, 256, GFP_KERNEL);
if (udc->nullbuf == NULL) {
- dev_err(udc->dev, "cannot alloc nullbuf\n");
ret = -ENOMEM;
goto err3;
}
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:54 UTC
Permalink
Raw Message
future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/udc/lpc32xx_udc.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/drivers/usb/gadget/udc/lpc32xx_udc.c b/drivers/usb/gadget/udc/lpc32xx_udc.c
index feab0ba..cef64b9 100644
--- a/drivers/usb/gadget/udc/lpc32xx_udc.c
+++ b/drivers/usb/gadget/udc/lpc32xx_udc.c
@@ -2967,9 +2967,6 @@ static int lpc32xx_stop(struct usb_gadget *gadget,
int i;
struct lpc32xx_udc *udc = to_udc(gadget);

- if (!driver || driver != udc->driver)
- return -EINVAL;
Felipe Balbi
2014-10-17 17:17:03 UTC
Permalink
Raw Message
We know that our udc points to our gadget and our
gadget_driver, simplify the interface by passing
a single argument.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/udc/udc-core.c | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/drivers/usb/gadget/udc/udc-core.c b/drivers/usb/gadget/udc/udc-core.c
index ddc6f57..3fed7a2 100644
--- a/drivers/usb/gadget/udc/udc-core.c
+++ b/drivers/usb/gadget/udc/udc-core.c
@@ -174,8 +174,7 @@ EXPORT_SYMBOL_GPL(usb_gadget_udc_reset);

/**
* usb_gadget_udc_start - tells usb device controller to start up
- * @gadget: The gadget we want to get started
- * @driver: The driver we want to bind to @gadget
+ * @udc: The UDC to be started
*
* This call is issued by the UDC Class driver when it's about
* to register a gadget driver to the device controller, before
@@ -186,10 +185,9 @@ EXPORT_SYMBOL_GPL(usb_gadget_udc_reset);
*
* Returns zero on success, else negative errno.
*/
-static inline int usb_gadget_udc_start(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver)
+static inline int usb_gadget_udc_start(struct usb_udc *udc)
{
- return gadget->ops->udc_start(gadget, driver);
+ return udc->gadget->ops->udc_start(udc->gadget, udc->driver);
}

/**
@@ -204,10 +202,9 @@ static inline int usb_gadget_udc_start(struct usb_gadget *gadget,
* far as powering off UDC completely and disable its data
* line pullups.
*/
-static inline void usb_gadget_udc_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver)
+static inline void usb_gadget_udc_stop(struct usb_udc *udc)
{
- gadget->ops->udc_stop(gadget, driver);
+ udc->gadget->ops->udc_stop(udc->gadget, udc->driver);
}

/**
@@ -335,7 +332,7 @@ static void usb_gadget_remove_driver(struct usb_udc *udc)
usb_gadget_disconnect(udc->gadget);
udc->driver->disconnect(udc->gadget);
udc->driver->unbind(udc->gadget);
- usb_gadget_udc_stop(udc->gadget, NULL);
+ usb_gadget_udc_stop(udc);

udc->driver = NULL;
udc->dev.driver = NULL;
@@ -395,7 +392,7 @@ static int udc_bind_to_driver(struct usb_udc *udc, struct usb_gadget_driver *dri
ret = driver->bind(udc->gadget, driver);
if (ret)
goto err1;
- ret = usb_gadget_udc_start(udc->gadget, driver);
+ ret = usb_gadget_udc_start(udc);
if (ret) {
driver->unbind(udc->gadget);
goto err1;
@@ -513,12 +510,12 @@ static ssize_t usb_udc_softconn_store(struct device *dev,
}

if (sysfs_streq(buf, "connect")) {
- usb_gadget_udc_start(udc->gadget, udc->driver);
+ usb_gadget_udc_start(udc);
usb_gadget_connect(udc->gadget);
} else if (sysfs_streq(buf, "disconnect")) {
usb_gadget_disconnect(udc->gadget);
udc->driver->disconnect(udc->gadget);
- usb_gadget_udc_stop(udc->gadget, udc->driver);
+ usb_gadget_udc_stop(udc);
} else {
dev_err(dev, "unsupported command '%s'\n", buf);
return -EINVAL;
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:47 UTC
Permalink
Raw Message
From: Peter Chen <peter.chen-***@public.gmane.org>

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen-***@public.gmane.org>
Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/phy/phy-mv-usb.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/usb/phy/phy-mv-usb.c b/drivers/usb/phy/phy-mv-usb.c
index 7d80c54..c9517d8 100644
--- a/drivers/usb/phy/phy-mv-usb.c
+++ b/drivers/usb/phy/phy-mv-usb.c
@@ -686,10 +686,8 @@ static int mv_otg_probe(struct platform_device *pdev)
}

mvotg = devm_kzalloc(&pdev->dev, sizeof(*mvotg), GFP_KERNEL);
- if (!mvotg) {
- dev_err(&pdev->dev, "failed to allocate memory!\n");
+ if (!mvotg)
return -ENOMEM;
- }

otg = devm_kzalloc(&pdev->dev, sizeof(*otg), GFP_KERNEL);
if (!otg)
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:52 UTC
Permalink
Raw Message
future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/udc/dummy_hcd.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/gadget/udc/dummy_hcd.c b/drivers/usb/gadget/udc/dummy_hcd.c
index 81dc595..32bdd78 100644
--- a/drivers/usb/gadget/udc/dummy_hcd.c
+++ b/drivers/usb/gadget/udc/dummy_hcd.c
@@ -921,9 +921,8 @@ static int dummy_udc_stop(struct usb_gadget *g,
struct dummy_hcd *dum_hcd = gadget_to_dummy_hcd(g);
struct dummy *dum = dum_hcd->dum;

- if (driver)
- dev_dbg(udc_dev(dum), "unregister gadget driver '%s'\n",
- driver->driver.name);
+ dev_dbg(udc_dev(dum), "unregister gadget driver '%s'\n",
+ dum->driver->driver.name);

dum->driver = NULL;
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:17:07 UTC
Permalink
Raw Message
now that we provide generic register/unregister
debugging messages from udc-core, we can remove
the same messages from this driver.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/udc/fsl_qe_udc.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/drivers/usb/gadget/udc/fsl_qe_udc.c b/drivers/usb/gadget/udc/fsl_qe_udc.c
index be78857..6ca61e6 100644
--- a/drivers/usb/gadget/udc/fsl_qe_udc.c
+++ b/drivers/usb/gadget/udc/fsl_qe_udc.c
@@ -2305,8 +2305,6 @@ static int fsl_qe_start(struct usb_gadget *gadget,
udc->ep0_dir = USB_DIR_OUT;
spin_unlock_irqrestore(&udc->lock, flags);

- dev_info(udc->dev, "%s bind to driver %s\n", udc->gadget.name,
- driver->driver.name);
return 0;
}

@@ -2334,8 +2332,6 @@ static int fsl_qe_stop(struct usb_gadget *gadget,
nuke(loop_ep, -ESHUTDOWN);
spin_unlock_irqrestore(&udc->lock, flags);

- dev_info(udc->dev, "unregistered gadget driver '%s'\r\n",
- udc->driver->driver.name);
udc->driver = NULL;

return 0;
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:17:10 UTC
Permalink
Raw Message
now that we provide generic register/unregister
debugging messages from udc-core, we can remove
the same messages from this driver.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/udc/net2280.c | 6 ------
1 file changed, 6 deletions(-)

diff --git a/drivers/usb/gadget/udc/net2280.c b/drivers/usb/gadget/udc/net2280.c
index a15a343..c3ebdcd 100644
--- a/drivers/usb/gadget/udc/net2280.c
+++ b/drivers/usb/gadget/udc/net2280.c
@@ -2397,11 +2397,6 @@ static int net2280_start(struct usb_gadget *_gadget,

ep0_start(dev);

- ep_dbg(dev, "%s ready, usbctl %08x stdrsp %08x\n",
- driver->driver.name,
- readl(&dev->usb->usbctl),
- readl(&dev->usb->stdrsp));
Felipe Balbi
2014-10-17 17:17:13 UTC
Permalink
Raw Message
Currently, we're printing gadget driver name when
registering and UDC name when unregistering. Standardize
on always printing gadget driver name.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/udc/udc-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/udc-core.c b/drivers/usb/gadget/udc/udc-core.c
index 3fed7a2..52f457b 100644
--- a/drivers/usb/gadget/udc/udc-core.c
+++ b/drivers/usb/gadget/udc/udc-core.c
@@ -325,7 +325,7 @@ EXPORT_SYMBOL_GPL(usb_add_gadget_udc);
static void usb_gadget_remove_driver(struct usb_udc *udc)
{
dev_dbg(&udc->dev, "unregistering UDC driver [%s]\n",
- udc->gadget->name);
+ udc->driver->function);

kobject_uevent(&udc->dev.kobj, KOBJ_CHANGE);
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:17:05 UTC
Permalink
Raw Message
now that we provide generic register/unregister
debugging messages from udc-core, we can remove
the same messages from this driver.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/udc/atmel_usba_udc.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c
index 1529926..eaee5f9 100644
--- a/drivers/usb/gadget/udc/atmel_usba_udc.c
+++ b/drivers/usb/gadget/udc/atmel_usba_udc.c
@@ -1791,8 +1791,6 @@ static int atmel_usba_start(struct usb_gadget *gadget,
return ret;
}

- DBG(DBG_GADGET, "registered driver `%s'\n", driver->driver.name);
-
udc->vbus_prev = 0;
if (gpio_is_valid(udc->vbus_pin))
enable_irq(gpio_to_irq(udc->vbus_pin));
@@ -1830,8 +1828,6 @@ static int atmel_usba_stop(struct usb_gadget *gadget,
clk_disable_unprepare(udc->hclk);
clk_disable_unprepare(udc->pclk);

- DBG(DBG_GADGET, "unregistered driver `%s'\n", udc->driver->driver.name);
Felipe Balbi
2014-10-17 17:17:06 UTC
Permalink
Raw Message
now that we provide generic register/unregister
debugging messages from udc-core, we can remove
the same messages from this driver.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/udc/dummy_hcd.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/usb/gadget/udc/dummy_hcd.c b/drivers/usb/gadget/udc/dummy_hcd.c
index 32bdd78..5c72ade 100644
--- a/drivers/usb/gadget/udc/dummy_hcd.c
+++ b/drivers/usb/gadget/udc/dummy_hcd.c
@@ -908,10 +908,8 @@ static int dummy_udc_start(struct usb_gadget *g,
*/

dum->devstatus = 0;
-
dum->driver = driver;
- dev_dbg(udc_dev(dum), "binding gadget driver '%s'\n",
- driver->driver.name);
+
return 0;
}

@@ -921,9 +919,6 @@ static int dummy_udc_stop(struct usb_gadget *g,
struct dummy_hcd *dum_hcd = gadget_to_dummy_hcd(g);
struct dummy *dum = dum_hcd->dum;

- dev_dbg(udc_dev(dum), "unregister gadget driver '%s'\n",
- dum->driver->driver.name);
Felipe Balbi
2014-10-17 17:17:14 UTC
Permalink
Raw Message
now that no UDC driver relies on the extra
'driver' argument to ->udc_stop(), we can
safely remove it.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/chipidea/udc.c | 6 ++----
drivers/usb/dwc2/gadget.c | 3 +--
drivers/usb/dwc3/gadget.c | 3 +--
drivers/usb/gadget/udc/amd5536udc.c | 8 +++-----
drivers/usb/gadget/udc/at91_udc.c | 7 +++----
drivers/usb/gadget/udc/atmel_usba_udc.c | 7 +++----
drivers/usb/gadget/udc/bcm63xx_udc.c | 3 +--
drivers/usb/gadget/udc/dummy_hcd.c | 6 ++----
drivers/usb/gadget/udc/fotg210-udc.c | 3 +--
drivers/usb/gadget/udc/fsl_qe_udc.c | 6 ++----
drivers/usb/gadget/udc/fsl_udc_core.c | 8 +++-----
drivers/usb/gadget/udc/fusb300_udc.c | 3 +--
drivers/usb/gadget/udc/goku_udc.c | 6 ++----
drivers/usb/gadget/udc/gr_udc.c | 3 +--
drivers/usb/gadget/udc/lpc32xx_udc.c | 5 ++---
drivers/usb/gadget/udc/m66592-udc.c | 3 +--
drivers/usb/gadget/udc/mv_u3d_core.c | 3 +--
drivers/usb/gadget/udc/mv_udc_core.c | 5 ++---
drivers/usb/gadget/udc/net2272.c | 6 ++----
drivers/usb/gadget/udc/net2280.c | 6 ++----
drivers/usb/gadget/udc/omap_udc.c | 6 ++----
drivers/usb/gadget/udc/pch_udc.c | 7 +++----
drivers/usb/gadget/udc/pxa25x_udc.c | 6 ++----
drivers/usb/gadget/udc/pxa27x_udc.c | 6 ++----
drivers/usb/gadget/udc/r8a66597-udc.c | 3 +--
drivers/usb/gadget/udc/s3c-hsudc.c | 3 +--
drivers/usb/gadget/udc/s3c2410_udc.c | 6 ++----
drivers/usb/gadget/udc/udc-core.c | 2 +-
drivers/usb/gadget/udc/udc-xilinx.c | 3 +--
drivers/usb/musb/musb_gadget.c | 6 ++----
drivers/usb/renesas_usbhs/mod_gadget.c | 3 +--
include/linux/usb/gadget.h | 3 +--
32 files changed, 55 insertions(+), 99 deletions(-)

diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index 0444d3f..f4397b2 100644
--- a/drivers/usb/chipidea/udc.c
+++ b/drivers/usb/chipidea/udc.c
@@ -1544,8 +1544,7 @@ static int ci_udc_pullup(struct usb_gadget *_gadget, int is_on)

static int ci_udc_start(struct usb_gadget *gadget,
struct usb_gadget_driver *driver);
-static int ci_udc_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver);
+static int ci_udc_stop(struct usb_gadget *gadget);
/**
* Device operations part of the API to the USB controller hardware,
* which don't involve endpoints (or i/o)
@@ -1682,8 +1681,7 @@ static int ci_udc_start(struct usb_gadget *gadget,
/**
* ci_udc_stop: unregister a gadget driver
*/
-static int ci_udc_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver)
+static int ci_udc_stop(struct usb_gadget *gadget)
{
struct ci_hdrc *ci = container_of(gadget, struct ci_hdrc, gadget);
unsigned long flags;
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 7b5856f..b11d6cf 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -2918,8 +2918,7 @@ err:
*
* Stop udc hw block and stay tunned for future transmissions
*/
-static int s3c_hsotg_udc_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver)
+static int s3c_hsotg_udc_stop(struct usb_gadget *gadget)
{
struct s3c_hsotg *hsotg = to_hsotg(gadget);
unsigned long flags = 0;
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 1f2a719..428b047 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -1627,8 +1627,7 @@ err0:
return ret;
}

-static int dwc3_gadget_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver)
+static int dwc3_gadget_stop(struct usb_gadget *g)
{
struct dwc3 *dwc = gadget_to_dwc(g);
unsigned long flags;
diff --git a/drivers/usb/gadget/udc/amd5536udc.c b/drivers/usb/gadget/udc/amd5536udc.c
index 7d0e0b8..606b900 100644
--- a/drivers/usb/gadget/udc/amd5536udc.c
+++ b/drivers/usb/gadget/udc/amd5536udc.c
@@ -1401,9 +1401,8 @@ static int udc_wakeup(struct usb_gadget *gadget)

static int amd5536_udc_start(struct usb_gadget *g,
struct usb_gadget_driver *driver);
-static int amd5536_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver);
-/* gadget operations */
+static int amd5536_udc_stop(struct usb_gadget *g);
+
static const struct usb_gadget_ops udc_ops = {
.wakeup = udc_wakeup,
.get_frame = udc_get_frame,
@@ -1962,8 +1961,7 @@ __acquires(dev->lock)
}

/* Called by gadget driver to unregister itself */
-static int amd5536_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver)
+static int amd5536_udc_stop(struct usb_gadget *g)
{
struct udc *dev = to_amd5536_udc(g);
unsigned long flags;
diff --git a/drivers/usb/gadget/udc/at91_udc.c b/drivers/usb/gadget/udc/at91_udc.c
index 5c4cede..f47f16c 100644
--- a/drivers/usb/gadget/udc/at91_udc.c
+++ b/drivers/usb/gadget/udc/at91_udc.c
@@ -984,8 +984,8 @@ static int at91_set_selfpowered(struct usb_gadget *gadget, int is_on)

static int at91_start(struct usb_gadget *gadget,
struct usb_gadget_driver *driver);
-static int at91_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver);
+static int at91_stop(struct usb_gadget *gadget);
+
static const struct usb_gadget_ops at91_udc_ops = {
.get_frame = at91_get_frame,
.wakeup = at91_wakeup,
@@ -1644,8 +1644,7 @@ static int at91_start(struct usb_gadget *gadget,
return 0;
}

-static int at91_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver)
+static int at91_stop(struct usb_gadget *gadget)
{
struct at91_udc *udc;
unsigned long flags;
diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c
index eaee5f9..c537a66 100644
--- a/drivers/usb/gadget/udc/atmel_usba_udc.c
+++ b/drivers/usb/gadget/udc/atmel_usba_udc.c
@@ -987,8 +987,8 @@ usba_udc_set_selfpowered(struct usb_gadget *gadget, int is_selfpowered)

static int atmel_usba_start(struct usb_gadget *gadget,
struct usb_gadget_driver *driver);
-static int atmel_usba_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver);
+static int atmel_usba_stop(struct usb_gadget *gadget);
+
static const struct usb_gadget_ops usba_udc_ops = {
.get_frame = usba_udc_get_frame,
.wakeup = usba_udc_wakeup,
@@ -1807,8 +1807,7 @@ static int atmel_usba_start(struct usb_gadget *gadget,
return 0;
}

-static int atmel_usba_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver)
+static int atmel_usba_stop(struct usb_gadget *gadget)
{
struct usba_udc *udc = container_of(gadget, struct usba_udc, gadget);
unsigned long flags;
diff --git a/drivers/usb/gadget/udc/bcm63xx_udc.c b/drivers/usb/gadget/udc/bcm63xx_udc.c
index 485c8c2..9319ff2 100644
--- a/drivers/usb/gadget/udc/bcm63xx_udc.c
+++ b/drivers/usb/gadget/udc/bcm63xx_udc.c
@@ -1836,8 +1836,7 @@ static int bcm63xx_udc_start(struct usb_gadget *gadget,
* @gadget: USB slave device.
* @driver: Driver for USB slave devices.
*/
-static int bcm63xx_udc_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver)
+static int bcm63xx_udc_stop(struct usb_gadget *gadget)
{
struct bcm63xx_udc *udc = gadget_to_udc(gadget);
unsigned long flags;
diff --git a/drivers/usb/gadget/udc/dummy_hcd.c b/drivers/usb/gadget/udc/dummy_hcd.c
index 5c72ade..5bffb75 100644
--- a/drivers/usb/gadget/udc/dummy_hcd.c
+++ b/drivers/usb/gadget/udc/dummy_hcd.c
@@ -851,8 +851,7 @@ static int dummy_pullup(struct usb_gadget *_gadget, int value)

static int dummy_udc_start(struct usb_gadget *g,
struct usb_gadget_driver *driver);
-static int dummy_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver);
+static int dummy_udc_stop(struct usb_gadget *g);

static const struct usb_gadget_ops dummy_ops = {
.get_frame = dummy_g_get_frame,
@@ -913,8 +912,7 @@ static int dummy_udc_start(struct usb_gadget *g,
return 0;
}

-static int dummy_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver)
+static int dummy_udc_stop(struct usb_gadget *g)
{
struct dummy_hcd *dum_hcd = gadget_to_dummy_hcd(g);
struct dummy *dum = dum_hcd->dum;
diff --git a/drivers/usb/gadget/udc/fotg210-udc.c b/drivers/usb/gadget/udc/fotg210-udc.c
index 1d31592..1ca52e11 100644
--- a/drivers/usb/gadget/udc/fotg210-udc.c
+++ b/drivers/usb/gadget/udc/fotg210-udc.c
@@ -1053,8 +1053,7 @@ static void fotg210_init(struct fotg210_udc *fotg210)
iowrite32(value, fotg210->reg + FOTG210_DMISGR0);
}

-static int fotg210_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver)
+static int fotg210_udc_stop(struct usb_gadget *g)
{
struct fotg210_udc *fotg210 = gadget_to_fotg210(g);
unsigned long flags;
diff --git a/drivers/usb/gadget/udc/fsl_qe_udc.c b/drivers/usb/gadget/udc/fsl_qe_udc.c
index 6ca61e6..01f29ef 100644
--- a/drivers/usb/gadget/udc/fsl_qe_udc.c
+++ b/drivers/usb/gadget/udc/fsl_qe_udc.c
@@ -1887,8 +1887,7 @@ static int qe_get_frame(struct usb_gadget *gadget)

static int fsl_qe_start(struct usb_gadget *gadget,
struct usb_gadget_driver *driver);
-static int fsl_qe_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver);
+static int fsl_qe_stop(struct usb_gadget *gadget);

/* defined in usb_gadget.h */
static const struct usb_gadget_ops qe_gadget_ops = {
@@ -2308,8 +2307,7 @@ static int fsl_qe_start(struct usb_gadget *gadget,
return 0;
}

-static int fsl_qe_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver)
+static int fsl_qe_stop(struct usb_gadget *gadget)
{
struct qe_udc *udc;
struct qe_ep *loop_ep;
diff --git a/drivers/usb/gadget/udc/fsl_udc_core.c b/drivers/usb/gadget/udc/fsl_udc_core.c
index c362079..b184ed3 100644
--- a/drivers/usb/gadget/udc/fsl_udc_core.c
+++ b/drivers/usb/gadget/udc/fsl_udc_core.c
@@ -1236,9 +1236,8 @@ static int fsl_pullup(struct usb_gadget *gadget, int is_on)

static int fsl_udc_start(struct usb_gadget *g,
struct usb_gadget_driver *driver);
-static int fsl_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver);
-/* defined in gadget.h */
+static int fsl_udc_stop(struct usb_gadget *g);
+
static const struct usb_gadget_ops fsl_gadget_ops = {
.get_frame = fsl_get_frame,
.wakeup = fsl_wakeup,
@@ -1975,8 +1974,7 @@ static int fsl_udc_start(struct usb_gadget *g,
}

/* Disconnect from gadget driver */
-static int fsl_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver)
+static int fsl_udc_stop(struct usb_gadget *g)
{
struct fsl_ep *loop_ep;
unsigned long flags;
diff --git a/drivers/usb/gadget/udc/fusb300_udc.c b/drivers/usb/gadget/udc/fusb300_udc.c
index 8286df7..a1b33f5 100644
--- a/drivers/usb/gadget/udc/fusb300_udc.c
+++ b/drivers/usb/gadget/udc/fusb300_udc.c
@@ -1320,8 +1320,7 @@ static int fusb300_udc_start(struct usb_gadget *g,
return 0;
}

-static int fusb300_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver)
+static int fusb300_udc_stop(struct usb_gadget *g)
{
struct fusb300 *fusb300 = to_fusb300(g);

diff --git a/drivers/usb/gadget/udc/goku_udc.c b/drivers/usb/gadget/udc/goku_udc.c
index bf9c5ef..5b9176e 100644
--- a/drivers/usb/gadget/udc/goku_udc.c
+++ b/drivers/usb/gadget/udc/goku_udc.c
@@ -992,8 +992,7 @@ static int goku_get_frame(struct usb_gadget *_gadget)

static int goku_udc_start(struct usb_gadget *g,
struct usb_gadget_driver *driver);
-static int goku_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver);
+static int goku_udc_stop(struct usb_gadget *g);

static const struct usb_gadget_ops goku_ops = {
.get_frame = goku_get_frame,
@@ -1364,8 +1363,7 @@ static void stop_activity(struct goku_udc *dev)
udc_enable(dev);
}

-static int goku_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver)
+static int goku_udc_stop(struct usb_gadget *g)
{
struct goku_udc *dev = to_goku_udc(g);
unsigned long flags;
diff --git a/drivers/usb/gadget/udc/gr_udc.c b/drivers/usb/gadget/udc/gr_udc.c
index bde989f..320df9a2 100644
--- a/drivers/usb/gadget/udc/gr_udc.c
+++ b/drivers/usb/gadget/udc/gr_udc.c
@@ -1935,8 +1935,7 @@ static int gr_udc_start(struct usb_gadget *gadget,
return 0;
}

-static int gr_udc_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver)
+static int gr_udc_stop(struct usb_gadget *gadget)
{
struct gr_udc *dev = to_gr_udc(gadget);
unsigned long flags;
diff --git a/drivers/usb/gadget/udc/lpc32xx_udc.c b/drivers/usb/gadget/udc/lpc32xx_udc.c
index cef64b9..4be497d 100644
--- a/drivers/usb/gadget/udc/lpc32xx_udc.c
+++ b/drivers/usb/gadget/udc/lpc32xx_udc.c
@@ -2559,7 +2559,7 @@ static int lpc32xx_pullup(struct usb_gadget *gadget, int is_on)
}

static int lpc32xx_start(struct usb_gadget *, struct usb_gadget_driver *);
-static int lpc32xx_stop(struct usb_gadget *, struct usb_gadget_driver *);
+static int lpc32xx_stop(struct usb_gadget *);

static const struct usb_gadget_ops lpc32xx_udc_ops = {
.get_frame = lpc32xx_get_frame,
@@ -2961,8 +2961,7 @@ static int lpc32xx_start(struct usb_gadget *gadget,
return 0;
}

-static int lpc32xx_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver)
+static int lpc32xx_stop(struct usb_gadget *gadget)
{
int i;
struct lpc32xx_udc *udc = to_udc(gadget);
diff --git a/drivers/usb/gadget/udc/m66592-udc.c b/drivers/usb/gadget/udc/m66592-udc.c
index 8985656..311ec5f 100644
--- a/drivers/usb/gadget/udc/m66592-udc.c
+++ b/drivers/usb/gadget/udc/m66592-udc.c
@@ -1485,8 +1485,7 @@ static int m66592_udc_start(struct usb_gadget *g,
return 0;
}

-static int m66592_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver)
+static int m66592_udc_stop(struct usb_gadget *g)
{
struct m66592 *m66592 = to_m66592(g);

diff --git a/drivers/usb/gadget/udc/mv_u3d_core.c b/drivers/usb/gadget/udc/mv_u3d_core.c
index e3ef744..ea422ac 100644
--- a/drivers/usb/gadget/udc/mv_u3d_core.c
+++ b/drivers/usb/gadget/udc/mv_u3d_core.c
@@ -1266,8 +1266,7 @@ static int mv_u3d_start(struct usb_gadget *g,
return 0;
}

-static int mv_u3d_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver)
+static int mv_u3d_stop(struct usb_gadget *g)
{
struct mv_u3d *u3d = container_of(g, struct mv_u3d, gadget);
struct mv_usb_platform_data *pdata = dev_get_platdata(u3d->dev);
diff --git a/drivers/usb/gadget/udc/mv_udc_core.c b/drivers/usb/gadget/udc/mv_udc_core.c
index 32d24ff..f104ac0 100644
--- a/drivers/usb/gadget/udc/mv_udc_core.c
+++ b/drivers/usb/gadget/udc/mv_udc_core.c
@@ -1223,7 +1223,7 @@ static int mv_udc_pullup(struct usb_gadget *gadget, int is_on)
}

static int mv_udc_start(struct usb_gadget *, struct usb_gadget_driver *);
-static int mv_udc_stop(struct usb_gadget *, struct usb_gadget_driver *);
+static int mv_udc_stop(struct usb_gadget *);
/* device controller usb_gadget_ops structure */
static const struct usb_gadget_ops mv_ops = {

@@ -1371,8 +1371,7 @@ static int mv_udc_start(struct usb_gadget *gadget,
return 0;
}

-static int mv_udc_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver)
+static int mv_udc_stop(struct usb_gadget *gadget)
{
struct mv_udc *udc;
unsigned long flags;
diff --git a/drivers/usb/gadget/udc/net2272.c b/drivers/usb/gadget/udc/net2272.c
index 4641df5..887bea4 100644
--- a/drivers/usb/gadget/udc/net2272.c
+++ b/drivers/usb/gadget/udc/net2272.c
@@ -1169,8 +1169,7 @@ net2272_pullup(struct usb_gadget *_gadget, int is_on)

static int net2272_start(struct usb_gadget *_gadget,
struct usb_gadget_driver *driver);
-static int net2272_stop(struct usb_gadget *_gadget,
- struct usb_gadget_driver *driver);
+static int net2272_stop(struct usb_gadget *_gadget);

static const struct usb_gadget_ops net2272_ops = {
.get_frame = net2272_get_frame,
@@ -1500,8 +1499,7 @@ stop_activity(struct net2272 *dev, struct usb_gadget_driver *driver)
net2272_usb_reinit(dev);
}

-static int net2272_stop(struct usb_gadget *_gadget,
- struct usb_gadget_driver *driver)
+static int net2272_stop(struct usb_gadget *_gadget)
{
struct net2272 *dev;
unsigned long flags;
diff --git a/drivers/usb/gadget/udc/net2280.c b/drivers/usb/gadget/udc/net2280.c
index c3ebdcd..73250a6 100644
--- a/drivers/usb/gadget/udc/net2280.c
+++ b/drivers/usb/gadget/udc/net2280.c
@@ -1548,8 +1548,7 @@ static int net2280_pullup(struct usb_gadget *_gadget, int is_on)

static int net2280_start(struct usb_gadget *_gadget,
struct usb_gadget_driver *driver);
-static int net2280_stop(struct usb_gadget *_gadget,
- struct usb_gadget_driver *driver);
+static int net2280_stop(struct usb_gadget *_gadget);

static const struct usb_gadget_ops net2280_ops = {
.get_frame = net2280_get_frame,
@@ -2432,8 +2431,7 @@ static void stop_activity(struct net2280 *dev, struct usb_gadget_driver *driver)
usb_reinit(dev);
}

-static int net2280_stop(struct usb_gadget *_gadget,
- struct usb_gadget_driver *driver)
+static int net2280_stop(struct usb_gadget *_gadget)
{
struct net2280 *dev;
unsigned long flags;
diff --git a/drivers/usb/gadget/udc/omap_udc.c b/drivers/usb/gadget/udc/omap_udc.c
index dcdfea4..534b85c 100644
--- a/drivers/usb/gadget/udc/omap_udc.c
+++ b/drivers/usb/gadget/udc/omap_udc.c
@@ -1311,8 +1311,7 @@ static int omap_pullup(struct usb_gadget *gadget, int is_on)

static int omap_udc_start(struct usb_gadget *g,
struct usb_gadget_driver *driver);
-static int omap_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver);
+static int omap_udc_stop(struct usb_gadget *g);

static const struct usb_gadget_ops omap_gadget_ops = {
.get_frame = omap_get_frame,
@@ -2102,8 +2101,7 @@ done:
return status;
}

-static int omap_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver)
+static int omap_udc_stop(struct usb_gadget *g)
{
unsigned long flags;
int status = -ENODEV;
diff --git a/drivers/usb/gadget/udc/pch_udc.c b/drivers/usb/gadget/udc/pch_udc.c
index ccbe3d4..6534f36 100644
--- a/drivers/usb/gadget/udc/pch_udc.c
+++ b/drivers/usb/gadget/udc/pch_udc.c
@@ -1240,8 +1240,8 @@ static int pch_udc_pcd_vbus_draw(struct usb_gadget *gadget, unsigned int mA)

static int pch_udc_start(struct usb_gadget *g,
struct usb_gadget_driver *driver);
-static int pch_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver);
+static int pch_udc_stop(struct usb_gadget *g);
+
static const struct usb_gadget_ops pch_udc_ops = {
.get_frame = pch_udc_pcd_get_frame,
.wakeup = pch_udc_pcd_wakeup,
@@ -3008,8 +3008,7 @@ static int pch_udc_start(struct usb_gadget *g,
return 0;
}

-static int pch_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver)
+static int pch_udc_stop(struct usb_gadget *g)
{
struct pch_udc_dev *dev = to_pch_udc(g);

diff --git a/drivers/usb/gadget/udc/pxa25x_udc.c b/drivers/usb/gadget/udc/pxa25x_udc.c
index 098fa57..2944092 100644
--- a/drivers/usb/gadget/udc/pxa25x_udc.c
+++ b/drivers/usb/gadget/udc/pxa25x_udc.c
@@ -998,8 +998,7 @@ static int pxa25x_udc_vbus_draw(struct usb_gadget *_gadget, unsigned mA)

static int pxa25x_udc_start(struct usb_gadget *g,
struct usb_gadget_driver *driver);
-static int pxa25x_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver);
+static int pxa25x_udc_stop(struct usb_gadget *g);

static const struct usb_gadget_ops pxa25x_udc_ops = {
.get_frame = pxa25x_udc_get_frame,
@@ -1311,8 +1310,7 @@ stop_activity(struct pxa25x_udc *dev, struct usb_gadget_driver *driver)
udc_reinit(dev);
}

-static int pxa25x_udc_stop(struct usb_gadget*g,
- struct usb_gadget_driver *driver)
+static int pxa25x_udc_stop(struct usb_gadget*g)
{
struct pxa25x_udc *dev = to_pxa25x(g);

diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c b/drivers/usb/gadget/udc/pxa27x_udc.c
index b90b1f3..17a0193 100644
--- a/drivers/usb/gadget/udc/pxa27x_udc.c
+++ b/drivers/usb/gadget/udc/pxa27x_udc.c
@@ -1669,8 +1669,7 @@ static int pxa_udc_vbus_draw(struct usb_gadget *_gadget, unsigned mA)

static int pxa27x_udc_start(struct usb_gadget *g,
struct usb_gadget_driver *driver);
-static int pxa27x_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver);
+static int pxa27x_udc_stop(struct usb_gadget *g);

static const struct usb_gadget_ops pxa_udc_ops = {
.get_frame = pxa_udc_get_frame,
@@ -1857,8 +1856,7 @@ static void stop_activity(struct pxa_udc *udc, struct usb_gadget_driver *driver)
*
* Returns 0 if no error, -ENODEV, -EINVAL otherwise
*/
-static int pxa27x_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver)
+static int pxa27x_udc_stop(struct usb_gadget *g)
{
struct pxa_udc *udc = to_pxa(g);

diff --git a/drivers/usb/gadget/udc/r8a66597-udc.c b/drivers/usb/gadget/udc/r8a66597-udc.c
index f818661..b63a527 100644
--- a/drivers/usb/gadget/udc/r8a66597-udc.c
+++ b/drivers/usb/gadget/udc/r8a66597-udc.c
@@ -1763,8 +1763,7 @@ static int r8a66597_start(struct usb_gadget *gadget,
return 0;
}

-static int r8a66597_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver)
+static int r8a66597_stop(struct usb_gadget *gadget)
{
struct r8a66597 *r8a66597 = gadget_to_r8a66597(gadget);
unsigned long flags;
diff --git a/drivers/usb/gadget/udc/s3c-hsudc.c b/drivers/usb/gadget/udc/s3c-hsudc.c
index de95e9d..97d3a91 100644
--- a/drivers/usb/gadget/udc/s3c-hsudc.c
+++ b/drivers/usb/gadget/udc/s3c-hsudc.c
@@ -1188,8 +1188,7 @@ err_supplies:
return ret;
}

-static int s3c_hsudc_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver)
+static int s3c_hsudc_stop(struct usb_gadget *gadget)
{
struct s3c_hsudc *hsudc = to_hsudc(gadget);
unsigned long flags;
diff --git a/drivers/usb/gadget/udc/s3c2410_udc.c b/drivers/usb/gadget/udc/s3c2410_udc.c
index ff423d1..2a8e36d 100644
--- a/drivers/usb/gadget/udc/s3c2410_udc.c
+++ b/drivers/usb/gadget/udc/s3c2410_udc.c
@@ -1541,8 +1541,7 @@ static int s3c2410_vbus_draw(struct usb_gadget *_gadget, unsigned ma)

static int s3c2410_udc_start(struct usb_gadget *g,
struct usb_gadget_driver *driver);
-static int s3c2410_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver);
+static int s3c2410_udc_stop(struct usb_gadget *g);

static const struct usb_gadget_ops s3c2410_ops = {
.get_frame = s3c2410_udc_get_frame,
@@ -1683,8 +1682,7 @@ static int s3c2410_udc_start(struct usb_gadget *g,
return 0;
}

-static int s3c2410_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver)
+static int s3c2410_udc_stop(struct usb_gadget *g)
{
struct s3c2410_udc *udc = to_s3c2410(g);

diff --git a/drivers/usb/gadget/udc/udc-core.c b/drivers/usb/gadget/udc/udc-core.c
index 52f457b..135504b 100644
--- a/drivers/usb/gadget/udc/udc-core.c
+++ b/drivers/usb/gadget/udc/udc-core.c
@@ -204,7 +204,7 @@ static inline int usb_gadget_udc_start(struct usb_udc *udc)
*/
static inline void usb_gadget_udc_stop(struct usb_udc *udc)
{
- udc->gadget->ops->udc_stop(udc->gadget, udc->driver);
+ udc->gadget->ops->udc_stop(udc->gadget);
}

/**
diff --git a/drivers/usb/gadget/udc/udc-xilinx.c b/drivers/usb/gadget/udc/udc-xilinx.c
index ed27e16..1eac56f 100644
--- a/drivers/usb/gadget/udc/udc-xilinx.c
+++ b/drivers/usb/gadget/udc/udc-xilinx.c
@@ -1403,8 +1403,7 @@ err:
*
* Return: zero always
*/
-static int xudc_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver)
+static int xudc_stop(struct usb_gadget *gadget)
{
struct xusb_udc *udc = to_udc(gadget);
unsigned long flags;
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index 88d63e0..4ab1896 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -1684,8 +1684,7 @@ static int musb_gadget_pullup(struct usb_gadget *gadget, int is_on)

static int musb_gadget_start(struct usb_gadget *g,
struct usb_gadget_driver *driver);
-static int musb_gadget_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver);
+static int musb_gadget_stop(struct usb_gadget *g);

static const struct usb_gadget_ops musb_gadget_operations = {
.get_frame = musb_gadget_get_frame,
@@ -1923,8 +1922,7 @@ static void stop_activity(struct musb *musb, struct usb_gadget_driver *driver)
*
* @param driver the gadget driver to unregister
*/
-static int musb_gadget_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver)
+static int musb_gadget_stop(struct usb_gadget *g)
{
struct musb *musb = gadget_to_musb(g);
unsigned long flags;
diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c
index 2d17c10..7a45210 100644
--- a/drivers/usb/renesas_usbhs/mod_gadget.c
+++ b/drivers/usb/renesas_usbhs/mod_gadget.c
@@ -851,8 +851,7 @@ static int usbhsg_gadget_start(struct usb_gadget *gadget,
return usbhsg_try_start(priv, USBHSG_STATUS_REGISTERD);
}

-static int usbhsg_gadget_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver)
+static int usbhsg_gadget_stop(struct usb_gadget *gadget)
{
struct usbhsg_gpriv *gpriv = usbhsg_gadget_to_gpriv(gadget);
struct usbhs_priv *priv = usbhsg_gpriv_to_priv(gpriv);
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index 522cafe..70965fc 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -490,8 +490,7 @@ struct usb_gadget_ops {
void (*get_config_params)(struct usb_dcd_config_params *);
int (*udc_start)(struct usb_gadget *,
struct usb_gadget_driver *);
- int (*udc_stop)(struct usb_gadget *,
- struct usb_gadget_driver *);
+ int (*udc_stop)(struct usb_gadget *);
};

/**
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Robert Baldyga
2014-10-20 06:45:02 UTC
Permalink
Raw Message
Hi Felipe,
Post by Felipe Balbi
now that no UDC driver relies on the extra
'driver' argument to ->udc_stop(), we can
safely remove it.
I have already sent patch doing the same thing:
http://markmail.org/message/x5zneg4xea4zntab

Best regards,
Robert Baldyga
Post by Felipe Balbi
---
drivers/usb/chipidea/udc.c | 6 ++----
drivers/usb/dwc2/gadget.c | 3 +--
drivers/usb/dwc3/gadget.c | 3 +--
drivers/usb/gadget/udc/amd5536udc.c | 8 +++-----
drivers/usb/gadget/udc/at91_udc.c | 7 +++----
drivers/usb/gadget/udc/atmel_usba_udc.c | 7 +++----
drivers/usb/gadget/udc/bcm63xx_udc.c | 3 +--
drivers/usb/gadget/udc/dummy_hcd.c | 6 ++----
drivers/usb/gadget/udc/fotg210-udc.c | 3 +--
drivers/usb/gadget/udc/fsl_qe_udc.c | 6 ++----
drivers/usb/gadget/udc/fsl_udc_core.c | 8 +++-----
drivers/usb/gadget/udc/fusb300_udc.c | 3 +--
drivers/usb/gadget/udc/goku_udc.c | 6 ++----
drivers/usb/gadget/udc/gr_udc.c | 3 +--
drivers/usb/gadget/udc/lpc32xx_udc.c | 5 ++---
drivers/usb/gadget/udc/m66592-udc.c | 3 +--
drivers/usb/gadget/udc/mv_u3d_core.c | 3 +--
drivers/usb/gadget/udc/mv_udc_core.c | 5 ++---
drivers/usb/gadget/udc/net2272.c | 6 ++----
drivers/usb/gadget/udc/net2280.c | 6 ++----
drivers/usb/gadget/udc/omap_udc.c | 6 ++----
drivers/usb/gadget/udc/pch_udc.c | 7 +++----
drivers/usb/gadget/udc/pxa25x_udc.c | 6 ++----
drivers/usb/gadget/udc/pxa27x_udc.c | 6 ++----
drivers/usb/gadget/udc/r8a66597-udc.c | 3 +--
drivers/usb/gadget/udc/s3c-hsudc.c | 3 +--
drivers/usb/gadget/udc/s3c2410_udc.c | 6 ++----
drivers/usb/gadget/udc/udc-core.c | 2 +-
drivers/usb/gadget/udc/udc-xilinx.c | 3 +--
drivers/usb/musb/musb_gadget.c | 6 ++----
drivers/usb/renesas_usbhs/mod_gadget.c | 3 +--
include/linux/usb/gadget.h | 3 +--
32 files changed, 55 insertions(+), 99 deletions(-)
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index 0444d3f..f4397b2 100644
--- a/drivers/usb/chipidea/udc.c
+++ b/drivers/usb/chipidea/udc.c
@@ -1544,8 +1544,7 @@ static int ci_udc_pullup(struct usb_gadget *_gadget, int is_on)
static int ci_udc_start(struct usb_gadget *gadget,
struct usb_gadget_driver *driver);
-static int ci_udc_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver);
+static int ci_udc_stop(struct usb_gadget *gadget);
/**
* Device operations part of the API to the USB controller hardware,
* which don't involve endpoints (or i/o)
@@ -1682,8 +1681,7 @@ static int ci_udc_start(struct usb_gadget *gadget,
/**
* ci_udc_stop: unregister a gadget driver
*/
-static int ci_udc_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver)
+static int ci_udc_stop(struct usb_gadget *gadget)
{
struct ci_hdrc *ci = container_of(gadget, struct ci_hdrc, gadget);
unsigned long flags;
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 7b5856f..b11d6cf 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
*
* Stop udc hw block and stay tunned for future transmissions
*/
-static int s3c_hsotg_udc_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver)
+static int s3c_hsotg_udc_stop(struct usb_gadget *gadget)
{
struct s3c_hsotg *hsotg = to_hsotg(gadget);
unsigned long flags = 0;
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 1f2a719..428b047 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
return ret;
}
-static int dwc3_gadget_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver)
+static int dwc3_gadget_stop(struct usb_gadget *g)
{
struct dwc3 *dwc = gadget_to_dwc(g);
unsigned long flags;
diff --git a/drivers/usb/gadget/udc/amd5536udc.c b/drivers/usb/gadget/udc/amd5536udc.c
index 7d0e0b8..606b900 100644
--- a/drivers/usb/gadget/udc/amd5536udc.c
+++ b/drivers/usb/gadget/udc/amd5536udc.c
@@ -1401,9 +1401,8 @@ static int udc_wakeup(struct usb_gadget *gadget)
static int amd5536_udc_start(struct usb_gadget *g,
struct usb_gadget_driver *driver);
-static int amd5536_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver);
-/* gadget operations */
+static int amd5536_udc_stop(struct usb_gadget *g);
+
static const struct usb_gadget_ops udc_ops = {
.wakeup = udc_wakeup,
.get_frame = udc_get_frame,
@@ -1962,8 +1961,7 @@ __acquires(dev->lock)
}
/* Called by gadget driver to unregister itself */
-static int amd5536_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver)
+static int amd5536_udc_stop(struct usb_gadget *g)
{
struct udc *dev = to_amd5536_udc(g);
unsigned long flags;
diff --git a/drivers/usb/gadget/udc/at91_udc.c b/drivers/usb/gadget/udc/at91_udc.c
index 5c4cede..f47f16c 100644
--- a/drivers/usb/gadget/udc/at91_udc.c
+++ b/drivers/usb/gadget/udc/at91_udc.c
@@ -984,8 +984,8 @@ static int at91_set_selfpowered(struct usb_gadget *gadget, int is_on)
static int at91_start(struct usb_gadget *gadget,
struct usb_gadget_driver *driver);
-static int at91_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver);
+static int at91_stop(struct usb_gadget *gadget);
+
static const struct usb_gadget_ops at91_udc_ops = {
.get_frame = at91_get_frame,
.wakeup = at91_wakeup,
@@ -1644,8 +1644,7 @@ static int at91_start(struct usb_gadget *gadget,
return 0;
}
-static int at91_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver)
+static int at91_stop(struct usb_gadget *gadget)
{
struct at91_udc *udc;
unsigned long flags;
diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c
index eaee5f9..c537a66 100644
--- a/drivers/usb/gadget/udc/atmel_usba_udc.c
+++ b/drivers/usb/gadget/udc/atmel_usba_udc.c
@@ -987,8 +987,8 @@ usba_udc_set_selfpowered(struct usb_gadget *gadget, int is_selfpowered)
static int atmel_usba_start(struct usb_gadget *gadget,
struct usb_gadget_driver *driver);
-static int atmel_usba_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver);
+static int atmel_usba_stop(struct usb_gadget *gadget);
+
static const struct usb_gadget_ops usba_udc_ops = {
.get_frame = usba_udc_get_frame,
.wakeup = usba_udc_wakeup,
@@ -1807,8 +1807,7 @@ static int atmel_usba_start(struct usb_gadget *gadget,
return 0;
}
-static int atmel_usba_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver)
+static int atmel_usba_stop(struct usb_gadget *gadget)
{
struct usba_udc *udc = container_of(gadget, struct usba_udc, gadget);
unsigned long flags;
diff --git a/drivers/usb/gadget/udc/bcm63xx_udc.c b/drivers/usb/gadget/udc/bcm63xx_udc.c
index 485c8c2..9319ff2 100644
--- a/drivers/usb/gadget/udc/bcm63xx_udc.c
+++ b/drivers/usb/gadget/udc/bcm63xx_udc.c
@@ -1836,8 +1836,7 @@ static int bcm63xx_udc_start(struct usb_gadget *gadget,
*/
-static int bcm63xx_udc_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver)
+static int bcm63xx_udc_stop(struct usb_gadget *gadget)
{
struct bcm63xx_udc *udc = gadget_to_udc(gadget);
unsigned long flags;
diff --git a/drivers/usb/gadget/udc/dummy_hcd.c b/drivers/usb/gadget/udc/dummy_hcd.c
index 5c72ade..5bffb75 100644
--- a/drivers/usb/gadget/udc/dummy_hcd.c
+++ b/drivers/usb/gadget/udc/dummy_hcd.c
@@ -851,8 +851,7 @@ static int dummy_pullup(struct usb_gadget *_gadget, int value)
static int dummy_udc_start(struct usb_gadget *g,
struct usb_gadget_driver *driver);
-static int dummy_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver);
+static int dummy_udc_stop(struct usb_gadget *g);
static const struct usb_gadget_ops dummy_ops = {
.get_frame = dummy_g_get_frame,
@@ -913,8 +912,7 @@ static int dummy_udc_start(struct usb_gadget *g,
return 0;
}
-static int dummy_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver)
+static int dummy_udc_stop(struct usb_gadget *g)
{
struct dummy_hcd *dum_hcd = gadget_to_dummy_hcd(g);
struct dummy *dum = dum_hcd->dum;
diff --git a/drivers/usb/gadget/udc/fotg210-udc.c b/drivers/usb/gadget/udc/fotg210-udc.c
index 1d31592..1ca52e11 100644
--- a/drivers/usb/gadget/udc/fotg210-udc.c
+++ b/drivers/usb/gadget/udc/fotg210-udc.c
@@ -1053,8 +1053,7 @@ static void fotg210_init(struct fotg210_udc *fotg210)
iowrite32(value, fotg210->reg + FOTG210_DMISGR0);
}
-static int fotg210_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver)
+static int fotg210_udc_stop(struct usb_gadget *g)
{
struct fotg210_udc *fotg210 = gadget_to_fotg210(g);
unsigned long flags;
diff --git a/drivers/usb/gadget/udc/fsl_qe_udc.c b/drivers/usb/gadget/udc/fsl_qe_udc.c
index 6ca61e6..01f29ef 100644
--- a/drivers/usb/gadget/udc/fsl_qe_udc.c
+++ b/drivers/usb/gadget/udc/fsl_qe_udc.c
@@ -1887,8 +1887,7 @@ static int qe_get_frame(struct usb_gadget *gadget)
static int fsl_qe_start(struct usb_gadget *gadget,
struct usb_gadget_driver *driver);
-static int fsl_qe_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver);
+static int fsl_qe_stop(struct usb_gadget *gadget);
/* defined in usb_gadget.h */
static const struct usb_gadget_ops qe_gadget_ops = {
@@ -2308,8 +2307,7 @@ static int fsl_qe_start(struct usb_gadget *gadget,
return 0;
}
-static int fsl_qe_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver)
+static int fsl_qe_stop(struct usb_gadget *gadget)
{
struct qe_udc *udc;
struct qe_ep *loop_ep;
diff --git a/drivers/usb/gadget/udc/fsl_udc_core.c b/drivers/usb/gadget/udc/fsl_udc_core.c
index c362079..b184ed3 100644
--- a/drivers/usb/gadget/udc/fsl_udc_core.c
+++ b/drivers/usb/gadget/udc/fsl_udc_core.c
@@ -1236,9 +1236,8 @@ static int fsl_pullup(struct usb_gadget *gadget, int is_on)
static int fsl_udc_start(struct usb_gadget *g,
struct usb_gadget_driver *driver);
-static int fsl_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver);
-/* defined in gadget.h */
+static int fsl_udc_stop(struct usb_gadget *g);
+
static const struct usb_gadget_ops fsl_gadget_ops = {
.get_frame = fsl_get_frame,
.wakeup = fsl_wakeup,
@@ -1975,8 +1974,7 @@ static int fsl_udc_start(struct usb_gadget *g,
}
/* Disconnect from gadget driver */
-static int fsl_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver)
+static int fsl_udc_stop(struct usb_gadget *g)
{
struct fsl_ep *loop_ep;
unsigned long flags;
diff --git a/drivers/usb/gadget/udc/fusb300_udc.c b/drivers/usb/gadget/udc/fusb300_udc.c
index 8286df7..a1b33f5 100644
--- a/drivers/usb/gadget/udc/fusb300_udc.c
+++ b/drivers/usb/gadget/udc/fusb300_udc.c
@@ -1320,8 +1320,7 @@ static int fusb300_udc_start(struct usb_gadget *g,
return 0;
}
-static int fusb300_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver)
+static int fusb300_udc_stop(struct usb_gadget *g)
{
struct fusb300 *fusb300 = to_fusb300(g);
diff --git a/drivers/usb/gadget/udc/goku_udc.c b/drivers/usb/gadget/udc/goku_udc.c
index bf9c5ef..5b9176e 100644
--- a/drivers/usb/gadget/udc/goku_udc.c
+++ b/drivers/usb/gadget/udc/goku_udc.c
@@ -992,8 +992,7 @@ static int goku_get_frame(struct usb_gadget *_gadget)
static int goku_udc_start(struct usb_gadget *g,
struct usb_gadget_driver *driver);
-static int goku_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver);
+static int goku_udc_stop(struct usb_gadget *g);
static const struct usb_gadget_ops goku_ops = {
.get_frame = goku_get_frame,
@@ -1364,8 +1363,7 @@ static void stop_activity(struct goku_udc *dev)
udc_enable(dev);
}
-static int goku_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver)
+static int goku_udc_stop(struct usb_gadget *g)
{
struct goku_udc *dev = to_goku_udc(g);
unsigned long flags;
diff --git a/drivers/usb/gadget/udc/gr_udc.c b/drivers/usb/gadget/udc/gr_udc.c
index bde989f..320df9a2 100644
--- a/drivers/usb/gadget/udc/gr_udc.c
+++ b/drivers/usb/gadget/udc/gr_udc.c
@@ -1935,8 +1935,7 @@ static int gr_udc_start(struct usb_gadget *gadget,
return 0;
}
-static int gr_udc_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver)
+static int gr_udc_stop(struct usb_gadget *gadget)
{
struct gr_udc *dev = to_gr_udc(gadget);
unsigned long flags;
diff --git a/drivers/usb/gadget/udc/lpc32xx_udc.c b/drivers/usb/gadget/udc/lpc32xx_udc.c
index cef64b9..4be497d 100644
--- a/drivers/usb/gadget/udc/lpc32xx_udc.c
+++ b/drivers/usb/gadget/udc/lpc32xx_udc.c
@@ -2559,7 +2559,7 @@ static int lpc32xx_pullup(struct usb_gadget *gadget, int is_on)
}
static int lpc32xx_start(struct usb_gadget *, struct usb_gadget_driver *);
-static int lpc32xx_stop(struct usb_gadget *, struct usb_gadget_driver *);
+static int lpc32xx_stop(struct usb_gadget *);
static const struct usb_gadget_ops lpc32xx_udc_ops = {
.get_frame = lpc32xx_get_frame,
@@ -2961,8 +2961,7 @@ static int lpc32xx_start(struct usb_gadget *gadget,
return 0;
}
-static int lpc32xx_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver)
+static int lpc32xx_stop(struct usb_gadget *gadget)
{
int i;
struct lpc32xx_udc *udc = to_udc(gadget);
diff --git a/drivers/usb/gadget/udc/m66592-udc.c b/drivers/usb/gadget/udc/m66592-udc.c
index 8985656..311ec5f 100644
--- a/drivers/usb/gadget/udc/m66592-udc.c
+++ b/drivers/usb/gadget/udc/m66592-udc.c
@@ -1485,8 +1485,7 @@ static int m66592_udc_start(struct usb_gadget *g,
return 0;
}
-static int m66592_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver)
+static int m66592_udc_stop(struct usb_gadget *g)
{
struct m66592 *m66592 = to_m66592(g);
diff --git a/drivers/usb/gadget/udc/mv_u3d_core.c b/drivers/usb/gadget/udc/mv_u3d_core.c
index e3ef744..ea422ac 100644
--- a/drivers/usb/gadget/udc/mv_u3d_core.c
+++ b/drivers/usb/gadget/udc/mv_u3d_core.c
@@ -1266,8 +1266,7 @@ static int mv_u3d_start(struct usb_gadget *g,
return 0;
}
-static int mv_u3d_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver)
+static int mv_u3d_stop(struct usb_gadget *g)
{
struct mv_u3d *u3d = container_of(g, struct mv_u3d, gadget);
struct mv_usb_platform_data *pdata = dev_get_platdata(u3d->dev);
diff --git a/drivers/usb/gadget/udc/mv_udc_core.c b/drivers/usb/gadget/udc/mv_udc_core.c
index 32d24ff..f104ac0 100644
--- a/drivers/usb/gadget/udc/mv_udc_core.c
+++ b/drivers/usb/gadget/udc/mv_udc_core.c
@@ -1223,7 +1223,7 @@ static int mv_udc_pullup(struct usb_gadget *gadget, int is_on)
}
static int mv_udc_start(struct usb_gadget *, struct usb_gadget_driver *);
-static int mv_udc_stop(struct usb_gadget *, struct usb_gadget_driver *);
+static int mv_udc_stop(struct usb_gadget *);
/* device controller usb_gadget_ops structure */
static const struct usb_gadget_ops mv_ops = {
@@ -1371,8 +1371,7 @@ static int mv_udc_start(struct usb_gadget *gadget,
return 0;
}
-static int mv_udc_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver)
+static int mv_udc_stop(struct usb_gadget *gadget)
{
struct mv_udc *udc;
unsigned long flags;
diff --git a/drivers/usb/gadget/udc/net2272.c b/drivers/usb/gadget/udc/net2272.c
index 4641df5..887bea4 100644
--- a/drivers/usb/gadget/udc/net2272.c
+++ b/drivers/usb/gadget/udc/net2272.c
@@ -1169,8 +1169,7 @@ net2272_pullup(struct usb_gadget *_gadget, int is_on)
static int net2272_start(struct usb_gadget *_gadget,
struct usb_gadget_driver *driver);
-static int net2272_stop(struct usb_gadget *_gadget,
- struct usb_gadget_driver *driver);
+static int net2272_stop(struct usb_gadget *_gadget);
static const struct usb_gadget_ops net2272_ops = {
.get_frame = net2272_get_frame,
@@ -1500,8 +1499,7 @@ stop_activity(struct net2272 *dev, struct usb_gadget_driver *driver)
net2272_usb_reinit(dev);
}
-static int net2272_stop(struct usb_gadget *_gadget,
- struct usb_gadget_driver *driver)
+static int net2272_stop(struct usb_gadget *_gadget)
{
struct net2272 *dev;
unsigned long flags;
diff --git a/drivers/usb/gadget/udc/net2280.c b/drivers/usb/gadget/udc/net2280.c
index c3ebdcd..73250a6 100644
--- a/drivers/usb/gadget/udc/net2280.c
+++ b/drivers/usb/gadget/udc/net2280.c
@@ -1548,8 +1548,7 @@ static int net2280_pullup(struct usb_gadget *_gadget, int is_on)
static int net2280_start(struct usb_gadget *_gadget,
struct usb_gadget_driver *driver);
-static int net2280_stop(struct usb_gadget *_gadget,
- struct usb_gadget_driver *driver);
+static int net2280_stop(struct usb_gadget *_gadget);
static const struct usb_gadget_ops net2280_ops = {
.get_frame = net2280_get_frame,
@@ -2432,8 +2431,7 @@ static void stop_activity(struct net2280 *dev, struct usb_gadget_driver *driver)
usb_reinit(dev);
}
-static int net2280_stop(struct usb_gadget *_gadget,
- struct usb_gadget_driver *driver)
+static int net2280_stop(struct usb_gadget *_gadget)
{
struct net2280 *dev;
unsigned long flags;
diff --git a/drivers/usb/gadget/udc/omap_udc.c b/drivers/usb/gadget/udc/omap_udc.c
index dcdfea4..534b85c 100644
--- a/drivers/usb/gadget/udc/omap_udc.c
+++ b/drivers/usb/gadget/udc/omap_udc.c
@@ -1311,8 +1311,7 @@ static int omap_pullup(struct usb_gadget *gadget, int is_on)
static int omap_udc_start(struct usb_gadget *g,
struct usb_gadget_driver *driver);
-static int omap_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver);
+static int omap_udc_stop(struct usb_gadget *g);
static const struct usb_gadget_ops omap_gadget_ops = {
.get_frame = omap_get_frame,
return status;
}
-static int omap_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver)
+static int omap_udc_stop(struct usb_gadget *g)
{
unsigned long flags;
int status = -ENODEV;
diff --git a/drivers/usb/gadget/udc/pch_udc.c b/drivers/usb/gadget/udc/pch_udc.c
index ccbe3d4..6534f36 100644
--- a/drivers/usb/gadget/udc/pch_udc.c
+++ b/drivers/usb/gadget/udc/pch_udc.c
@@ -1240,8 +1240,8 @@ static int pch_udc_pcd_vbus_draw(struct usb_gadget *gadget, unsigned int mA)
static int pch_udc_start(struct usb_gadget *g,
struct usb_gadget_driver *driver);
-static int pch_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver);
+static int pch_udc_stop(struct usb_gadget *g);
+
static const struct usb_gadget_ops pch_udc_ops = {
.get_frame = pch_udc_pcd_get_frame,
.wakeup = pch_udc_pcd_wakeup,
@@ -3008,8 +3008,7 @@ static int pch_udc_start(struct usb_gadget *g,
return 0;
}
-static int pch_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver)
+static int pch_udc_stop(struct usb_gadget *g)
{
struct pch_udc_dev *dev = to_pch_udc(g);
diff --git a/drivers/usb/gadget/udc/pxa25x_udc.c b/drivers/usb/gadget/udc/pxa25x_udc.c
index 098fa57..2944092 100644
--- a/drivers/usb/gadget/udc/pxa25x_udc.c
+++ b/drivers/usb/gadget/udc/pxa25x_udc.c
@@ -998,8 +998,7 @@ static int pxa25x_udc_vbus_draw(struct usb_gadget *_gadget, unsigned mA)
static int pxa25x_udc_start(struct usb_gadget *g,
struct usb_gadget_driver *driver);
-static int pxa25x_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver);
+static int pxa25x_udc_stop(struct usb_gadget *g);
static const struct usb_gadget_ops pxa25x_udc_ops = {
.get_frame = pxa25x_udc_get_frame,
@@ -1311,8 +1310,7 @@ stop_activity(struct pxa25x_udc *dev, struct usb_gadget_driver *driver)
udc_reinit(dev);
}
-static int pxa25x_udc_stop(struct usb_gadget*g,
- struct usb_gadget_driver *driver)
+static int pxa25x_udc_stop(struct usb_gadget*g)
{
struct pxa25x_udc *dev = to_pxa25x(g);
diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c b/drivers/usb/gadget/udc/pxa27x_udc.c
index b90b1f3..17a0193 100644
--- a/drivers/usb/gadget/udc/pxa27x_udc.c
+++ b/drivers/usb/gadget/udc/pxa27x_udc.c
@@ -1669,8 +1669,7 @@ static int pxa_udc_vbus_draw(struct usb_gadget *_gadget, unsigned mA)
static int pxa27x_udc_start(struct usb_gadget *g,
struct usb_gadget_driver *driver);
-static int pxa27x_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver);
+static int pxa27x_udc_stop(struct usb_gadget *g);
static const struct usb_gadget_ops pxa_udc_ops = {
.get_frame = pxa_udc_get_frame,
@@ -1857,8 +1856,7 @@ static void stop_activity(struct pxa_udc *udc, struct usb_gadget_driver *driver)
*
* Returns 0 if no error, -ENODEV, -EINVAL otherwise
*/
-static int pxa27x_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver)
+static int pxa27x_udc_stop(struct usb_gadget *g)
{
struct pxa_udc *udc = to_pxa(g);
diff --git a/drivers/usb/gadget/udc/r8a66597-udc.c b/drivers/usb/gadget/udc/r8a66597-udc.c
index f818661..b63a527 100644
--- a/drivers/usb/gadget/udc/r8a66597-udc.c
+++ b/drivers/usb/gadget/udc/r8a66597-udc.c
@@ -1763,8 +1763,7 @@ static int r8a66597_start(struct usb_gadget *gadget,
return 0;
}
-static int r8a66597_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver)
+static int r8a66597_stop(struct usb_gadget *gadget)
{
struct r8a66597 *r8a66597 = gadget_to_r8a66597(gadget);
unsigned long flags;
diff --git a/drivers/usb/gadget/udc/s3c-hsudc.c b/drivers/usb/gadget/udc/s3c-hsudc.c
index de95e9d..97d3a91 100644
--- a/drivers/usb/gadget/udc/s3c-hsudc.c
+++ b/drivers/usb/gadget/udc/s3c-hsudc.c
return ret;
}
-static int s3c_hsudc_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver)
+static int s3c_hsudc_stop(struct usb_gadget *gadget)
{
struct s3c_hsudc *hsudc = to_hsudc(gadget);
unsigned long flags;
diff --git a/drivers/usb/gadget/udc/s3c2410_udc.c b/drivers/usb/gadget/udc/s3c2410_udc.c
index ff423d1..2a8e36d 100644
--- a/drivers/usb/gadget/udc/s3c2410_udc.c
+++ b/drivers/usb/gadget/udc/s3c2410_udc.c
@@ -1541,8 +1541,7 @@ static int s3c2410_vbus_draw(struct usb_gadget *_gadget, unsigned ma)
static int s3c2410_udc_start(struct usb_gadget *g,
struct usb_gadget_driver *driver);
-static int s3c2410_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver);
+static int s3c2410_udc_stop(struct usb_gadget *g);
static const struct usb_gadget_ops s3c2410_ops = {
.get_frame = s3c2410_udc_get_frame,
@@ -1683,8 +1682,7 @@ static int s3c2410_udc_start(struct usb_gadget *g,
return 0;
}
-static int s3c2410_udc_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver)
+static int s3c2410_udc_stop(struct usb_gadget *g)
{
struct s3c2410_udc *udc = to_s3c2410(g);
diff --git a/drivers/usb/gadget/udc/udc-core.c b/drivers/usb/gadget/udc/udc-core.c
index 52f457b..135504b 100644
--- a/drivers/usb/gadget/udc/udc-core.c
+++ b/drivers/usb/gadget/udc/udc-core.c
@@ -204,7 +204,7 @@ static inline int usb_gadget_udc_start(struct usb_udc *udc)
*/
static inline void usb_gadget_udc_stop(struct usb_udc *udc)
{
- udc->gadget->ops->udc_stop(udc->gadget, udc->driver);
+ udc->gadget->ops->udc_stop(udc->gadget);
}
/**
diff --git a/drivers/usb/gadget/udc/udc-xilinx.c b/drivers/usb/gadget/udc/udc-xilinx.c
index ed27e16..1eac56f 100644
--- a/drivers/usb/gadget/udc/udc-xilinx.c
+++ b/drivers/usb/gadget/udc/udc-xilinx.c
*
* Return: zero always
*/
-static int xudc_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver)
+static int xudc_stop(struct usb_gadget *gadget)
{
struct xusb_udc *udc = to_udc(gadget);
unsigned long flags;
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index 88d63e0..4ab1896 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -1684,8 +1684,7 @@ static int musb_gadget_pullup(struct usb_gadget *gadget, int is_on)
static int musb_gadget_start(struct usb_gadget *g,
struct usb_gadget_driver *driver);
-static int musb_gadget_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver);
+static int musb_gadget_stop(struct usb_gadget *g);
static const struct usb_gadget_ops musb_gadget_operations = {
.get_frame = musb_gadget_get_frame,
@@ -1923,8 +1922,7 @@ static void stop_activity(struct musb *musb, struct usb_gadget_driver *driver)
*
*/
-static int musb_gadget_stop(struct usb_gadget *g,
- struct usb_gadget_driver *driver)
+static int musb_gadget_stop(struct usb_gadget *g)
{
struct musb *musb = gadget_to_musb(g);
unsigned long flags;
diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c
index 2d17c10..7a45210 100644
--- a/drivers/usb/renesas_usbhs/mod_gadget.c
+++ b/drivers/usb/renesas_usbhs/mod_gadget.c
@@ -851,8 +851,7 @@ static int usbhsg_gadget_start(struct usb_gadget *gadget,
return usbhsg_try_start(priv, USBHSG_STATUS_REGISTERD);
}
-static int usbhsg_gadget_stop(struct usb_gadget *gadget,
- struct usb_gadget_driver *driver)
+static int usbhsg_gadget_stop(struct usb_gadget *gadget)
{
struct usbhsg_gpriv *gpriv = usbhsg_gadget_to_gpriv(gadget);
struct usbhs_priv *priv = usbhsg_gpriv_to_priv(gpriv);
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index 522cafe..70965fc 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -490,8 +490,7 @@ struct usb_gadget_ops {
void (*get_config_params)(struct usb_dcd_config_params *);
int (*udc_start)(struct usb_gadget *,
struct usb_gadget_driver *);
- int (*udc_stop)(struct usb_gadget *,
- struct usb_gadget_driver *);
+ int (*udc_stop)(struct usb_gadget *);
};
/**
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:17:11 UTC
Permalink
Raw Message
now that we provide generic register/unregister
debugging messages from udc-core, we can remove
the same messages from this driver.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/udc/s3c-hsudc.c | 5 -----
1 file changed, 5 deletions(-)

diff --git a/drivers/usb/gadget/udc/s3c-hsudc.c b/drivers/usb/gadget/udc/s3c-hsudc.c
index f3bb2fa..de95e9d 100644
--- a/drivers/usb/gadget/udc/s3c-hsudc.c
+++ b/drivers/usb/gadget/udc/s3c-hsudc.c
@@ -1172,8 +1172,6 @@ static int s3c_hsudc_start(struct usb_gadget *gadget,
}

enable_irq(hsudc->irq);
- dev_info(hsudc->dev, "bound driver %s\n", driver->driver.name);
-
s3c_hsudc_reconfig(hsudc);

pm_runtime_get_sync(hsudc->dev);
@@ -1216,9 +1214,6 @@ static int s3c_hsudc_stop(struct usb_gadget *gadget,
disable_irq(hsudc->irq);

regulator_bulk_disable(ARRAY_SIZE(hsudc->supplies), hsudc->supplies);
Felipe Balbi
2014-10-17 17:17:12 UTC
Permalink
Raw Message
now that we provide generic register/unregister
debugging messages from udc-core, we can remove
the same messages from this driver.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/musb/musb_gadget.c | 5 -----
1 file changed, 5 deletions(-)

diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index fdb8b31..88d63e0 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -1851,8 +1851,6 @@ static int musb_gadget_start(struct usb_gadget *g,

pm_runtime_get_sync(musb->controller);

- dev_dbg(musb->controller, "registering driver %s\n", driver->function);
-
musb->softconnect = 0;
musb->gadget_driver = driver;

@@ -1949,9 +1947,6 @@ static int musb_gadget_stop(struct usb_gadget *g,
stop_activity(musb, NULL);
otg_set_peripheral(musb->xceiv->otg, NULL);

- dev_dbg(musb->controller, "unregistering driver %s\n",
- musb->gadget_driver->function);
Felipe Balbi
2014-10-17 17:17:09 UTC
Permalink
Raw Message
now that we provide generic register/unregister
debugging messages from udc-core, we can remove
the same messages from this driver.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/udc/net2272.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/drivers/usb/gadget/udc/net2272.c b/drivers/usb/gadget/udc/net2272.c
index 6fb54f5..4641df5 100644
--- a/drivers/usb/gadget/udc/net2272.c
+++ b/drivers/usb/gadget/udc/net2272.c
@@ -1471,8 +1471,6 @@ static int net2272_start(struct usb_gadget *_gadget,
*/
net2272_ep0_start(dev);

- dev_dbg(dev->dev, "%s ready\n", driver->driver.name);
Felipe Balbi
2014-10-17 17:16:59 UTC
Permalink
Raw Message
future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/udc/pxa25x_udc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/pxa25x_udc.c b/drivers/usb/gadget/udc/pxa25x_udc.c
index 42f7eeb..098fa57 100644
--- a/drivers/usb/gadget/udc/pxa25x_udc.c
+++ b/drivers/usb/gadget/udc/pxa25x_udc.c
@@ -1319,7 +1319,7 @@ static int pxa25x_udc_stop(struct usb_gadget*g,
local_irq_disable();
dev->pullup = 0;
pullup(dev);
- stop_activity(dev, driver);
+ stop_activity(dev, NULL);
local_irq_enable();

if (!IS_ERR_OR_NULL(dev->transceiver))
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:17:02 UTC
Permalink
Raw Message
future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/musb/musb_gadget.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index 24c8c02..fdb8b31 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -1946,11 +1946,11 @@ static int musb_gadget_stop(struct usb_gadget *g,
(void) musb_gadget_vbus_draw(&musb->g, 0);

musb->xceiv->state = OTG_STATE_UNDEFINED;
- stop_activity(musb, driver);
+ stop_activity(musb, NULL);
otg_set_peripheral(musb->xceiv->otg, NULL);

dev_dbg(musb->controller, "unregistering driver %s\n",
- driver ? driver->function : "(removed)");
+ musb->gadget_driver->function);

musb->is_active = 0;
musb->gadget_driver = NULL;
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:55 UTC
Permalink
Raw Message
future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/udc/mv_u3d_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/mv_u3d_core.c b/drivers/usb/gadget/udc/mv_u3d_core.c
index 046a1f8..e3ef744 100644
--- a/drivers/usb/gadget/udc/mv_u3d_core.c
+++ b/drivers/usb/gadget/udc/mv_u3d_core.c
@@ -1284,7 +1284,7 @@ static int mv_u3d_stop(struct usb_gadget *g,
mv_u3d_controller_stop(u3d);
/* stop all usb activities */
u3d->gadget.speed = USB_SPEED_UNKNOWN;
- mv_u3d_stop_activity(u3d, driver);
+ mv_u3d_stop_activity(u3d, NULL);
mv_u3d_disable(u3d);

if (pdata->phy_deinit)
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:17:08 UTC
Permalink
Raw Message
now that we provide generic register/unregister
debugging messages from udc-core, we can remove
the same messages from this driver.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/udc/gr_udc.c | 5 -----
1 file changed, 5 deletions(-)

diff --git a/drivers/usb/gadget/udc/gr_udc.c b/drivers/usb/gadget/udc/gr_udc.c
index 1b3048a..bde989f 100644
--- a/drivers/usb/gadget/udc/gr_udc.c
+++ b/drivers/usb/gadget/udc/gr_udc.c
@@ -1932,9 +1932,6 @@ static int gr_udc_start(struct usb_gadget *gadget,

spin_unlock(&dev->lock);

- dev_info(dev->dev, "Started with gadget driver '%s'\n",
- driver->driver.name);
-
return 0;
}

@@ -1951,8 +1948,6 @@ static int gr_udc_stop(struct usb_gadget *gadget,

spin_unlock_irqrestore(&dev->lock, flags);

- dev_info(dev->dev, "Stopped\n");
Felipe Balbi
2014-10-17 17:16:57 UTC
Permalink
Raw Message
future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/udc/net2272.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/udc/net2272.c b/drivers/usb/gadget/udc/net2272.c
index 84d7162..6fb54f5 100644
--- a/drivers/usb/gadget/udc/net2272.c
+++ b/drivers/usb/gadget/udc/net2272.c
@@ -1511,12 +1511,13 @@ static int net2272_stop(struct usb_gadget *_gadget,
dev = container_of(_gadget, struct net2272, gadget);

spin_lock_irqsave(&dev->lock, flags);
- stop_activity(dev, driver);
+ stop_activity(dev, NULL);
spin_unlock_irqrestore(&dev->lock, flags);

+ dev_dbg(dev->dev, "unregistered driver '%s'\n",
+ dev->driver->driver.name);
dev->driver = NULL;

- dev_dbg(dev->dev, "unregistered driver '%s'\n", driver->driver.name);
return 0;
}
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:17:04 UTC
Permalink
Raw Message
now that we provide generic register/unregister
debugging messages from udc-core, we can remove
the same messages from this driver.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/udc/at91_udc.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/usb/gadget/udc/at91_udc.c b/drivers/usb/gadget/udc/at91_udc.c
index cffd2a2..5c4cede 100644
--- a/drivers/usb/gadget/udc/at91_udc.c
+++ b/drivers/usb/gadget/udc/at91_udc.c
@@ -1641,7 +1641,6 @@ static int at91_start(struct usb_gadget *gadget,
udc->enabled = 1;
udc->selfpowered = 1;

- DBG("bound to %s\n", driver->driver.name);
return 0;
}

@@ -1657,7 +1656,6 @@ static int at91_stop(struct usb_gadget *gadget,
at91_udp_write(udc, AT91_UDP_IDR, ~0);
spin_unlock_irqrestore(&udc->lock, flags);

- DBG("unbound from %s\n", udc->driver->driver.name);
udc->driver = NULL;

return 0;
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:17:01 UTC
Permalink
Raw Message
future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/udc/s3c-hsudc.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/gadget/udc/s3c-hsudc.c b/drivers/usb/gadget/udc/s3c-hsudc.c
index f658f69..f3bb2fa 100644
--- a/drivers/usb/gadget/udc/s3c-hsudc.c
+++ b/drivers/usb/gadget/udc/s3c-hsudc.c
@@ -1199,11 +1199,7 @@ static int s3c_hsudc_stop(struct usb_gadget *gadget,
if (!hsudc)
return -ENODEV;

- if (!driver || driver != hsudc->driver)
- return -EINVAL;
Felipe Balbi
2014-10-17 17:16:56 UTC
Permalink
Raw Message
future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/udc/mv_udc_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/mv_udc_core.c b/drivers/usb/gadget/udc/mv_udc_core.c
index cebb948..32d24ff 100644
--- a/drivers/usb/gadget/udc/mv_udc_core.c
+++ b/drivers/usb/gadget/udc/mv_udc_core.c
@@ -1386,7 +1386,7 @@ static int mv_udc_stop(struct usb_gadget *gadget,

/* stop all usb activities */
udc->gadget.speed = USB_SPEED_UNKNOWN;
- stop_activity(udc, driver);
+ stop_activity(udc, NULL);
mv_udc_disable(udc);

spin_unlock_irqrestore(&udc->lock, flags);
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:17:00 UTC
Permalink
Raw Message
future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/udc/pxa27x_udc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c b/drivers/usb/gadget/udc/pxa27x_udc.c
index 55598c0..b90b1f3 100644
--- a/drivers/usb/gadget/udc/pxa27x_udc.c
+++ b/drivers/usb/gadget/udc/pxa27x_udc.c
@@ -1862,7 +1862,7 @@ static int pxa27x_udc_stop(struct usb_gadget *g,
{
struct pxa_udc *udc = to_pxa(g);

- stop_activity(udc, driver);
+ stop_activity(udc, NULL);
udc_disable(udc);
dplus_pullup(udc, 0);
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:44 UTC
Permalink
Raw Message
From: Peter Chen <peter.chen-***@public.gmane.org>

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen-***@public.gmane.org>
Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/phy/phy-rcar-gen2-usb.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/usb/phy/phy-rcar-gen2-usb.c b/drivers/usb/phy/phy-rcar-gen2-usb.c
index 388d89f..f838084 100644
--- a/drivers/usb/phy/phy-rcar-gen2-usb.c
+++ b/drivers/usb/phy/phy-rcar-gen2-usb.c
@@ -195,10 +195,8 @@ static int rcar_gen2_usb_phy_probe(struct platform_device *pdev)
return PTR_ERR(base);

priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
- if (!priv) {
- dev_err(dev, "Memory allocation failed\n");
+ if (!priv)
return -ENOMEM;
- }

spin_lock_init(&priv->lock);
priv->clk = clk;
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:46 UTC
Permalink
Raw Message
From: Peter Chen <peter.chen-***@public.gmane.org>

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen-***@public.gmane.org>
Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/phy/phy-msm-usb.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
index 7843ef7..471e69d 100644
--- a/drivers/usb/phy/phy-msm-usb.c
+++ b/drivers/usb/phy/phy-msm-usb.c
@@ -1505,10 +1505,8 @@ static int msm_otg_read_dt(struct platform_device *pdev, struct msm_otg *motg)
}

pdata->phy_init_seq = devm_kzalloc(&pdev->dev, len, GFP_KERNEL);
- if (!pdata->phy_init_seq) {
- dev_warn(&pdev->dev, "No space for PHY init sequence\n");
+ if (!pdata->phy_init_seq)
return 0;
- }

ret = of_property_read_u32_array(node, "qcom,phy-init-sequence",
pdata->phy_init_seq, words);
@@ -1530,10 +1528,8 @@ static int msm_otg_probe(struct platform_device *pdev)
void __iomem *phy_select;

motg = devm_kzalloc(&pdev->dev, sizeof(struct msm_otg), GFP_KERNEL);
- if (!motg) {
- dev_err(&pdev->dev, "unable to allocate msm_otg\n");
+ if (!motg)
return -ENOMEM;
- }

pdata = dev_get_platdata(&pdev->dev);
if (!pdata) {
@@ -1546,10 +1542,8 @@ static int msm_otg_probe(struct platform_device *pdev)

motg->phy.otg = devm_kzalloc(&pdev->dev, sizeof(struct usb_otg),
GFP_KERNEL);
- if (!motg->phy.otg) {
- dev_err(&pdev->dev, "unable to allocate msm_otg\n");
+ if (!motg->phy.otg)
return -ENOMEM;
- }

phy = &motg->phy;
phy->dev = &pdev->dev;
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:48 UTC
Permalink
Raw Message
From: Peter Chen <peter.chen-***@public.gmane.org>

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen-***@public.gmane.org>
Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/renesas_usbhs/common.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c
index b3b6813..6dae115 100644
--- a/drivers/usb/renesas_usbhs/common.c
+++ b/drivers/usb/renesas_usbhs/common.c
@@ -505,10 +505,8 @@ static int usbhs_probe(struct platform_device *pdev)

/* usb private data */
priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
- if (!priv) {
- dev_err(&pdev->dev, "Could not allocate priv\n");
+ if (!priv)
return -ENOMEM;
- }

priv->base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(priv->base))
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:43 UTC
Permalink
Raw Message
From: Peter Chen <peter.chen-***@public.gmane.org>

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen-***@public.gmane.org>
Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/phy/phy-am335x-control.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/usb/phy/phy-am335x-control.c b/drivers/usb/phy/phy-am335x-control.c
index 35b6083..2e923c5 100644
--- a/drivers/usb/phy/phy-am335x-control.c
+++ b/drivers/usb/phy/phy-am335x-control.c
@@ -147,10 +147,8 @@ static int am335x_control_usb_probe(struct platform_device *pdev)
phy_ctrl = of_id->data;

ctrl_usb = devm_kzalloc(&pdev->dev, sizeof(*ctrl_usb), GFP_KERNEL);
- if (!ctrl_usb) {
- dev_err(&pdev->dev, "unable to alloc memory for control usb\n");
+ if (!ctrl_usb)
return -ENOMEM;
- }

ctrl_usb->dev = &pdev->dev;
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:45 UTC
Permalink
Raw Message
From: Peter Chen <peter.chen-***@public.gmane.org>

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen-***@public.gmane.org>
Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/phy/phy-mxs-usb.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c
index 0e0c415..a55dadc 100644
--- a/drivers/usb/phy/phy-mxs-usb.c
+++ b/drivers/usb/phy/phy-mxs-usb.c
@@ -390,10 +390,8 @@ static int mxs_phy_probe(struct platform_device *pdev)
}

mxs_phy = devm_kzalloc(&pdev->dev, sizeof(*mxs_phy), GFP_KERNEL);
- if (!mxs_phy) {
- dev_err(&pdev->dev, "Failed to allocate USB PHY structure!\n");
+ if (!mxs_phy)
return -ENOMEM;
- }

/* Some SoCs don't have anatop registers */
if (of_get_property(np, "fsl,anatop", NULL)) {
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:49 UTC
Permalink
Raw Message
From: Vinod Koul <vinod.koul-***@public.gmane.org>

The drivers should use dmaengine_terminate_all() or dmaengine_slave_config()
API instead of accessing the device_control which will be deprecated soon

Signed-off-by: Vinod Koul <vinod.koul-***@public.gmane.org>
Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/musb/ux500_dma.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/musb/ux500_dma.c b/drivers/usb/musb/ux500_dma.c
index 221faed..734dc84 100644
--- a/drivers/usb/musb/ux500_dma.c
+++ b/drivers/usb/musb/ux500_dma.c
@@ -121,8 +121,7 @@ static bool ux500_configure_channel(struct dma_channel *channel,
slave_conf.dst_maxburst = 16;
slave_conf.device_fc = false;

- dma_chan->device->device_control(dma_chan, DMA_SLAVE_CONFIG,
- (unsigned long) &slave_conf);
+ dmaengine_slave_config(dma_chan, &slave_conf);

dma_desc = dmaengine_prep_slave_sg(dma_chan, &sg, 1, direction,
DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
@@ -246,9 +245,7 @@ static int ux500_dma_channel_abort(struct dma_channel *channel)
musb_writew(epio, MUSB_RXCSR, csr);
}

- ux500_channel->dma_chan->device->
- device_control(ux500_channel->dma_chan,
- DMA_TERMINATE_ALL, 0);
+ dmaengine_terminate_all(ux500_channel->dma_chan);
channel->status = MUSB_DMA_STATUS_FREE;
}
return 0;
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:53 UTC
Permalink
Raw Message
future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/udc/fsl_qe_udc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/udc/fsl_qe_udc.c b/drivers/usb/gadget/udc/fsl_qe_udc.c
index 6601b0f..be78857 100644
--- a/drivers/usb/gadget/udc/fsl_qe_udc.c
+++ b/drivers/usb/gadget/udc/fsl_qe_udc.c
@@ -2334,10 +2334,10 @@ static int fsl_qe_stop(struct usb_gadget *gadget,
nuke(loop_ep, -ESHUTDOWN);
spin_unlock_irqrestore(&udc->lock, flags);

+ dev_info(udc->dev, "unregistered gadget driver '%s'\r\n",
+ udc->driver->driver.name);
udc->driver = NULL;

- dev_info(udc->dev, "unregistered gadget driver '%s'\r\n",
- driver->driver.name);
return 0;
}
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:51 UTC
Permalink
Raw Message
future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/udc/at91_udc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/at91_udc.c b/drivers/usb/gadget/udc/at91_udc.c
index 9968f53..cffd2a2 100644
--- a/drivers/usb/gadget/udc/at91_udc.c
+++ b/drivers/usb/gadget/udc/at91_udc.c
@@ -1657,9 +1657,9 @@ static int at91_stop(struct usb_gadget *gadget,
at91_udp_write(udc, AT91_UDP_IDR, ~0);
spin_unlock_irqrestore(&udc->lock, flags);

+ DBG("unbound from %s\n", udc->driver->driver.name);
udc->driver = NULL;

- DBG("unbound from %s\n", driver->driver.name);
return 0;
}
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:41 UTC
Permalink
Raw Message
From: Peter Chen <peter.chen-***@public.gmane.org>

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen-***@public.gmane.org>
Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/phy/phy-rcar-usb.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/usb/phy/phy-rcar-usb.c b/drivers/usb/phy/phy-rcar-usb.c
index 33265a5..4879596 100644
--- a/drivers/usb/phy/phy-rcar-usb.c
+++ b/drivers/usb/phy/phy-rcar-usb.c
@@ -202,10 +202,8 @@ static int rcar_usb_phy_probe(struct platform_device *pdev)
}

priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
- if (!priv) {
- dev_err(dev, "priv data allocation error\n");
+ if (!priv)
return -ENOMEM;
- }

priv->reg0 = reg0;
priv->reg1 = reg1;
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:50 UTC
Permalink
Raw Message
future patches will remove the extra 'driver'
argument to ->udc_stop(), in order to do that,
we must make sure that our UDC does not rely
on it first.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/udc/amd5536udc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/amd5536udc.c b/drivers/usb/gadget/udc/amd5536udc.c
index 3b9d138..7d0e0b8 100644
--- a/drivers/usb/gadget/udc/amd5536udc.c
+++ b/drivers/usb/gadget/udc/amd5536udc.c
@@ -1971,7 +1971,7 @@ static int amd5536_udc_stop(struct usb_gadget *g,

spin_lock_irqsave(&dev->lock, flags);
udc_mask_unused_interrupts(dev);
- shutdown(dev, driver);
+ shutdown(dev, NULL);
spin_unlock_irqrestore(&dev->lock, flags);

dev->driver = NULL;
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:42 UTC
Permalink
Raw Message
From: Peter Chen <peter.chen-***@public.gmane.org>

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen-***@public.gmane.org>
Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/phy/phy-tegra-usb.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/usb/phy/phy-tegra-usb.c b/drivers/usb/phy/phy-tegra-usb.c
index 886f180..fa2bfa4 100644
--- a/drivers/usb/phy/phy-tegra-usb.c
+++ b/drivers/usb/phy/phy-tegra-usb.c
@@ -880,11 +880,8 @@ static int utmi_phy_probe(struct tegra_usb_phy *tegra_phy,

tegra_phy->config = devm_kzalloc(&pdev->dev, sizeof(*config),
GFP_KERNEL);
- if (!tegra_phy->config) {
- dev_err(&pdev->dev,
- "unable to allocate memory for USB UTMIP config\n");
+ if (!tegra_phy->config)
return -ENOMEM;
- }

config = tegra_phy->config;

@@ -979,10 +976,8 @@ static int tegra_usb_phy_probe(struct platform_device *pdev)
int err;

tegra_phy = devm_kzalloc(&pdev->dev, sizeof(*tegra_phy), GFP_KERNEL);
- if (!tegra_phy) {
- dev_err(&pdev->dev, "unable to allocate memory for USB2 PHY\n");
+ if (!tegra_phy)
return -ENOMEM;
- }

match = of_match_device(tegra_usb_phy_id_table, &pdev->dev);
if (!match) {
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:37 UTC
Permalink
Raw Message
From: Peter Chen <peter.chen-***@public.gmane.org>

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen-***@public.gmane.org>
Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/musb/omap2430.c | 19 ++++---------------
1 file changed, 4 insertions(+), 15 deletions(-)

diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index d369bf1..6669f26 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -518,10 +518,8 @@ static int omap2430_probe(struct platform_device *pdev)
int ret = -ENOMEM;

glue = devm_kzalloc(&pdev->dev, sizeof(*glue), GFP_KERNEL);
- if (!glue) {
- dev_err(&pdev->dev, "failed to allocate glue context\n");
+ if (!glue)
goto err0;
- }

musb = platform_device_alloc("musb-hdrc", PLATFORM_DEVID_AUTO);
if (!musb) {
@@ -543,25 +541,16 @@ static int omap2430_probe(struct platform_device *pdev)
struct platform_device *control_pdev;

pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
- if (!pdata) {
- dev_err(&pdev->dev,
- "failed to allocate musb platform data\n");
+ if (!pdata)
goto err2;
- }

data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
- if (!data) {
- dev_err(&pdev->dev,
- "failed to allocate musb board data\n");
+ if (!data)
goto err2;
- }

config = devm_kzalloc(&pdev->dev, sizeof(*config), GFP_KERNEL);
- if (!config) {
- dev_err(&pdev->dev,
- "failed to allocate musb hdrc config\n");
+ if (!config)
goto err2;
- }

of_property_read_u32(np, "mode", (u32 *)&pdata->mode);
of_property_read_u32(np, "interface-type",
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:34 UTC
Permalink
Raw Message
From: Peter Chen <peter.chen-***@public.gmane.org>

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen-***@public.gmane.org>
Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/udc/s3c-hsudc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/usb/gadget/udc/s3c-hsudc.c b/drivers/usb/gadget/udc/s3c-hsudc.c
index dfbf557..f658f69 100644
--- a/drivers/usb/gadget/udc/s3c-hsudc.c
+++ b/drivers/usb/gadget/udc/s3c-hsudc.c
@@ -1267,10 +1267,8 @@ static int s3c_hsudc_probe(struct platform_device *pdev)
hsudc = devm_kzalloc(&pdev->dev, sizeof(struct s3c_hsudc) +
sizeof(struct s3c_hsudc_ep) * pd->epnum,
GFP_KERNEL);
- if (!hsudc) {
- dev_err(dev, "cannot allocate memory\n");
+ if (!hsudc)
return -ENOMEM;
- }

platform_set_drvdata(pdev, dev);
hsudc->dev = dev;
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:33 UTC
Permalink
Raw Message
From: Peter Chen <peter.chen-***@public.gmane.org>

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen-***@public.gmane.org>
Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/udc/bcm63xx_udc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/usb/gadget/udc/bcm63xx_udc.c b/drivers/usb/gadget/udc/bcm63xx_udc.c
index 2235b88..485c8c2 100644
--- a/drivers/usb/gadget/udc/bcm63xx_udc.c
+++ b/drivers/usb/gadget/udc/bcm63xx_udc.c
@@ -2324,10 +2324,8 @@ static int bcm63xx_udc_probe(struct platform_device *pdev)
int rc = -ENOMEM, i, irq;

udc = devm_kzalloc(dev, sizeof(*udc), GFP_KERNEL);
- if (!udc) {
- dev_err(dev, "cannot allocate memory\n");
+ if (!udc)
return -ENOMEM;
- }

platform_set_drvdata(pdev, udc);
udc->dev = dev;
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:36 UTC
Permalink
Raw Message
From: Peter Chen <peter.chen-***@public.gmane.org>

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen-***@public.gmane.org>
Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/musb/ux500.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/usb/musb/ux500.c b/drivers/usb/musb/ux500.c
index dc666e9..d0180a7 100644
--- a/drivers/usb/musb/ux500.c
+++ b/drivers/usb/musb/ux500.c
@@ -247,10 +247,8 @@ static int ux500_probe(struct platform_device *pdev)
}

glue = devm_kzalloc(&pdev->dev, sizeof(*glue), GFP_KERNEL);
- if (!glue) {
- dev_err(&pdev->dev, "failed to allocate glue context\n");
+ if (!glue)
goto err0;
- }

musb = platform_device_alloc("musb-hdrc", PLATFORM_DEVID_AUTO);
if (!musb) {
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:35 UTC
Permalink
Raw Message
From: Peter Chen <peter.chen-***@public.gmane.org>

The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen-***@public.gmane.org>
Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/musb/davinci.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c
index 110b784..04de3ac 100644
--- a/drivers/usb/musb/davinci.c
+++ b/drivers/usb/musb/davinci.c
@@ -520,10 +520,8 @@ static int davinci_probe(struct platform_device *pdev)
int ret = -ENOMEM;

glue = devm_kzalloc(&pdev->dev, sizeof(*glue), GFP_KERNEL);
- if (!glue) {
- dev_err(&pdev->dev, "failed to allocate glue context\n");
+ if (!glue)
goto err0;
- }

clk = devm_clk_get(&pdev->dev, "usb");
if (IS_ERR(clk)) {
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:18 UTC
Permalink
Raw Message
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh-***@public.gmane.org>

To support both usb PHY and generic PHY, this patch cleans up rcar2.c.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh-***@public.gmane.org>
Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/renesas_usbhs/rcar2.c | 48 +++++++++++++++++++++------------------
1 file changed, 26 insertions(+), 22 deletions(-)

diff --git a/drivers/usb/renesas_usbhs/rcar2.c b/drivers/usb/renesas_usbhs/rcar2.c
index f264cad..485b889 100644
--- a/drivers/usb/renesas_usbhs/rcar2.c
+++ b/drivers/usb/renesas_usbhs/rcar2.c
@@ -20,25 +20,28 @@
static int usbhs_rcar2_hardware_init(struct platform_device *pdev)
{
struct usbhs_priv *priv = usbhs_pdev_to_priv(pdev);
- struct usb_phy *usb_phy;

- usb_phy = usb_get_phy_dev(&pdev->dev, 0);
- if (IS_ERR(usb_phy))
- return PTR_ERR(usb_phy);
+ if (IS_ENABLED(CONFIG_USB_PHY)) {
+ struct usb_phy *usb_phy = usb_get_phy_dev(&pdev->dev, 0);

- priv->usb_phy = usb_phy;
- return 0;
+ if (IS_ERR(usb_phy))
+ return PTR_ERR(usb_phy);
+
+ priv->usb_phy = usb_phy;
+ return 0;
+ }
+
+ return -ENXIO;
}

static int usbhs_rcar2_hardware_exit(struct platform_device *pdev)
{
struct usbhs_priv *priv = usbhs_pdev_to_priv(pdev);

- if (!priv->usb_phy)
- return 0;
-
- usb_put_phy(priv->usb_phy);
- priv->usb_phy = NULL;
+ if (priv->usb_phy) {
+ usb_put_phy(priv->usb_phy);
+ priv->usb_phy = NULL;
+ }

return 0;
}
@@ -47,21 +50,22 @@ static int usbhs_rcar2_power_ctrl(struct platform_device *pdev,
void __iomem *base, int enable)
{
struct usbhs_priv *priv = usbhs_pdev_to_priv(pdev);
+ int retval = -ENODEV;

- if (!priv->usb_phy)
- return -ENODEV;
+ if (priv->usb_phy) {
+ if (enable) {
+ retval = usb_phy_init(priv->usb_phy);

- if (enable) {
- int retval = usb_phy_init(priv->usb_phy);
Felipe Balbi
2014-10-17 17:16:08 UTC
Permalink
Raw Message
DWC3's GUID register is supposed to be used to write
any sort of version we might want. It helps when getting
bug reports for platforms you don't have HW to know
which kernel version of the driver was running on the
platform.

Because we don't really track driver version, but we _do_
track the kernel version, let's write LINUX_VERSION_CODE to
that register and use it for debugging.

Reviewed-by: Paul Zimmerman <paulz-HKixBCOQz3hWk0Htik3J/***@public.gmane.org>
Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/dwc3/core.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index b0f4d52..ddfe771 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -19,6 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

+#include <linux/version.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
@@ -384,6 +385,12 @@ static int dwc3_core_init(struct dwc3 *dwc)
}
dwc->revision = reg;

+ /*
+ * Write Linux Version Code to our GUID register so it's easy to figure
+ * out which kernel version a bug was found.
+ */
+ dwc3_writel(dwc->regs, DWC3_GUID, LINUX_VERSION_CODE);
+
/* Handle USB2.0-only core configuration */
if (DWC3_GHWPARAMS3_SSPHY_IFC(dwc->hwparams.hwparams3) ==
DWC3_GHWPARAMS3_SSPHY_IFC_DIS) {
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:30 UTC
Permalink
Raw Message
Some gadget/function drivers might want to do
improper request recycling by allocating a single
request from one particular endpoint and queueing
it to another completely unrelated endpoint.

One such case was found with f_loopback.c.

To prevent such cases from happening again, let's
WARN() so we get a loud enough failure and persuade
users to report errors.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/dwc3/gadget.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index d08666d..1f2a719 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -1145,6 +1145,10 @@ static int dwc3_gadget_ep_queue(struct usb_ep *ep, struct usb_request *request,
return -ESHUTDOWN;
}

+ if (WARN(req->dep != dep, "request %p belongs to '%s'\n",
+ request, req->dep->name))
+ return -EINVAL;
+
dev_vdbg(dwc->dev, "queing request %p to %s length %d\n",
request, ep->name, request->length);
trace_dwc3_ep_queue(req);
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:28 UTC
Permalink
Raw Message
I noticed that this has been missing for quite
some time so I decided it was about time to
document it.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
Documentation/ABI/stable/sysfs-class-udc | 93 ++++++++++++++++++++++++++++++++
1 file changed, 93 insertions(+)
create mode 100644 Documentation/ABI/stable/sysfs-class-udc

diff --git a/Documentation/ABI/stable/sysfs-class-udc b/Documentation/ABI/stable/sysfs-class-udc
new file mode 100644
index 0000000..85d3dac
--- /dev/null
+++ b/Documentation/ABI/stable/sysfs-class-udc
@@ -0,0 +1,93 @@
+What: /sys/class/udc/<udc>/a_alt_hnp_support
+Date: June 2011
+KernelVersion: 3.1
+Contact: Felipe Balbi <balbi-DgEjT+Ai2ygdnm+***@public.gmane.org>
+Description:
+ Indicates if an OTG A-Host supports HNP at an alternate port.
+Users:
+
+What: /sys/class/udc/<udc>/a_hnp_support
+Date: June 2011
+KernelVersion: 3.1
+Contact: Felipe Balbi <balbi-DgEjT+Ai2ygdnm+***@public.gmane.org>
+Description:
+ Indicates if an OTG A-Host supports HNP at this port.
+Users:
+
+What: /sys/class/udc/<udc>/b_hnp_enable
+Date: June 2011
+KernelVersion: 3.1
+Contact: Felipe Balbi <balbi-DgEjT+Ai2ygdnm+***@public.gmane.org>
+Description:
+ Indicates if an OTG A-Host enabled HNP support.
+Users:
+
+What: /sys/class/udc/<udc>/current_speed
+Date: June 2011
+KernelVersion: 3.1
+Contact: Felipe Balbi <balbi-DgEjT+Ai2ygdnm+***@public.gmane.org>
+Description:
+ Indicates the current negotiated speed at this port.
+Users:
+
+What: /sys/class/udc/<udc>/is_a_peripheral
+Date: June 2011
+KernelVersion: 3.1
+Contact: Felipe Balbi <balbi-DgEjT+Ai2ygdnm+***@public.gmane.org>
+Description:
+ Indicates that this port is the default Host on an OTG session
+ but HNP was used to switch roles.
+Users:
+
+What: /sys/class/udc/<udc>/is_otg
+Date: June 2011
+KernelVersion: 3.1
+Contact: Felipe Balbi <balbi-DgEjT+Ai2ygdnm+***@public.gmane.org>
+Description:
+ Indicates that this port support OTG.
+Users:
+
+What: /sys/class/udc/<udc>/maximum_speed
+Date: June 2011
+KernelVersion: 3.1
+Contact: Felipe Balbi <balbi-DgEjT+Ai2ygdnm+***@public.gmane.org>
+Description:
+ Indicates the maximum USB speed supported by this port.
+Users:
+
+What: /sys/class/udc/<udc>/maximum_speed
+Date: June 2011
+KernelVersion: 3.1
+Contact: Felipe Balbi <balbi-DgEjT+Ai2ygdnm+***@public.gmane.org>
+Description:
+ Indicates the maximum USB speed supported by this port.
+Users:
+
+What: /sys/class/udc/<udc>/soft_connect
+Date: June 2011
+KernelVersion: 3.1
+Contact: Felipe Balbi <balbi-DgEjT+Ai2ygdnm+***@public.gmane.org>
+Description:
+ Allows users to disconnect data pullup resistors thus causing a
+ logical disconnection from the USB Host.
+Users:
+
+What: /sys/class/udc/<udc>/srp
+Date: June 2011
+KernelVersion: 3.1
+Contact: Felipe Balbi <balbi-DgEjT+Ai2ygdnm+***@public.gmane.org>
+Description:
+ Allows users to manually start Session Request Protocol.
+Users:
+
+What: /sys/class/udc/<udc>/state
+Date: June 2011
+KernelVersion: 3.1
+Contact: Felipe Balbi <balbi-DgEjT+Ai2ygdnm+***@public.gmane.org>
+Description:
+ Indicates current state of the USB Device Controller. Valid
+ states are: 'not-attached', 'attached', 'powered',
+ 'reconnecting', 'unauthenticated', 'default', 'addressed',
+ 'configured', and 'suspended'; however not all USB Device
+ Controllers support reporting all states.
+Users:
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:24 UTC
Permalink
Raw Message
Using ->prepare()/->complete() to mask/unmask
IRQs is wrong at least for dwc3. We need to
make sure that by the end of ->resume(), IRQs
are working and ready to fire because a child
device may need working IRQs for its own ->resume()
method.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/dwc3/core.c | 50 ++---------------------------------------------
drivers/usb/dwc3/core.h | 11 -----------
drivers/usb/dwc3/gadget.c | 20 ++++++-------------
3 files changed, 8 insertions(+), 73 deletions(-)

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 4d4e854..fa396fc 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -825,50 +825,6 @@ static int dwc3_remove(struct platform_device *pdev)
}

#ifdef CONFIG_PM_SLEEP
-static int dwc3_prepare(struct device *dev)
-{
- struct dwc3 *dwc = dev_get_drvdata(dev);
- unsigned long flags;
-
- spin_lock_irqsave(&dwc->lock, flags);
-
- switch (dwc->dr_mode) {
- case USB_DR_MODE_PERIPHERAL:
- case USB_DR_MODE_OTG:
- dwc3_gadget_prepare(dwc);
- /* FALLTHROUGH */
- case USB_DR_MODE_HOST:
- default:
- dwc3_event_buffers_cleanup(dwc);
- break;
- }
-
- spin_unlock_irqrestore(&dwc->lock, flags);
-
- return 0;
-}
-
-static void dwc3_complete(struct device *dev)
-{
- struct dwc3 *dwc = dev_get_drvdata(dev);
- unsigned long flags;
-
- spin_lock_irqsave(&dwc->lock, flags);
-
- dwc3_event_buffers_setup(dwc);
- switch (dwc->dr_mode) {
- case USB_DR_MODE_PERIPHERAL:
- case USB_DR_MODE_OTG:
- dwc3_gadget_complete(dwc);
- /* FALLTHROUGH */
- case USB_DR_MODE_HOST:
- default:
- break;
- }
-
- spin_unlock_irqrestore(&dwc->lock, flags);
-}
-
static int dwc3_suspend(struct device *dev)
{
struct dwc3 *dwc = dev_get_drvdata(dev);
@@ -883,7 +839,7 @@ static int dwc3_suspend(struct device *dev)
/* FALLTHROUGH */
case USB_DR_MODE_HOST:
default:
- /* do nothing */
+ dwc3_event_buffers_cleanup(dwc);
break;
}

@@ -916,6 +872,7 @@ static int dwc3_resume(struct device *dev)

spin_lock_irqsave(&dwc->lock, flags);

+ dwc3_event_buffers_setup(dwc);
dwc3_writel(dwc->regs, DWC3_GCTL, dwc->gctl);

switch (dwc->dr_mode) {
@@ -944,9 +901,6 @@ err_usb2phy_init:
}

static const struct dev_pm_ops dwc3_dev_pm_ops = {
- .prepare = dwc3_prepare,
- .complete = dwc3_complete,
-
SET_SYSTEM_SLEEP_PM_OPS(dwc3_suspend, dwc3_resume)
};

diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
index 66f6256..a715ee1 100644
--- a/drivers/usb/dwc3/core.h
+++ b/drivers/usb/dwc3/core.h
@@ -964,20 +964,9 @@ static inline int dwc3_send_gadget_generic_command(struct dwc3 *dwc,

/* power management interface */
#if !IS_ENABLED(CONFIG_USB_DWC3_HOST)
-int dwc3_gadget_prepare(struct dwc3 *dwc);
-void dwc3_gadget_complete(struct dwc3 *dwc);
int dwc3_gadget_suspend(struct dwc3 *dwc);
int dwc3_gadget_resume(struct dwc3 *dwc);
#else
-static inline int dwc3_gadget_prepare(struct dwc3 *dwc)
-{
- return 0;
-}
-
-static inline void dwc3_gadget_complete(struct dwc3 *dwc)
-{
-}
-
static inline int dwc3_gadget_suspend(struct dwc3 *dwc)
{
return 0;
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index f6d1dba..89cfdbf 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -2745,26 +2745,13 @@ void dwc3_gadget_exit(struct dwc3 *dwc)
dwc->ctrl_req, dwc->ctrl_req_addr);
}

-int dwc3_gadget_prepare(struct dwc3 *dwc)
+int dwc3_gadget_suspend(struct dwc3 *dwc)
{
if (dwc->pullups_connected) {
dwc3_gadget_disable_irq(dwc);
dwc3_gadget_run_stop(dwc, true, true);
}

- return 0;
-}
-
-void dwc3_gadget_complete(struct dwc3 *dwc)
-{
- if (dwc->pullups_connected) {
- dwc3_gadget_enable_irq(dwc);
- dwc3_gadget_run_stop(dwc, true, false);
- }
-}
Felipe Balbi
2014-10-17 17:16:15 UTC
Permalink
Raw Message
In case we unload a gadget driver while any of
os_desc_req or req are still pending, we need
to make sure to dequeue them.

By using our setup_pending and os_desc_pending
flags we achieve that in a way that doesn't
cause any regressions because we won't dequeue
a request which was already completed.

The original idea came from Li Jun's commit
f2267089ea17fa97b796b1b4247e3f8957655df3
(usb: gadget: composite: dequeue cdev->req
before free it in composite_dev_cleanup) which,
unfortunately, caused two regressions (kfree()
being called before usb_ep_dequeue() and calling
usb_ep_dequeue() when the request was already
completed). That commit also didn't take care
of os_desc_req which can fall into the same
situation so we must care for that one too.

Note that in order to make code slightly easier
to read, we introduce composite_ep_queue() which
hides details about how to fiddle with our pending
flags.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/composite.c | 51 +++++++++++++++++++++++++++++++++++++++---
1 file changed, 48 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index 09602dc..e071d58 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -1246,10 +1246,49 @@ EXPORT_SYMBOL_GPL(usb_string_ids_n);

static void composite_setup_complete(struct usb_ep *ep, struct usb_request *req)
{
+ struct usb_composite_dev *cdev;
+
if (req->status || req->actual != req->length)
DBG((struct usb_composite_dev *) ep->driver_data,
"setup complete --> %d, %d/%d\n",
req->status, req->actual, req->length);
+
+ /*
+ * REVIST The same ep0 requests are shared with function drivers
+ * so they don't have to maintain the same ->complete() stubs.
+ *
+ * Because of that, we need to check for the validity of ->context
+ * here, even though we know we've set it to something useful.
+ */
+ if (!req->context)
+ return;
+
+ cdev = req->context;
+
+ if (cdev->req == req)
+ cdev->setup_pending = false;
+ else if (cdev->os_desc_req == req)
+ cdev->os_desc_pending = false;
+ else
+ WARN(1, "unknown request %p\n", req);
+}
+
+static int composite_ep0_queue(struct usb_composite_dev *cdev,
+ struct usb_request *req, gfp_t gfp_flags)
+{
+ int ret;
+
+ ret = usb_ep_queue(cdev->gadget->ep0, req, gfp_flags);
+ if (ret == 0) {
+ if (cdev->req == req)
+ cdev->setup_pending = true;
+ else if (cdev->os_desc_req == req)
+ cdev->os_desc_pending = true;
+ else
+ WARN(1, "unknown request %p\n", req);
+ }
+
+ return ret;
}

static int count_ext_compat(struct usb_configuration *c)
@@ -1690,7 +1729,7 @@ unknown:
req->length = value;
req->context = cdev;
req->zero = value < w_length;
- value = usb_ep_queue(gadget->ep0, req, GFP_ATOMIC);
+ value = composite_ep0_queue(cdev, req, GFP_ATOMIC);
if (value < 0) {
DBG(cdev, "ep_queue --> %d\n", value);
req->status = 0;
@@ -1762,7 +1801,7 @@ unknown:
req->length = value;
req->context = cdev;
req->zero = value < w_length;
- value = usb_ep_queue(gadget->ep0, req, GFP_ATOMIC);
+ value = composite_ep0_queue(cdev, req, GFP_ATOMIC);
if (value < 0) {
DBG(cdev, "ep_queue --> %d\n", value);
req->status = 0;
@@ -1957,10 +1996,16 @@ void composite_dev_cleanup(struct usb_composite_dev *cdev)
kfree(uc);
}
if (cdev->os_desc_req) {
+ if (cdev->os_desc_pending)
+ usb_ep_dequeue(cdev->gadget->ep0, cdev->os_desc_req);
+
kfree(cdev->os_desc_req->buf);
usb_ep_free_request(cdev->gadget->ep0, cdev->os_desc_req);
}
if (cdev->req) {
+ if (cdev->setup_pending)
+ usb_ep_dequeue(cdev->gadget->ep0, cdev->req);
+
kfree(cdev->req->buf);
usb_ep_free_request(cdev->gadget->ep0, cdev->req);
}
@@ -2165,7 +2210,7 @@ void usb_composite_setup_continue(struct usb_composite_dev *cdev)
DBG(cdev, "%s: Completing delayed status\n", __func__);
req->length = 0;
req->context = cdev;
- value = usb_ep_queue(cdev->gadget->ep0, req, GFP_ATOMIC);
+ value = composite_ep0_queue(cdev, req, GFP_ATOMIC);
if (value < 0) {
DBG(cdev, "ep_queue --> %d\n", value);
req->status = 0;
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:25 UTC
Permalink
Raw Message
when disconnecting from host using our soft_connect
sysfs interface, also let the gadget driver know about
it by calling the gadget driver's ->disconnect()
method.

No problems have been found while not calling ->disconnect()
so far, it's just good convention.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/udc/udc-core.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/usb/gadget/udc/udc-core.c b/drivers/usb/gadget/udc/udc-core.c
index f205465..ddc6f57 100644
--- a/drivers/usb/gadget/udc/udc-core.c
+++ b/drivers/usb/gadget/udc/udc-core.c
@@ -517,6 +517,7 @@ static ssize_t usb_udc_softconn_store(struct device *dev,
usb_gadget_connect(udc->gadget);
} else if (sysfs_streq(buf, "disconnect")) {
usb_gadget_disconnect(udc->gadget);
+ udc->driver->disconnect(udc->gadget);
usb_gadget_udc_stop(udc->gadget, udc->driver);
} else {
dev_err(dev, "unsupported command '%s'\n", buf);
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:23 UTC
Permalink
Raw Message
From: George Cherian <george.cherian-***@public.gmane.org>

Enabling the core interrupts in complete is too late for
XHCI, and stops it from proper operation. The root of the
problem is due to a disagreement between dwc3-omap and XHCI
about when IRQs should be enabled.

As it turns out, ->resume's documentation states that:

"... generally the driver is expected to start working
again, responding to hardware events and software requests
(the device itself may be left in a low-power state, waiting
for a runtime resume to occur) ..."
From that we infer that IRQs must be unmasked by the end of
->resume().

Due to that, we will remove ->prepare() and ->complete() and
disable/enable interrupts in ->suspend()/->resume().

Acked-by: Roger Quadros <rogerq-***@public.gmane.org>
Signed-off-by: George Cherian <george.cherian-***@public.gmane.org>
Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/dwc3/dwc3-omap.c | 20 ++------------------
1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c
index a0aa9f3..172d64e 100644
--- a/drivers/usb/dwc3/dwc3-omap.c
+++ b/drivers/usb/dwc3/dwc3-omap.c
@@ -593,27 +593,12 @@ static const struct of_device_id of_dwc3_match[] = {
MODULE_DEVICE_TABLE(of, of_dwc3_match);

#ifdef CONFIG_PM_SLEEP
-static int dwc3_omap_prepare(struct device *dev)
-{
- struct dwc3_omap *omap = dev_get_drvdata(dev);
-
- dwc3_omap_disable_irqs(omap);
-
- return 0;
-}
-
-static void dwc3_omap_complete(struct device *dev)
-{
- struct dwc3_omap *omap = dev_get_drvdata(dev);
-
- dwc3_omap_enable_irqs(omap);
-}
-
static int dwc3_omap_suspend(struct device *dev)
{
struct dwc3_omap *omap = dev_get_drvdata(dev);

omap->utmi_otg_status = dwc3_omap_read_utmi_status(omap);
+ dwc3_omap_disable_irqs(omap);

return 0;
}
@@ -623,6 +608,7 @@ static int dwc3_omap_resume(struct device *dev)
struct dwc3_omap *omap = dev_get_drvdata(dev);

dwc3_omap_write_utmi_status(omap, omap->utmi_otg_status);
+ dwc3_omap_enable_irqs(omap);

pm_runtime_disable(dev);
pm_runtime_set_active(dev);
@@ -632,8 +618,6 @@ static int dwc3_omap_resume(struct device *dev)
}

static const struct dev_pm_ops dwc3_omap_dev_pm_ops = {
- .prepare = dwc3_omap_prepare,
- .complete = dwc3_omap_complete,

SET_SYSTEM_SLEEP_PM_OPS(dwc3_omap_suspend, dwc3_omap_resume)
};
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:22 UTC
Permalink
Raw Message
From: Robert Jarzmik <robert.jarzmik-***@public.gmane.org>

Add support for device-tree device discovery. If devicetree is not
provided, fallback to legacy platform data "discovery".

Signed-off-by: Robert Jarzmik <robert.jarzmik-***@public.gmane.org>
Cc: devicetree-***@public.gmane.org
Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/udc/pxa27x_udc.c | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c b/drivers/usb/gadget/udc/pxa27x_udc.c
index 5280f64..55598c0 100644
--- a/drivers/usb/gadget/udc/pxa27x_udc.c
+++ b/drivers/usb/gadget/udc/pxa27x_udc.c
@@ -27,6 +27,8 @@
#include <linux/prefetch.h>
#include <linux/byteorder/generic.h>
#include <linux/platform_data/pxa2xx_udc.h>
+#include <linux/of_device.h>
+#include <linux/of_gpio.h>

#include <linux/usb.h>
#include <linux/usb/ch9.h>
@@ -2400,6 +2402,12 @@ static struct pxa_udc memory = {
}
};

+static struct of_device_id udc_pxa_dt_ids[] = {
+ { .compatible = "marvell,pxa270-udc" },
+ {}
+};
+MODULE_DEVICE_TABLE(of, udc_pxa_dt_ids);
+
/**
* pxa_udc_probe - probes the udc device
* @_dev: platform device
@@ -2427,6 +2435,8 @@ static int pxa_udc_probe(struct platform_device *pdev)
udc->gpiod = gpio_to_desc(mach->gpio_pullup);
}
udc->udc_command = mach->udc_command;
+ } else {
+ udc->gpiod = devm_gpiod_get(&pdev->dev, NULL);
}

regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -2618,6 +2628,7 @@ static struct platform_driver udc_driver = {
.driver = {
.name = "pxa27x-udc",
.owner = THIS_MODULE,
+ .of_match_table = of_match_ptr(udc_pxa_dt_ids),
},
.probe = pxa_udc_probe,
.remove = pxa_udc_remove,
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Robert Jarzmik
2014-10-17 18:06:45 UTC
Permalink
Raw Message
Felipe Balbi <balbi-***@public.gmane.org> writes:

Thanks Felipe.

Can I post now the remaining 3 patches of the partial serie, ie. :
- usb: gadget: pxa27x_udc device-tree documentation
- usb: gadget: pxa27x_udc: use devm_* helpers
- usb: gadget: pxa27x_udc: fix clock prepare and enable

Do you want me to rebase against a specific tree to ensure everything is in
order ?

Cheers.

--
Robert
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 18:19:04 UTC
Permalink
Raw Message
Hi,
Post by Robert Jarzmik
Thanks Felipe.
- usb: gadget: pxa27x_udc device-tree documentation
- usb: gadget: pxa27x_udc: use devm_* helpers
- usb: gadget: pxa27x_udc: fix clock prepare and enable
please do :-)
Post by Robert Jarzmik
Do you want me to rebase against a specific tree to ensure everything
is in order ?
All these patches are in my testing/next. If you can rebase there and
make sure everything still works for you, I'd be very glad.

Please, make sure you can still properly load and unload gadget drivers
too ;-)

cheers
--
balbi
Robert Jarzmik
2014-10-17 19:08:51 UTC
Permalink
Raw Message
Post by Felipe Balbi
Hi,
Post by Robert Jarzmik
Thanks Felipe.
- usb: gadget: pxa27x_udc device-tree documentation
- usb: gadget: pxa27x_udc: use devm_* helpers
- usb: gadget: pxa27x_udc: fix clock prepare and enable
please do :-)
Great, I'm on my way.
Post by Felipe Balbi
Post by Robert Jarzmik
Do you want me to rebase against a specific tree to ensure everything
is in order ?
All these patches are in my testing/next. If you can rebase there and
make sure everything still works for you, I'd be very glad.
Ok, no problem.
Post by Felipe Balbi
Please, make sure you can still properly load and unload gadget drivers
too ;-)
Ah, I'd like to. The problem I have is that the only interaction I have with my
platform is through the USB UDC (I have no serial console available, and no
network).

I'll see if I can have a script in background to load/unload every other 1mn,
but I'm not sure this will work.

Cheers.
--
Robert
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 19:14:04 UTC
Permalink
Raw Message
Post by Robert Jarzmik
Post by Felipe Balbi
Hi,
Post by Robert Jarzmik
Thanks Felipe.
- usb: gadget: pxa27x_udc device-tree documentation
- usb: gadget: pxa27x_udc: use devm_* helpers
- usb: gadget: pxa27x_udc: fix clock prepare and enable
please do :-)
Great, I'm on my way.
Post by Felipe Balbi
Post by Robert Jarzmik
Do you want me to rebase against a specific tree to ensure everything
is in order ?
All these patches are in my testing/next. If you can rebase there and
make sure everything still works for you, I'd be very glad.
Ok, no problem.
Post by Felipe Balbi
Please, make sure you can still properly load and unload gadget drivers
too ;-)
Ah, I'd like to. The problem I have is that the only interaction I have with my
platform is through the USB UDC (I have no serial console available, and no
network).
I'll see if I can have a script in background to load/unload every other 1mn,
but I'm not sure this will work.
so you're using g_serial ? I guess you can:

# echo disconnect > /sys/class/udc/$UDC/soft_connect && sleep 1 && \
echo connect > /sys/class/udc/$UDC/soft_connect

I think that should work ;-)
--
balbi
Felipe Balbi
2014-10-17 17:16:12 UTC
Permalink
Raw Message
From: Heikki Krogerus <heikki.krogerus-VuQAYsv1563Yd54FQh9/***@public.gmane.org>

Adding ACPI ID used on newer Intel SoCs.

Signed-off-by: Heikki Krogerus <heikki.krogerus-VuQAYsv1563Yd54FQh9/***@public.gmane.org>
Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/dwc3/core.c | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 1384300..4d4e854 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -33,6 +33,7 @@
#include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <linux/of.h>
+#include <linux/acpi.h>

#include <linux/usb/ch9.h>
#include <linux/usb/gadget.h>
@@ -967,12 +968,24 @@ static const struct of_device_id of_dwc3_match[] = {
MODULE_DEVICE_TABLE(of, of_dwc3_match);
#endif

+#ifdef CONFIG_ACPI
+
+#define ACPI_ID_INTEL_BSW "808622B7"
+
+static const struct acpi_device_id dwc3_acpi_match[] = {
+ { ACPI_ID_INTEL_BSW, 0 },
+ { },
+};
+MODULE_DEVICE_TABLE(acpi, dwc3_acpi_match);
+#endif
+
static struct platform_driver dwc3_driver = {
.probe = dwc3_probe,
.remove = dwc3_remove,
.driver = {
.name = "dwc3",
.of_match_table = of_match_ptr(of_dwc3_match),
+ .acpi_match_table = ACPI_PTR(dwc3_acpi_match),
.pm = DWC3_PM_OPS,
},
};
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:16 UTC
Permalink
Raw Message
Add TRB tracepoints for ep0 TRBs as that
might help finding bugs with ep0 handling.

Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/dwc3/ep0.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c
index ee216c6..4182210 100644
--- a/drivers/usb/dwc3/ep0.c
+++ b/drivers/usb/dwc3/ep0.c
@@ -86,6 +86,8 @@ static int dwc3_ep0_start_trans(struct dwc3 *dwc, u8 epnum, dma_addr_t buf_dma,
params.param0 = upper_32_bits(dwc->ep0_trb_addr);
params.param1 = lower_32_bits(dwc->ep0_trb_addr);

+ trace_dwc3_prepare_trb(dep, trb);
+
ret = dwc3_send_gadget_ep_cmd(dwc, dep->number,
DWC3_DEPCMD_STARTTRANSFER, &params);
if (ret < 0) {
@@ -791,6 +793,8 @@ static void dwc3_ep0_complete_data(struct dwc3 *dwc,

trb = dwc->ep0_trb;

+ trace_dwc3_complete_trb(ep0, trb);
+
status = DWC3_TRB_SIZE_TRBSTS(trb->size);
if (status == DWC3_TRBSTS_SETUP_PENDING) {
dwc3_trace(trace_dwc3_ep0, "Setup Pending received");
@@ -854,6 +858,8 @@ static void dwc3_ep0_complete_status(struct dwc3 *dwc,
dep = dwc->eps[0];
trb = dwc->ep0_trb;

+ trace_dwc3_complete_trb(dep, trb);
+
if (!list_empty(&dep->request_list)) {
r = next_request(&dep->request_list);
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:10 UTC
Permalink
Raw Message
From: Heikki Krogerus <heikki.krogerus-VuQAYsv1563Yd54FQh9/***@public.gmane.org>

Most devices are configured for 32-bit DMA addresses.
Setting the mask to 32-bit here removes the need for the
drivers to do it separately.

Acked-by: Rafael J. Wysocki <rjw-***@public.gmane.org>
Signed-off-by: Heikki Krogerus <heikki.krogerus-VuQAYsv1563Yd54FQh9/***@public.gmane.org>
Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/acpi/acpi_platform.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/acpi/acpi_platform.c b/drivers/acpi/acpi_platform.c
index 2bf9082..8d099e6 100644
--- a/drivers/acpi/acpi_platform.c
+++ b/drivers/acpi/acpi_platform.c
@@ -16,6 +16,7 @@
#include <linux/err.h>
#include <linux/kernel.h>
#include <linux/module.h>
+#include <linux/dma-mapping.h>
#include <linux/platform_device.h>

#include "internal.h"
@@ -102,6 +103,7 @@ struct platform_device *acpi_create_platform_device(struct acpi_device *adev)
pdevinfo.res = resources;
pdevinfo.num_res = count;
pdevinfo.acpi_node.companion = adev;
+ pdevinfo.dma_mask = DMA_BIT_MASK(32);
pdev = platform_device_register_full(&pdevinfo);
if (IS_ERR(pdev))
dev_err(&adev->dev, "platform device creation failed: %ld\n",
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:20 UTC
Permalink
Raw Message
From: Robert Jarzmik <robert.jarzmik-***@public.gmane.org>

For this preparation, a preliminary cleanup is done :
- convert the probing of pxa27x_udc to gpio_desc.
The conversion is partial because :
- the platform data still provides a gpio number, not a gpio desc

Signed-off-by: Robert Jarzmik <robert.jarzmik-***@public.gmane.org>
Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/udc/pxa27x_udc.c | 55 +++++++++++++++++++------------------
drivers/usb/gadget/udc/pxa27x_udc.h | 2 ++
2 files changed, 31 insertions(+), 26 deletions(-)

diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c b/drivers/usb/gadget/udc/pxa27x_udc.c
index 4868369..d583197 100644
--- a/drivers/usb/gadget/udc/pxa27x_udc.c
+++ b/drivers/usb/gadget/udc/pxa27x_udc.c
@@ -22,6 +22,7 @@
#include <linux/clk.h>
#include <linux/irq.h>
#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
#include <linux/slab.h>
#include <linux/prefetch.h>
#include <linux/byteorder/generic.h>
@@ -1507,17 +1508,12 @@ static struct usb_ep_ops pxa_ep_ops = {
*/
static void dplus_pullup(struct pxa_udc *udc, int on)
{
- if (on) {
- if (gpio_is_valid(udc->mach->gpio_pullup))
- gpio_set_value(udc->mach->gpio_pullup,
- !udc->mach->gpio_pullup_inverted);
- if (udc->mach->udc_command)
+ if (udc->gpiod) {
+ gpiod_set_value(udc->gpiod, on);
+ } else if (udc->mach && udc->mach->udc_command) {
+ if (on)
udc->mach->udc_command(PXA2XX_UDC_CMD_CONNECT);
- } else {
- if (gpio_is_valid(udc->mach->gpio_pullup))
- gpio_set_value(udc->mach->gpio_pullup,
- udc->mach->gpio_pullup_inverted);
- if (udc->mach->udc_command)
+ else
udc->mach->udc_command(PXA2XX_UDC_CMD_DISCONNECT);
}
udc->pullup_on = on;
@@ -1609,7 +1605,7 @@ static int pxa_udc_pullup(struct usb_gadget *_gadget, int is_active)
{
struct pxa_udc *udc = to_gadget_udc(_gadget);

- if (!gpio_is_valid(udc->mach->gpio_pullup) && !udc->mach->udc_command)
+ if (!udc->gpiod && !udc->mach->udc_command)
return -EOPNOTSUPP;

dplus_pullup(udc, is_active);
@@ -2416,6 +2412,22 @@ static int pxa_udc_probe(struct platform_device *pdev)
struct resource *regs;
struct pxa_udc *udc = &memory;
int retval = 0, gpio;
+ struct pxa2xx_udc_mach_info *mach = dev_get_platdata(&pdev->dev);
+ unsigned long gpio_flags;
+
+ if (mach) {
+ gpio_flags = mach->gpio_pullup_inverted ? GPIOF_ACTIVE_LOW : 0;
+ gpio = mach->gpio_pullup;
+ if (gpio_is_valid(gpio)) {
+ retval = devm_gpio_request_one(&pdev->dev, gpio,
+ gpio_flags,
+ "USB D+ pullup");
+ if (retval)
+ return retval;
+ udc->gpiod = gpio_to_desc(mach->gpio_pullup);
+ }
+ udc->mach = mach;
+ }

regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!regs)
@@ -2425,21 +2437,15 @@ static int pxa_udc_probe(struct platform_device *pdev)
return udc->irq;

udc->dev = &pdev->dev;
- udc->mach = dev_get_platdata(&pdev->dev);
udc->transceiver = usb_get_phy(USB_PHY_TYPE_USB2);

- gpio = udc->mach->gpio_pullup;
- if (gpio_is_valid(gpio)) {
- retval = gpio_request(gpio, "USB D+ pullup");
- if (retval == 0)
- gpio_direction_output(gpio,
- udc->mach->gpio_pullup_inverted);
- }
- if (retval) {
- dev_err(&pdev->dev, "Couldn't request gpio %d : %d\n",
- gpio, retval);
- return retval;
+ if (IS_ERR(udc->gpiod)) {
+ dev_err(&pdev->dev, "Couldn't find or request D+ gpio : %ld\n",
+ PTR_ERR(udc->gpiod));
+ return PTR_ERR(udc->gpiod);
}
+ if (udc->gpiod)
+ gpiod_direction_output(udc->gpiod, 0);

udc->clk = clk_get(&pdev->dev, NULL);
if (IS_ERR(udc->clk)) {
@@ -2501,14 +2507,11 @@ err_clk:
static int pxa_udc_remove(struct platform_device *_dev)
{
struct pxa_udc *udc = platform_get_drvdata(_dev);
- int gpio = udc->mach->gpio_pullup;

usb_del_gadget_udc(&udc->gadget);
usb_gadget_unregister_driver(udc->driver);
free_irq(udc->irq, udc);
pxa_cleanup_debugfs(udc);
- if (gpio_is_valid(gpio))
- gpio_free(gpio);

usb_put_phy(udc->transceiver);

diff --git a/drivers/usb/gadget/udc/pxa27x_udc.h b/drivers/usb/gadget/udc/pxa27x_udc.h
index 28f2b53..f025693 100644
--- a/drivers/usb/gadget/udc/pxa27x_udc.h
+++ b/drivers/usb/gadget/udc/pxa27x_udc.h
@@ -421,6 +421,7 @@ struct udc_stats {
* @driver: bound gadget (zero, g_ether, g_mass_storage, ...)
* @dev: device
* @mach: machine info, used to activate specific GPIO
+ * @gpiod: gpio descriptor of gpio for D+ pullup (or NULL if none)
* @transceiver: external transceiver to handle vbus sense and D+ pullup
* @ep0state: control endpoint state machine state
* @stats: statistics on udc usage
@@ -447,6 +448,7 @@ struct pxa_udc {
struct usb_gadget_driver *driver;
struct device *dev;
struct pxa2xx_udc_mach_info *mach;
+ struct gpio_desc *gpiod;
struct usb_phy *transceiver;

enum ep0_state ep0state;
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Felipe Balbi
2014-10-17 17:16:21 UTC
Permalink
Raw Message
From: Robert Jarzmik <robert.jarzmik-***@public.gmane.org>

Convert the mach info, and store the udc_command in the pxa_udc control
structure.

It is to be noticed that the udc_is_connected() in mach info is not
transfered. This was not used, as mioa701 machine doesn't need it,
balloon3 doesn't really use it, and most importantly the current driver
never uses it.

Signed-off-by: Robert Jarzmik <robert.jarzmik-***@public.gmane.org>
Signed-off-by: Felipe Balbi <balbi-***@public.gmane.org>
---
drivers/usb/gadget/udc/pxa27x_udc.c | 10 +++++-----
drivers/usb/gadget/udc/pxa27x_udc.h | 4 ++--
2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c b/drivers/usb/gadget/udc/pxa27x_udc.c
index d583197..5280f64 100644
--- a/drivers/usb/gadget/udc/pxa27x_udc.c
+++ b/drivers/usb/gadget/udc/pxa27x_udc.c
@@ -1510,11 +1510,11 @@ static void dplus_pullup(struct pxa_udc *udc, int on)
{
if (udc->gpiod) {
gpiod_set_value(udc->gpiod, on);
- } else if (udc->mach && udc->mach->udc_command) {
+ } else if (udc->udc_command) {
if (on)
- udc->mach->udc_command(PXA2XX_UDC_CMD_CONNECT);
+ udc->udc_command(PXA2XX_UDC_CMD_CONNECT);
else
- udc->mach->udc_command(PXA2XX_UDC_CMD_DISCONNECT);
+ udc->udc_command(PXA2XX_UDC_CMD_DISCONNECT);
}
udc->pullup_on = on;
}
@@ -1605,7 +1605,7 @@ static int pxa_udc_pullup(struct usb_gadget *_gadget, int is_active)
{
struct pxa_udc *udc = to_gadget_udc(_gadget);

- if (!udc->gpiod && !udc->mach->udc_command)
+ if (!udc->gpiod && !udc->udc_command)
return -EOPNOTSUPP;

dplus_pullup(udc, is_active);
@@ -2426,7 +2426,7 @@ static int pxa_udc_probe(struct platform_device *pdev)
return retval;
udc->gpiod = gpio_to_desc(mach->gpio_pullup);
}
- udc->mach = mach;
+ udc->udc_command = mach->udc_command;
}

regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
diff --git a/drivers/usb/gadget/udc/pxa27x_udc.h b/drivers/usb/gadget/udc/pxa27x_udc.h
index f025693..11e1423 100644
--- a/drivers/usb/gadget/udc/pxa27x_udc.h
+++ b/drivers/usb/gadget/udc/pxa27x_udc.h
@@ -420,7 +420,7 @@ struct udc_stats {
* @usb_gadget: udc gadget structure
* @driver: bound gadget (zero, g_ether, g_mass_storage, ...)
* @dev: device
- * @mach: machine info, used to activate specific GPIO
+ * @udc_command: machine specific function to activate D+ pullup
* @gpiod: gpio descriptor of gpio for D+ pullup (or NULL if none)
* @transceiver: external transceiver to handle vbus sense and D+ pullup
* @ep0state: control endpoint state machine state
@@ -447,7 +447,7 @@ struct pxa_udc {
struct usb_gadget gadget;
struct usb_gadget_driver *driver;
struct device *dev;
- struct pxa2xx_udc_mach_info *mach;
+ void (*udc_command)(int);
struct gpio_desc *gpiod;
struct usb_phy *transceiver;
--
2.1.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Peter Chen
2014-10-20 03:02:44 UTC
Permalink
Raw Message
Post by Felipe Balbi
Hi folks,
=20
here's a giant set of patches which I already have pending
for v3.19 merge window. They still sit in my testing/next
and will only be moved to next once all fixes reach v3.18-rc.
=20
Until then, I will keep rebasing them.
=20
Note that for this set to properly work, we are still pending
a fix being reworked by Marek Szyprowski. As long as you don't
build dwc2, everything should work fine, however.
Yes, if build all, has below error:

/home/peter/work/projects/usb/drivers/usb/dwc2/gadget.c: In function =E2=
=80=98s3c_hsotg_udc_stop=E2=80=99:
/home/peter/work/projects/usb/drivers/usb/dwc2/gadget.c:2939:7: error: =
=E2=80=98driver=E2=80=99 undeclared (first use in this function)
/home/peter/work/projects/usb/drivers/usb/dwc2/gadget.c:2939:7: note: =
each undeclared identifier is reported only once for each function it a=
ppears in
Post by Felipe Balbi
=20
Please test. I mean it. Don't want nobody whinning after these
patches are moved to my 'next' branch; so please go ahead and
test.
Tested on chipidea hardware, it works ok.
Post by Felipe Balbi
=20
usb: gadget: configfs: add suspend/resume
=20
usb: gadget: f_uac1: remove an unneeded NULL check
=20
usb: dwc3: core: write LINUX_VERSION_CODE to our GUID register
usb: dwc3: trace: remove unnecessary newline character
usb: gadget: composite: introduce setup and os_desc pending flags
usb: gadget: composite: set our req->context to cdev
usb: gadget: composite: conditionally dequeue os_desc and setup
requests
usb: dwc3: ep0: trace ep0 TRBs too
usb: dwc3: get rid of ->prepare()/->complete()
usb: gadget: udc-core: call ->disconnect() when soft disconnecting
usb: gadget: udc: document our sysfs ABI
usb: dwc3: gadget: set state to NOT_ATTACHED on disconnect_irq
usb: dwc3: gadget: WARN() on bogus usb_ep_queue()
usb: gadget: udc: amd5536: do not rely on 'driver' argument
usb: gadget: udc: at91: do not rely on 'driver' argument
usb: gadget: udc: dummy: do not rely on 'driver' argument
usb: gadget: udc: fsl_qe: do not rely on 'driver' argument
usb: gadget: udc: lpc32xx: do not rely on 'driver' argument
usb: gadget: udc: mv_u3d: do not rely on 'driver' argument
usb: gadget: udc: mv_udc: do not rely on 'driver' argument
usb: gadget: udc: net2272: do not rely on 'driver' argument
usb: gadget: udc: net2280: do not rely on 'driver' argument
usb: gadget: udc: pxa25x: do not rely on 'driver' argument
usb: gadget: udc: pxa27x: do not rely on 'driver' argument
usb: gadget: udc: s3c-hsudc: do not rely on 'driver' argument
usb: musb: gadget: do not rely on 'driver' argument
usb: gadget: udc: pass a single argument to usb_gadget_udc_start/st=
op
Post by Felipe Balbi
usb: gadget: udc: at91: remove bind/unbind messages
usb: gadget: udc: atmel_usba: remove bind/unbind messages
usb: gadget: udc: dummy: remove bind/unbind messages
usb: gadget: udc: fsl_qe: remove bind/unbind messages
usb: gadget: udc: gr_udc: remove bind/unbind messages
usb: gadget: udc: net2272: remove bind/unbind messages
usb: gadget: udc: net2280: remove bind/unbind messages
usb: gadget: udc: s3c-hsudc: remove bind/unbind messages
usb: musb: gadget: remove bind/unbind messages
usb: gadget: udc: core: fix unregistering message
usb: gadget: remove unnecessary 'driver' argument
=20
usb: dwc3: dwc3-omap: get rid of ->prepare()/->complete()
=20
ACPI: platform: provide default DMA mask
usb: dwc3: core: only setting the dma_mask when needed
usb: dwc3: add ACPI support
=20
usb: gadget: mv_udc_core: delete unnecessary 'out of memory' messag=
es
Post by Felipe Balbi
usb: gadget: fsl_qe_udc: delete unnecessary 'out of memory' message=
s
Post by Felipe Balbi
usb: gadget: bcm63xx_udc: delete unnecessary 'out of memory' messag=
es
Post by Felipe Balbi
usb: gadget: s3c-hsudc: delete unnecessary 'out of memory' messages
usb: musb: davinci: delete unnecessary 'out of memory' messages
usb: musb: ux500: delete unnecessary 'out of memory' messages
usb: musb: omap2430: delete unnecessary 'out of memory' messages
usb: musb: blackfin: delete unnecessary 'out of memory' messages
usb: musb: tusb6010: delete unnecessary 'out of memory' messages
usb: musb: musb_dsps: delete unnecessary 'out of memory' messages
usb: phy: phy-rcar-usb: delete unnecessary 'out of memory' messages
usb: phy: phy-tegra-usb: delete unnecessary 'out of memory' message=
s
Post by Felipe Balbi
usb: phy: phy-am335x-control: delete unnecessary 'out of memory'
messages
usb: phy: phy-rcar-gen2-usb: delete unnecessary 'out of memory'
messages
usb: phy: phy-mxs-usb: delete unnecessary 'out of memory' messages
usb: phy: phy-msm-usb: delete unnecessary 'out of memory' messages
usb: phy: phy-mv-usb: delete unnecessary 'out of memory' messages
usb: renesas_usbhs: delete unnecessary 'out of memory' messages
=20
usb: gadget: pxa27x_udc: prepare device-tree support
usb: gadget: pxa27x_udc: transfer mach_info into pxa_udc
usb: gadget: pxa27x_udc: add devicetree support
=20
usb: musb: ux500_dma: use dmaengine_xxx() APIs
=20
usb: renesas_usbhs: rename phy to usb_phy in usbhs_priv
usb: renesas_usbhs: clean up rcar2.c to support a generic PHY
usb: renesas_usbhs: add support for generic PHY
=20
Documentation/ABI/stable/sysfs-class-udc | 93 ++++++++++++++++++++++=
++++++++++
Post by Felipe Balbi
drivers/acpi/acpi_platform.c | 2 +
drivers/usb/chipidea/udc.c | 6 +--
drivers/usb/dwc2/gadget.c | 3 +-
drivers/usb/dwc3/core.c | 78 ++++++++++------------=
-----
Post by Felipe Balbi
drivers/usb/dwc3/core.h | 11 ----
drivers/usb/dwc3/dwc3-omap.c | 20 +------
drivers/usb/dwc3/ep0.c | 24 +++++----
drivers/usb/dwc3/gadget.c | 28 +++++-----
drivers/usb/dwc3/trace.h | 8 +--
drivers/usb/gadget/composite.c | 64 +++++++++++++++++++---
drivers/usb/gadget/configfs.c | 3 ++
drivers/usb/gadget/function/u_uac1.c | 3 --
drivers/usb/gadget/udc/amd5536udc.c | 10 ++--
drivers/usb/gadget/udc/at91_udc.c | 9 ++--
drivers/usb/gadget/udc/atmel_usba_udc.c | 11 ++--
drivers/usb/gadget/udc/bcm63xx_udc.c | 7 +--
drivers/usb/gadget/udc/dummy_hcd.c | 14 ++---
drivers/usb/gadget/udc/fotg210-udc.c | 3 +-
drivers/usb/gadget/udc/fsl_qe_udc.c | 11 +---
drivers/usb/gadget/udc/fsl_udc_core.c | 8 ++-
drivers/usb/gadget/udc/fusb300_udc.c | 3 +-
drivers/usb/gadget/udc/goku_udc.c | 6 +--
drivers/usb/gadget/udc/gr_udc.c | 8 +--
drivers/usb/gadget/udc/lpc32xx_udc.c | 8 +--
drivers/usb/gadget/udc/m66592-udc.c | 3 +-
drivers/usb/gadget/udc/mv_u3d_core.c | 5 +-
drivers/usb/gadget/udc/mv_udc_core.c | 13 ++---
drivers/usb/gadget/udc/net2272.c | 11 ++--
drivers/usb/gadget/udc/net2280.c | 16 ++----
drivers/usb/gadget/udc/omap_udc.c | 6 +--
drivers/usb/gadget/udc/pch_udc.c | 7 ++-
drivers/usb/gadget/udc/pxa25x_udc.c | 8 ++-
drivers/usb/gadget/udc/pxa27x_udc.c | 78 +++++++++++++++-------=
-----
Post by Felipe Balbi
drivers/usb/gadget/udc/pxa27x_udc.h | 6 ++-
drivers/usb/gadget/udc/r8a66597-udc.c | 3 +-
drivers/usb/gadget/udc/s3c-hsudc.c | 16 ++----
drivers/usb/gadget/udc/s3c2410_udc.c | 6 +--
drivers/usb/gadget/udc/udc-core.c | 24 ++++-----
drivers/usb/gadget/udc/udc-xilinx.c | 3 +-
drivers/usb/musb/blackfin.c | 8 +--
drivers/usb/musb/davinci.c | 4 +-
drivers/usb/musb/musb_dsps.c | 5 +-
drivers/usb/musb/musb_gadget.c | 13 ++---
drivers/usb/musb/omap2430.c | 19 ++-----
drivers/usb/musb/tusb6010.c | 4 +-
drivers/usb/musb/ux500.c | 4 +-
drivers/usb/musb/ux500_dma.c | 7 +--
drivers/usb/phy/phy-am335x-control.c | 4 +-
drivers/usb/phy/phy-msm-usb.c | 12 ++---
drivers/usb/phy/phy-mv-usb.c | 4 +-
drivers/usb/phy/phy-mxs-usb.c | 4 +-
drivers/usb/phy/phy-rcar-gen2-usb.c | 4 +-
drivers/usb/phy/phy-rcar-usb.c | 4 +-
drivers/usb/phy/phy-tegra-usb.c | 9 +---
drivers/usb/renesas_usbhs/common.c | 4 +-
drivers/usb/renesas_usbhs/common.h | 3 +-
drivers/usb/renesas_usbhs/mod_gadget.c | 3 +-
drivers/usb/renesas_usbhs/rcar2.c | 73 ++++++++++++++++++----=
---
Post by Felipe Balbi
include/linux/usb/composite.h | 7 +++
include/linux/usb/gadget.h | 3 +-
61 files changed, 423 insertions(+), 421 deletions(-)
create mode 100644 Documentation/ABI/stable/sysfs-class-udc
=20
--=20
2.1.0.GIT
=20
--=20
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Loading...