Hello. On 08/30/2011 03:57 PM, Pratyush Anand wrote:
From: Tirumala Marri<tmarri@xxxxxxx>
Enable gadget support
Signed-off-by: Tirumala R Marri<tmarri@xxxxxxx> Signed-off-by: Fushen Chen<fchen@xxxxxxx> Signed-off-by: Mark Miesfeld<mmiesfeld@xxxxxxx> Signed-off-by: Pratyush Anand<pratyush.anand@xxxxxx> --- drivers/usb/gadget/gadget_chips.h | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-)
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.
/** * 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 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html