Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11445369ybi; Thu, 25 Jul 2019 16:44:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqz/iAk6hp2Xg2QjZwAaH9v2krdYe3vSf7tsICyruKErwRpt1xAtrulkkgR+rbkAhB07Szc2 X-Received: by 2002:a17:90a:3651:: with SMTP id s75mr93113431pjb.13.1564098273879; Thu, 25 Jul 2019 16:44:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564098273; cv=none; d=google.com; s=arc-20160816; b=FhYecjrnGwyI6E9acxAp5bVQ3g0VJXZI0f0QPrtc2BAbxvkl0oSJKmTh4sjPeObmkT Jy4nQB5gwuGsJHpleMjDsEBCL5TCXfHbcO9dM9ny2FAd3BZA/yIRBPQKjTH+pQBXMisb iSFoU4OieRfQyrq1h03htEqiHo8xyQpIZ4WI7IJu/Sxhx9sXgv3ZZTer2ZeUfjIxKfPu XCotkB+LCY476PZ4BSzbZiMC2xZSVCf7RRMsBV6QO0VKC+yvdBS2umg2PqX7eyyM8jW1 KXLymC28KAT2plNXfD+CaH0+uWxdFqlRrXu74SRp0P89IB0teHp92bMKVsMRvQWXjckp Gnew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=R5CYWMulls4E5mZ4cpZORBk01+kk8aqAdT6C37wDy60=; b=UncDyQxNchNW/kl6hTSS9LU2FQwz/NOgN/LEORm5J/M1NmiM0Mq0I5oF+Ai+W4gFV6 Wq/8xtWSEGHu9jMzDO1SEc6kGZA87wvaADQvILQdtMWecErDj9cHbam9rPLW+dfeWHR3 2R4zdrfttqVPWHAg8ByDBe5Z2U/nCgTNaj49i/Oen1vEhNeV1+53DEV956nrS+uiWrKc Xb1DWzm2h9SLYfMesZnf6/FzLvAhrYnHte6Guku56hTJPpHE4+svvgoj0btTI9BdxKht uIiU5V6RVCgxa5k2uZR7lHxCYJEkbJA/RVSU1PKbNWUwfwYixmEZVSo4wWGDhwHiFSsa BLLw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v38si18237286pgn.341.2019.07.25.16.44.19; Thu, 25 Jul 2019 16:44:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727745AbfGYXmL (ORCPT + 99 others); Thu, 25 Jul 2019 19:42:11 -0400 Received: from mga06.intel.com ([134.134.136.31]:51850 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727650AbfGYXmD (ORCPT ); Thu, 25 Jul 2019 19:42:03 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jul 2019 16:42:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,308,1559545200"; d="scan'208";a="369874895" Received: from amrutaku-mobl1.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.255.230.75]) by fmsmga006.fm.intel.com with ESMTP; 25 Jul 2019 16:42:01 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Cc: linux-kernel@vger.kernel.org, tiwai@suse.de, broonie@kernel.org, vkoul@kernel.org, gregkh@linuxfoundation.org, jank@cadence.com, srinivas.kandagatla@linaro.org, slawomir.blauciak@intel.com, Pierre-Louis Bossart , Sanyog Kale Subject: [RFC PATCH 40/40] soundwire: intel: add delay on restart for enumeration Date: Thu, 25 Jul 2019 18:40:32 -0500 Message-Id: <20190725234032.21152-41-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190725234032.21152-1-pierre-louis.bossart@linux.intel.com> References: <20190725234032.21152-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We have a conceptual issue on restart: the interaction with the slaves can start before (re) enumeration is complete. Add a delay for now but we will need to have an async notification that all devices are back on the bus. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/intel.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index 1394a2322553..e4ea430b5a8e 100644 --- a/drivers/soundwire/intel.c +++ b/drivers/soundwire/intel.c @@ -1242,6 +1242,11 @@ static int intel_resume(struct device *dev) ret = sdw_cdns_exit_reset(&sdw->cdns); + /* add delay to let Slaves re-enumerate */ + usleep_range(20000, 30000); + + dev_dbg(dev, "%s done\n", __func__); + return ret; } -- 2.20.1