summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-04-10 13:51:20 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-04-10 13:51:20 +0200
commitb9cd825d066c911cd6076a539986bcf22f1cbcd7 (patch)
tree09de044718479284e00ee89affb8b24aabeec1b9 /drivers/usb
parent2aebe3f3b20724e09ec76b196e16404d1ea573d9 (diff)
parent0c4d6af42d8375e003f0e4626f2f661862b5df4b (diff)
downloadop-kernel-dev-b9cd825d066c911cd6076a539986bcf22f1cbcd7.zip
op-kernel-dev-b9cd825d066c911cd6076a539986bcf22f1cbcd7.tar.gz
Merge tag 'usb-ci-v4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-next
Peter writes: Two Chipidea updates - Forbid dumpping registers when the controller in low power mode - dp pullup needs to be controlled by fsm when working at otg fsm mode
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/chipidea/debug.c4
-rw-r--r--drivers/usb/chipidea/udc.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/drivers/usb/chipidea/debug.c b/drivers/usb/chipidea/debug.c
index 268e423..dfb05ed 100644
--- a/drivers/usb/chipidea/debug.c
+++ b/drivers/usb/chipidea/debug.c
@@ -336,8 +336,8 @@ static int ci_registers_show(struct seq_file *s, void *unused)
struct ci_hdrc *ci = s->private;
u32 tmp_reg;
- if (!ci)
- return 0;
+ if (!ci || ci->in_lpm)
+ return -EPERM;
/* ------ Registers ----- */
tmp_reg = hw_read_intr_enable(ci);
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index 41914a5..764f668 100644
--- a/drivers/usb/chipidea/udc.c
+++ b/drivers/usb/chipidea/udc.c
@@ -1574,6 +1574,10 @@ static int ci_udc_pullup(struct usb_gadget *_gadget, int is_on)
{
struct ci_hdrc *ci = container_of(_gadget, struct ci_hdrc, gadget);
+ /* Data+ pullup controlled by OTG state machine in OTG fsm mode */
+ if (ci_otg_is_fsm_mode(ci))
+ return 0;
+
pm_runtime_get_sync(&ci->gadget.dev);
if (is_on)
hw_write(ci, OP_USBCMD, USBCMD_RS, USBCMD_RS);
OpenPOWER on IntegriCloud