Re: [PATCH 2/2] usb: chipidea: otg: fix reading otgsc register

2016-09-21 Thread Peter Chen
On Mon, Sep 19, 2016 at 01:44:36PM +0200, Sascha Hauer wrote: > When switching from gadget to host the driver waits for VBUS It should be switching from host to gadget > to disappear before doing the actual switch. This waiting is > done by letting hw_wait_reg() poll the OTGSC register. This is

[PATCH 2/2] usb: chipidea: otg: fix reading otgsc register

2016-09-19 Thread Sascha Hauer
When switching from gadget to host the driver waits for VBUS to disappear before doing the actual switch. This waiting is done by letting hw_wait_reg() poll the OTGSC register. This is buggy. hw_wait_reg() directly reads the register, but for reading the OTGSC register hw_read_otgsc() must be used