Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp783074ybh; Sat, 3 Aug 2019 09:41:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqz/XKKsFkg84cgWYvmt8lLovlPMv2wPc2PNIxZAaPhCwsQ4RjwdvG5RCaxwSLMgUbfg15YG X-Received: by 2002:a63:f357:: with SMTP id t23mr21659854pgj.421.1564850487655; Sat, 03 Aug 2019 09:41:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564850487; cv=none; d=google.com; s=arc-20160816; b=NBDOY9UXd6hKbIFLoTrNkKD/kU2lCiSiTzH3Bt2hE6qeXqfFTnqAdj1OFCw/0yrIir kETG/W2MVLUzo5FB7iZjesJAxAQSNVpnQEYBbS4YoVZQltrbVJ13jdeBdYt3v8lN5dMN +7jijKgufht06jzLGxC6a6RUS1Eu4L0sm4XVqyFEUZsAf1eBV9EZRJ6/pUhvARmBpVjW p5BqXeRbL05eVzLP6c5Rr0/yqXkvgN/8KlttZTTrfCfki8ERBCSFmgqXhQnnaO5IHiVN bKmuWBjpI9OJ4dkMmTLtILuzKYm+WP2phgdMu897KdGTANYOUKR7a34CCXDVq2Reg0O4 oY7A== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=UNnkngwmm5sPz8fl9XcbDx/nksuMEO/rliG0LplyoLY=; b=bwiJvaCD3SxwD604u1pYB9nNGsuJYc6ellhUSrkxhetqqyRdRV7gYD+/3Al7x8zEua H9ZWswaUk81+Li74+S8xfxcYWOetb5Mwc17Y11SC4NA2+yiIiOXUPAHnsnjp2nhSGL1r cJdwyq+oZdCqvb0oaUxI0RpdB1sA21t4EvumXkEDEF8QeOfXYxkGvNIhBARqiSYcdU5Q xJCyQ0E+uiZ7o+2Y4pRrREXPk74L4HXlprtMNKte5yQGmJqZjoSUwIHUdb83+GN8L43y CIM/DdRRwzr1q+383XUhVIiL1RdOoTlN/iPZJpfbVk7HmivEX0HchEHpqvdVMRHAqmJI SCYg== 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 b74si40318070pfb.281.2019.08.03.09.41.12; Sat, 03 Aug 2019 09:41:27 -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 S2405734AbfHBRoI (ORCPT + 99 others); Fri, 2 Aug 2019 13:44:08 -0400 Received: from mga07.intel.com ([134.134.136.100]:49591 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404609AbfHBRoI (ORCPT ); Fri, 2 Aug 2019 13:44:08 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Aug 2019 10:44:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,339,1559545200"; d="scan'208";a="181076889" Received: from linux.intel.com ([10.54.29.200]) by FMSMGA003.fm.intel.com with ESMTP; 02 Aug 2019 10:44:06 -0700 Received: from cwhanson-mobl.amr.corp.intel.com (unknown [10.252.133.191]) by linux.intel.com (Postfix) with ESMTP id 107F05800BD; Fri, 2 Aug 2019 10:44:04 -0700 (PDT) Subject: Re: [RFC PATCH 34/40] soundwire: intel: ignore disabled links for suspend/resume To: Vinod Koul Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, tiwai@suse.de, broonie@kernel.org, gregkh@linuxfoundation.org, jank@cadence.com, srinivas.kandagatla@linaro.org, slawomir.blauciak@intel.com, Sanyog Kale References: <20190725234032.21152-1-pierre-louis.bossart@linux.intel.com> <20190725234032.21152-35-pierre-louis.bossart@linux.intel.com> <20190802173047.GD12733@vkoul-mobl.Dlink> From: Pierre-Louis Bossart Message-ID: Date: Fri, 2 Aug 2019 12:44:04 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190802173047.GD12733@vkoul-mobl.Dlink> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/2/19 12:30 PM, Vinod Koul wrote: > On 25-07-19, 18:40, Pierre-Louis Bossart wrote: > > Please add explanation why.. yes missed this > >> 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 >