From patchwork Fri Aug 19 15:10:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 1080882 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7JFBL7R003995 for ; Fri, 19 Aug 2011 15:11:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756051Ab1HSPLT (ORCPT ); Fri, 19 Aug 2011 11:11:19 -0400 Received: from na3sys009aog110.obsmtp.com ([74.125.149.203]:48838 "EHLO na3sys009aog110.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755871Ab1HSPLT (ORCPT ); Fri, 19 Aug 2011 11:11:19 -0400 Received: from mail-bw0-f50.google.com ([209.85.214.50]) (using TLSv1) by na3sys009aob110.postini.com ([74.125.148.12]) with SMTP ID DSNKTk59E61PphXYoEDf0kWpv5F7qsEuqScp@postini.com; Fri, 19 Aug 2011 08:11:18 PDT Received: by mail-bw0-f50.google.com with SMTP id zu5so2273340bkb.9 for ; Fri, 19 Aug 2011 08:11:15 -0700 (PDT) Received: by 10.204.130.153 with SMTP id t25mr541850bks.45.1313766674808; Fri, 19 Aug 2011 08:11:14 -0700 (PDT) Received: from localhost (cs181221225.pp.htv.fi [82.181.221.225]) by mx.google.com with ESMTPS id v22sm1074715bkw.45.2011.08.19.08.11.13 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 19 Aug 2011 08:11:13 -0700 (PDT) From: Felipe Balbi To: Greg KH Cc: Linux USB Mailing List , Linux OMAP Mailing List , Felipe Balbi Subject: [PATCH 2/4] usb: gadget: introduce gadget_is_dwc3() Date: Fri, 19 Aug 2011 18:10:57 +0300 Message-Id: <1313766659-28360-3-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.7.6.396.ge0613 In-Reply-To: <1313766659-28360-1-git-send-email-balbi@ti.com> References: <1313766659-28360-1-git-send-email-balbi@ti.com> Organization: Texas Instruments\n Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 19 Aug 2011 15:11:21 +0000 (UTC) ... to check whether we're running on DesignWare USB3 DRD Controller. Signed-off-by: Felipe Balbi --- drivers/usb/gadget/gadget_chips.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/usb/gadget/gadget_chips.h b/drivers/usb/gadget/gadget_chips.h index f3a83cd..a8855d0 100644 --- a/drivers/usb/gadget/gadget_chips.h +++ b/drivers/usb/gadget/gadget_chips.h @@ -31,6 +31,7 @@ #define gadget_is_ci13xxx_msm(g) (!strcmp("ci13xxx_msm", (g)->name)) #define gadget_is_ci13xxx_pci(g) (!strcmp("ci13xxx_pci", (g)->name)) #define gadget_is_dummy(g) (!strcmp("dummy_udc", (g)->name)) +#define gadget_is_dwc3(g) (!strcmp("dwc3-gadget", (g)->name)) #define gadget_is_fsl_qe(g) (!strcmp("fsl_qe_udc", (g)->name)) #define gadget_is_fsl_usb2(g) (!strcmp("fsl-usb2-udc", (g)->name)) #define gadget_is_goku(g) (!strcmp("goku_udc", (g)->name)) @@ -115,6 +116,8 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget) return 0x30; else if (gadget_is_net2272(gadget)) return 0x31; + else if (gadget_is_dwc3(gadget)) + return 0x32; return -ENOENT; }