From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758687AbcHYV0k (ORCPT ); Thu, 25 Aug 2016 17:26:40 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:38154 "EHLO out2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754757AbcHYV0h (ORCPT ); Thu, 25 Aug 2016 17:26:37 -0400 X-Sasl-enc: GvIXD+Melz6mWeAQS+tHQ4oBMSnyc+1CBhfJOfazlXaa 1472160395 Date: Thu, 25 Aug 2016 14:26:33 -0700 Message-Id: From: John Youn To: linux-usb@vger.kernel.org Cc: johnyoun@synopsys.com Cc: Stefan Wahren Cc: Michael Niewoehner Cc: Felipe Balbi Cc: Tao Huang Cc: Julius Werner Cc: linux-kernel@vger.kernel.org Cc: Caesar Wang Cc: Heiko Stuebner Cc: Remi Pommarel Cc: Kever Yang Cc: Doug Anderson Cc: Stephen Warren Cc: linux-rpi-kernel@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Subject: [RFT PATCH v3 0/3] usb: dwc2: Fix core reset and force mode delays Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series tries to account for a delay from the IDDIG debounce filter when switching modes. This delay is a function of the PHY clock speed and can range from 5-50 ms. This delay must be taken into account on core reset and force modes. A full explanation is provided in the patch commit log and code comments. Patch 1 is a prerequisite to this fix. Patch 2 implements the delay for core reset. Patch 3 implements the delay for set/clear force modes. Appreciate any testing, especially on RK3188 and RPi platforms. Patch 1-2 can probably be merged right now as they shouldn't break anything. Patch 3 should solve RPi issues, but has problems in RK3188 that need to be debugged. v3: * Added tested-bys for patch 1-2 * Fixed an issue where a function was not returning a value * Dropped patch 4 v2: * Broke up the last patch of the original series Regards, John John Youn (3): usb: dwc2: gadget: Only initialize device if in device mode usb: dwc2: Add delay to core soft reset usb: dwc2: Properly account for the force mode delays drivers/usb/dwc2/core.c | 128 ++++++++++++++++++++++++++++++++++++++++------ drivers/usb/dwc2/core.h | 1 + drivers/usb/dwc2/gadget.c | 7 ++- drivers/usb/dwc2/hw.h | 1 + 4 files changed, 118 insertions(+), 19 deletions(-) -- 2.9.0