Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11444900ybi; Thu, 25 Jul 2019 16:43:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqxyu8dP4aB8lFLLMsaioLn3gZcPeIBsXtHfwvntwBOy4fJ+CNsJWgkS82xmJpeQxZ59jCxg X-Received: by 2002:aa7:82da:: with SMTP id f26mr19265062pfn.82.1564098230222; Thu, 25 Jul 2019 16:43:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564098230; cv=none; d=google.com; s=arc-20160816; b=AtTUjpD2xiOwqHEvMUpXj7l7AfYa2i1RZa2H+Y1gd45SB5LNRLePRzPbNKW1jOloTo 2ucblf9iGSPqEc6SfG0L74WNMoLRxu/i7E2gR2hjcNsMZGRn71PQblumh+h5EMopeSlK HeUAIQL+v7Cbt5q2pNSGqj2zThi9Ltd6QZfx4Skj0N+QKLy29TcYaS35xhYt5qZRWHxe EHtR+OQy1gg918yopMaVjfdkZ/ehvpDaLSfEE8O0JcWJdFqkb6m8165mZ0TYN5VatnE7 R58AizyKvuoZRQfQVxuShvw4ooHb6TZShtjzwm76f0q6YlbgIwC6nusPRtwKRlj8/mRt vUww== 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=hQuz6jPxhMj8EsTDgqBGluAMZIbG/hlJTf/HnY37WZY=; b=LVl5gWh9cyK7tDnccjfby35hZHZqPW6IDPqmvVLg0nYllqOvCLwsHm8jNhruBpBuKF cG54WP1U0eVDLcpfmFMBdxDMN0i8kYNZs8E49BWDOZcXGeE8Vi09YdtQ2klWHfO4hfeI 4fU2K8uj5aElTxYf1HgekZi30Spo5ZJAN2b+vrzYbkQwsjmGq+CjFNQFKHIReBzkEe1d FvbDCHFauPPrYnjkyQjo9ecbvF8vvPYD39U0UaGxLIjHp3gVWqidzBaxnc7bi6xIQovp UcPELfltrJ654JFa+p7Z11LeY4K6Fi2Wf52A7NBVBgc7t0ZxXhA4Pr6SAiHWnw9iDkHf E6ZQ== 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 t36si18964568pga.32.2019.07.25.16.43.35; Thu, 25 Jul 2019 16:43:50 -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 S1726968AbfGYXm2 (ORCPT + 99 others); Thu, 25 Jul 2019 19:42:28 -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 S1727035AbfGYXly (ORCPT ); Thu, 25 Jul 2019 19:41:54 -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:41:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,308,1559545200"; d="scan'208";a="369874844" 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:41:52 -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 34/40] soundwire: intel: ignore disabled links for suspend/resume Date: Thu, 25 Jul 2019 18:40:26 -0500 Message-Id: <20190725234032.21152-35-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 Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/intel.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index 1477c35f616f..a976480d6f36 100644 --- a/drivers/soundwire/intel.c +++ b/drivers/soundwire/intel.c @@ -1161,6 +1161,12 @@ static int intel_suspend(struct device *dev) sdw = dev_get_drvdata(dev); + if (sdw->cdns.bus.prop.hw_disabled) { + dev_dbg(dev, "SoundWire master %d is disabled, ignoring\n", + sdw->cdns.bus.link_id); + return 0; + } + ret = intel_link_power_down(sdw); if (ret) { dev_err(dev, "Link power down failed: %d", ret); @@ -1179,6 +1185,12 @@ static int intel_resume(struct device *dev) sdw = dev_get_drvdata(dev); + if (sdw->cdns.bus.prop.hw_disabled) { + dev_dbg(dev, "SoundWire master %d is disabled, ignoring\n", + sdw->cdns.bus.link_id); + return 0; + } + ret = intel_init(sdw); if (ret) { dev_err(dev, "%s failed: %d", __func__, ret); -- 2.20.1