From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DA1B0C5479D for ; Wed, 11 Jan 2023 16:39:45 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 1158E766B; Wed, 11 Jan 2023 17:38:54 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1158E766B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1673455184; bh=K+VKmwPyPd2Djkcizz3wC2h8rnKbiFkFV9EkJSM5gmk=; h=Date:Subject:To:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=B90XbmrSDcb2Zi5eGYZJpqs4FHYBMnWEFyq1OVzP3lpvN1UktfyIKpHWloe7b0aSb 4X9BtudD5bkUNFzTEPlroa6mSpgg48saze79BTPgi+g0819PbtiRcSPMiWgaG7CiJG WOqOVSYwRXHUITWwjjQatbL+3+JX/UfD+bdmaho8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B680FF805AF; Wed, 11 Jan 2023 17:36:23 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 098E0F805AE; Wed, 11 Jan 2023 17:36:22 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B1A73F805AA for ; Wed, 11 Jan 2023 17:36:19 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B1A73F805AA Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=dEmVYq1l DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673454981; x=1704990981; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=K+VKmwPyPd2Djkcizz3wC2h8rnKbiFkFV9EkJSM5gmk=; b=dEmVYq1lBo1kUs/osktBSRupSWMjHD1GCySFXN8nekbfyaMqPOgA0Q3S BRqFKqq7LYuQpbEQse2MfcFEDiZSZcjnrEZUssQrezw4PPpviNGwy4fdT S6OmaMB9wCI8rIU1qvE+Alp3T4yg/VDwSSl2Q3giuzPRPuJfFpV+DXGTp jVPL4GKNUJkF4ep/nPtzKQ1KmAY0UYYT+uoX9w8UJ+Zlzmip6fw4hXhC4 atKfx4lFq+rlIFoJIWAfLaKy4sVZRXDtksj2UCb3HoB0mSJq/BKoXC0Uj THy9hsd2oSGIa3znyetJCyY+U0xVdPaUsq9mZWZPBQv+W4ee8o6PUgvgT Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10586"; a="324704253" X-IronPort-AV: E=Sophos;i="5.96,317,1665471600"; d="scan'208";a="324704253" 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 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-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mastan.Katragadda@amd.com, Sunil-kumar.Dommati@amd.com, Basavaraj.Hiregoudar@amd.com, open list , Mario.Limonciello@amd.com, arungopal.kondaveeti@amd.com, Sanyog Kale , Bard Liao Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" 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?