aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRuchika Kharwar2013-05-11 11:14:43 -0500
committerPraneeth Bajjuri2013-07-19 13:27:58 -0500
commit7876130d20362defe551e4729c2348f666c801be (patch)
treefefa2fa92ffb1e0c75a457f9b5a46c28ab9decaa /drivers
parent9c2cae35a7f94f9f40506c6fc05f6401beb22ded (diff)
downloadkernel-video-7876130d20362defe551e4729c2348f666c801be.tar.gz
kernel-video-7876130d20362defe551e4729c2348f666c801be.tar.xz
kernel-video-7876130d20362defe551e4729c2348f666c801be.zip
HACK: DRA7xx: usb: dwc3: set mailbox in gadget pullup.
On DRA7xx EVM, there is no vbus sensing. Hence the mailbox is required to be set when the android gagdet pullup is called. When the IO expander driver is available and senses vbus, it should write to the dwc3 mailbox. Change-Id: I78850c8ab243d4acc94b6327996849d13704802d Signed-off-by: Ruchika Kharwar <ruchika@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/dwc3/gadget.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index f3e52796335..f90fa6e11f7 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -53,6 +53,8 @@
53#include "core.h" 53#include "core.h"
54#include "gadget.h" 54#include "gadget.h"
55#include "io.h" 55#include "io.h"
56#include <linux/usb/dwc3-omap.h>
57#include <linux/platform_data/dwc3-omap.h>
56 58
57/** 59/**
58 * dwc3_gadget_set_test_mode - Enables USB2 Test Modes 60 * dwc3_gadget_set_test_mode - Enables USB2 Test Modes
@@ -1459,6 +1461,12 @@ static int dwc3_gadget_pullup(struct usb_gadget *g, int is_on)
1459 1461
1460 is_on = !!is_on; 1462 is_on = !!is_on;
1461 1463
1464#if defined(CONFIG_SOC_DRA7XX)
1465 if (is_on) {
1466 if (dwc3_omap_mailbox(dwc->dev->parent, OMAP_DWC3_VBUS_VALID))
1467 dev_err(dwc->dev, "Error wrapper may not be initilized\n");
1468 }
1469#endif
1462 spin_lock_irqsave(&dwc->lock, flags); 1470 spin_lock_irqsave(&dwc->lock, flags);
1463 ret = dwc3_gadget_run_stop(dwc, is_on); 1471 ret = dwc3_gadget_run_stop(dwc, is_on);
1464 spin_unlock_irqrestore(&dwc->lock, flags); 1472 spin_unlock_irqrestore(&dwc->lock, flags);