Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp9756907rwl; Wed, 11 Jan 2023 09:31:43 -0800 (PST) X-Google-Smtp-Source: AMrXdXuixoCi4T4W4r1fNYqT+7OL//h7PG1nFMhh1rlU7D3e253uRfH9XoKFEpwJsSu7yFZqBtfy X-Received: by 2002:aa7:8599:0:b0:588:eac0:b05b with SMTP id w25-20020aa78599000000b00588eac0b05bmr10267439pfn.27.1673458302854; Wed, 11 Jan 2023 09:31:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673458302; cv=none; d=google.com; s=arc-20160816; b=fpEuCD+Gn1QwiNS5Xu1GesIefH2jdsOZWlUQdDizkTKAg/AUU5C0ghy+cdn3vzAw00 DfQgczT9iRLBqJfFNT3Dppku0fsTEvINHpuD2q2k6J7oLMS5uZl9Ck/9KG4AdwtfqOIH mBdLxz/ucS8s5HvsJlVTgZ10m31vKrpCcqWfsmB4fnNZb7pOmr9RRS6OU6Li/VJgmagF OXc5Gf/QrnfykSQyi5uvRcspBVEj1mOJU/mvqKISA8z7lm4E19So6D2KwCIz6sbMo/4O c76BzAZbtYP7BRgFuKVxpuAFUzIDigRThaxpoRLIkpIr0xBfhzvRjUF6EMzSYDrBzUTY ummg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=I3c7o2Ui52P3UrWiLziTItw1c5TtjIPL/UJ+8K9INjA=; b=JvlT60RW4F5N46KOSMKA0iKc+gIm+dB7JLJTM1BS3/Dlkm1/GZxCU9eojOt8HtVcRn I0mNObke6sRi1TdL+GeUuK11WN51Twyo73uG2n+Nd5UNpS7UJJYbuwOPQiPN7fNxw0bB 8QDcVkt68cxBC4/pFO9OtI1bYZZVrhamjX1HRjpsmS5ms59wzuycS8ouHtW3mr6mBoS9 w8GGRMjjyK0eFItLVX58eK0rwgivcwg7hzl9N/24CSCO2/TlVyMdNgnYE7Mmnzpn5i/e l+eH+klrpaOu3aXwTjwTC9bRQedNtsC8oe5JRT42Rb3kKSJrUotsGYTuFUeW5Iys67Iv msJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RvJ8om1J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h12-20020a056a00230c00b00561898445bdsi15950536pfh.273.2023.01.11.09.31.05; Wed, 11 Jan 2023 09:31:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RvJ8om1J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239570AbjAKQhJ (ORCPT + 51 others); Wed, 11 Jan 2023 11:37:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234628AbjAKQgS (ORCPT ); Wed, 11 Jan 2023 11:36:18 -0500 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 134F464DF for ; Wed, 11 Jan 2023 08:36:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673454978; x=1704990978; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=K+VKmwPyPd2Djkcizz3wC2h8rnKbiFkFV9EkJSM5gmk=; b=RvJ8om1Jp3oMmvtBLhTLHsIxC3YSSgcop8fE88WhW0nW2sO1q1gjG54m KiCZaOA/ya9w2hj0qXWC1jbUnl0Oq4ER5Kpop6MDep0KWzR4RLY+RCLow QytT+P/VRctM/j1p3Pvo0jnZfTrHXwnx2vK5Noh32GHUl95hioBH57M/6 ux8Nif8f4nzl4fN54xH60QI53FERz2kPNQ4XV3nv3vEPQNfpzTUFxdJXS sLw3Jb5bNRZnJDsDXTyL+WhZjABR7uGE5PEUK3dQa99BaAWjgpcFeeyxG ON7yagOyDBp4rNnmBYwwBwud31fzltv/gVvA+VgDidBv/Sb0eswduKjLZ Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10586"; a="324704256" X-IronPort-AV: E=Sophos;i="5.96,317,1665471600"; d="scan'208";a="324704256" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2023 08:32:44 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10586"; a="607408791" X-IronPort-AV: E=Sophos;i="5.96,317,1665471600"; d="scan'208";a="607408791" Received: from flobatol-mobl1.amr.corp.intel.com (HELO [10.212.110.208]) ([10.212.110.208]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2023 08:32:41 -0800 Message-ID: <612c78ea-335e-a196-247c-9e8f3442c3e5@linux.intel.com> Date: Wed, 11 Jan 2023 09:54:42 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.4.2 Subject: Re: [PATCH 16/19] soundwire: amd: handle wake enable interrupt Content-Language: en-US To: Vijendar Mukunda , broonie@kernel.org, vkoul@kernel.org, alsa-devel@alsa-project.org Cc: Basavaraj.Hiregoudar@amd.com, Sunil-kumar.Dommati@amd.com, Mario.Limonciello@amd.com, Mastan.Katragadda@amd.com, arungopal.kondaveeti@amd.com, Bard Liao , Sanyog Kale , open list References: <20230111090222.2016499-1-Vijendar.Mukunda@amd.com> <20230111090222.2016499-17-Vijendar.Mukunda@amd.com> From: Pierre-Louis Bossart In-Reply-To: <20230111090222.2016499-17-Vijendar.Mukunda@amd.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/11/23 03:02, Vijendar Mukunda wrote: > Add wake enable interrupt support for both the soundwire controller SoundWire. > instances. > > Signed-off-by: Vijendar Mukunda > Signed-off-by: Mastan Katragadda > --- > drivers/soundwire/amd_master.c | 9 +++++++++ > drivers/soundwire/amd_master.h | 1 + > include/linux/soundwire/sdw_amd.h | 1 + > 3 files changed, 11 insertions(+) > > diff --git a/drivers/soundwire/amd_master.c b/drivers/soundwire/amd_master.c > index 290c59ab7760..2fd77a673c22 100644 > --- a/drivers/soundwire/amd_master.c > +++ b/drivers/soundwire/amd_master.c > @@ -1219,6 +1219,13 @@ static void amd_sdwc_update_slave_status_work(struct work_struct *work) > u32 sw_status_change_mask_0to7_reg; > u32 sw_status_change_mask_8to11_reg; > > + if (ctrl->wake_event) { > + pm_runtime_resume(ctrl->dev); > + acp_reg_writel(0x00, ctrl->mmio + ACP_SW_WAKE_EN); > + ctrl->wake_event = false; > + return; > + } this is surprising. A wake event typically happens when the bus is in clock-stop mode. You cannot deal with wake events while dealing with the peripheral status update, because you can only get that status when the manager is up-and-running. There's a conceptual miss here, no? If the wake comes from the PCI side, then it's the same comment: why would the wake be handled while updating the peripheral status. What am I missing?