Thread (51 messages) flat view 51 messages, 11 authors, 2011-09-05

Re: [PATCH 11/14] dwc/otg: Driver enable gadget support

From: Sergei Shtylyov <hidden>
Date: 2011-08-30 13:03:39

Hello.

On 08/30/2011 03:57 PM, Pratyush Anand wrote:
From: Tirumala Marri<redacted>
Enable gadget support
Signed-off-by: Tirumala R Marri<redacted>
Signed-off-by: Fushen Chen<redacted>
Signed-off-by: Mark Miesfeld<redacted>
Signed-off-by: Pratyush Anand<redacted>
---
  drivers/usb/gadget/gadget_chips.h |   18 +++++++++++++++++-
  1 files changed, 17 insertions(+), 1 deletions(-)
quoted hunk ↗ jump to hunk
diff --git a/drivers/usb/gadget/gadget_chips.h b/drivers/usb/gadget/gadget_chips.h
index 0978103..66b8018 100644
--- a/drivers/usb/gadget/gadget_chips.h
+++ b/drivers/usb/gadget/gadget_chips.h
@@ -148,6 +148,19 @@
  #define gadget_is_s3c_hsotg(g)    0
  #endif

+#if defined(CONFIG_DWC_OTG_MODE) || defined(CONFIG_DWC_DEVICE_ONLY)
+#define gadget_is_dwc_otg_pcd(g)	(!strcmp("dwc_otg_pcd", (g)->name))
+#else
+#define gadget_is_dwc_otg_pcd(g)	0
+#endif
+
+#ifdef CONFIG_USB_GADGET_CI13XXX_MSM
+#define gadget_is_ci13xxx_msm(g)	(!strcmp("ci13xxx_msm", (g)->name))
+#else
+#define gadget_is_ci13xxx_msm(g)	0
+#endif
+
+
    Too many newlines.
quoted hunk ↗ jump to hunk
  /**
   * usb_gadget_controller_number - support bcdDevice id convention
@@ -208,10 +221,13 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget)
  		return 0x26;
  	else if (gadget_is_designware(gadget))
  		return 0x27;
+	else if (gadget_is_ci13xxx_msm(gadget))
+		return 0x28;
+	else if (gadget_is_dwc_otg_pcd(gadget))
+		return 0x29;
    Hm, why are you adding 2 gadgets?
  	return -ENOENT;
  }

-
    Unrelated white space change.
  /**
   * gadget_supports_altsettings - return true if altsettings work
   * @gadget: the gadget in question
WBR, Sergei
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help