Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753158AbdDCMVQ (ORCPT ); Mon, 3 Apr 2017 08:21:16 -0400 Received: from fllnx209.ext.ti.com ([198.47.19.16]:13241 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753032AbdDCMVO (ORCPT ); Mon, 3 Apr 2017 08:21:14 -0400 From: Roger Quadros To: CC: , , , Roger Quadros Subject: [PATCH v3 0/3] usb: dwc3: dual-role support Date: Mon, 3 Apr 2017 15:20:28 +0300 Message-ID: <1491222031-18120-1-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1230 Lines: 39 Hi, Taking a simplistic approach this time. We don't use the OTG controller block at all. Instead we just rely on ID events via extcon framework. I tried to get rid of workqueue but unfortunately it causes too much pain when the UDC is unregistered. https://hastebin.com/upugaqogol.xml https://hastebin.com/yayaduqodo.xml So I've still kept the workqueue around. We also have debugfs role switching, but I don't yet see how we can use this for real testing as I still need to manually plug/unplug the USB cables (host vs device) to test switching :). v3: - restructure and simplify. Remove OTG controller code, only rely on extcon. cheers, -roger Roger Quadros (3): usb: udc: allow adding and removing the same gadget device usb: dwc3: make role-switching work with debugfs/mode usb: dwc3: Add dual-role support drivers/usb/dwc3/Makefile | 4 + drivers/usb/dwc3/core.c | 18 ++--- drivers/usb/dwc3/core.h | 22 ++++++ drivers/usb/dwc3/debugfs.c | 49 +++++++++++-- drivers/usb/dwc3/drd.c | 167 ++++++++++++++++++++++++++++++++++++++++++ drivers/usb/gadget/udc/core.c | 1 + 6 files changed, 242 insertions(+), 19 deletions(-) create mode 100644 drivers/usb/dwc3/drd.c -- 2.7.4