Re: [PATCH v4 3/7] usb: chipidea: add otg id switch and vbus connect/disconnect detect

2012-12-27 Thread Peter Chen
On Thu, Dec 27, 2012 at 08:21:55AM +0100, Marek Vasut wrote: Dear Peter Chen, [...] + +#define CI_VBUS_STABLE_TIMEOUT 500 Shall we not change this to static const int instead ? Is it a must? I find the similar at drivers/usb/core/hub.c 2433 #define PORT_RESET_TRIES5 2434

[PATCH v4 3/7] usb: chipidea: add otg id switch and vbus connect/disconnect detect

2012-12-26 Thread Peter Chen
The main design flow is the same with msm otg driver, that is the id and vbus interrupt are handled at core driver, others are handled by individual drivers. - At former design, when switch usb role from device-host, it will call udc_stop, it will remove the gadget driver, so when switch role

Re: [PATCH v4 3/7] usb: chipidea: add otg id switch and vbus connect/disconnect detect

2012-12-26 Thread Marek Vasut
Dear Peter Chen, [...] + +#define CI_VBUS_STABLE_TIMEOUT 500 Shall we not change this to static const int instead ? [...] --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c @@ -1371,6 +1371,7 @@ static int ci13xxx_vbus_session(struct usb_gadget *_gadget, int is_active)