Skip to content

Commit b9cd825

Browse files
committed
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
2 parents 2aebe3f + 0c4d6af commit b9cd825

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

drivers/usb/chipidea/debug.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,8 @@ static int ci_registers_show(struct seq_file *s, void *unused)
336336
struct ci_hdrc *ci = s->private;
337337
u32 tmp_reg;
338338

339-
if (!ci)
340-
return 0;
339+
if (!ci || ci->in_lpm)
340+
return -EPERM;
341341

342342
/* ------ Registers ----- */
343343
tmp_reg = hw_read_intr_enable(ci);

drivers/usb/chipidea/udc.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1574,6 +1574,10 @@ static int ci_udc_pullup(struct usb_gadget *_gadget, int is_on)
15741574
{
15751575
struct ci_hdrc *ci = container_of(_gadget, struct ci_hdrc, gadget);
15761576

1577+
/* Data+ pullup controlled by OTG state machine in OTG fsm mode */
1578+
if (ci_otg_is_fsm_mode(ci))
1579+
return 0;
1580+
15771581
pm_runtime_get_sync(&ci->gadget.dev);
15781582
if (is_on)
15791583
hw_write(ci, OP_USBCMD, USBCMD_RS, USBCMD_RS);

0 commit comments

Comments
 (0)