Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp434502rwb; Thu, 12 Jan 2023 07:58:50 -0800 (PST) X-Google-Smtp-Source: AMrXdXtUmcoyg4NQhnT2YjZbCuka/CxCbGaUG0l9kyyqbeyVZiNKW8M3xc4Pj2nuc6DiuRIvE5YZ X-Received: by 2002:a17:902:7583:b0:189:4bf4:2cfc with SMTP id j3-20020a170902758300b001894bf42cfcmr75296791pll.31.1673539129984; Thu, 12 Jan 2023 07:58:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673539129; cv=none; d=google.com; s=arc-20160816; b=eiMuEOMEZAdq4CepZr+t8+r1HhlILV6TSbp9q+d3XvCpagdiE2sBdL5dAKUps853WB OrFiLAKq1IJFg1uVpshp+JCuykvvhmRPNlMOKBtjEd44ASaD9OFoJ2+dcJI0o0PbeJXS DGMVrK50pm6U5hxrvML85WjWGZHlZHJWmKA71mS2B1Tjjohr/dbbViEaFlduwjkaEKfO K255dxCI+0tVbEAEbrA4GB/vmmV+N5wSSrMBuECQLgMJnTMNE96ZxNwzW0zg2R222COp mlqhmx7GAfX3APmQVYXs1Ia9/AWYfOIf96WMvx3CtwN4bb4jlQPvj5sjzaSmF4MdAkjf FUdA== 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=rzT+DDP8PT305g9TAUjLEKxQr1Pi2XLihGZanOXmEyQ=; b=lp01GSlK+y1q8K1Vg9URS9JQKzMpa9OL5/k+1cPikFuD/851bWpg0R9cE8H8zUzUb6 itSwDjcYj8mgJpSxC/jp6ittfAykaAdRbP7y5VoIDFN6ndc8yHehzEAt6tDTD2aUUGfa nPwy+ik2vAS74sJ+fWbPSY0Vl4d4vNWuPZW4dzbYRJUrYWMvojCTj+VlnIpFoo5aGGq2 253hZ8zg8XHMiws2qnD4yNdxb5Xy/MqlIiTqGXefM71x1+N3EkHWgttJeNcAd1fGuIop ypM/6iNqaCnLA8S001mYeDw0W9LnT83KVoilOGvsAln8HvEK76WN/KJrQ9nvLYfOIpSA jr4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=J0WV3ra8; 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 s9-20020a170902ea0900b00189d12c0dd9si19094334plg.555.2023.01.12.07.58.43; Thu, 12 Jan 2023 07:58:49 -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=J0WV3ra8; 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 S240385AbjALPbf (ORCPT + 50 others); Thu, 12 Jan 2023 10:31:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240378AbjALP3r (ORCPT ); Thu, 12 Jan 2023 10:29:47 -0500 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7CBAB4B7 for ; Thu, 12 Jan 2023 07:23:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673536992; x=1705072992; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=xDmwjywJLhxTesfoaedLfKxuHBE4U5Qc/GEUQvlSwl0=; b=J0WV3ra87et1E6aAEm0yK/I8VCNYzKU299kkG1jKk60clL7I8tHjbyh2 Ui4vp7SNMSclsb0U6M6wDSLEDPL2WVe3JmQUKeQvV3B9X9YIPM5nRByxf kWrfNBXzyWRfSew9TGUkQRhRJsiC1GJpyA5qQ3VLyVGj6v0eP5miX+OJh RGsqrw46WMwEXPhmq+YtcRh2pFVdYTOVJFVyvT357NhApRVKWMDjd1p5t KQsmvZaguf42qIXqJK40GwjGx0/lYIhIq9GjZv8Xlqk8ViudgQ+bsbcHq cCXCKc+c0dUC6MqUkGVINtvHn0xzYOSheVgfZqgFzMx8o2oL3aiLSGdlS Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10588"; a="388212570" X-IronPort-AV: E=Sophos;i="5.97,211,1669104000"; d="scan'208";a="388212570" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jan 2023 06:57:12 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10588"; a="607816928" X-IronPort-AV: E=Sophos;i="5.97,211,1669104000"; d="scan'208";a="607816928" Received: from jbetan3x-mobl1.amr.corp.intel.com (HELO [10.209.143.163]) ([10.209.143.163]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jan 2023 06:57:11 -0800 Message-ID: <5d7659af-ffd0-4948-4c38-68815f4ca17f@linux.intel.com> Date: Thu, 12 Jan 2023 08:47:08 -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 14/19] soundwire: amd: add runtime pm ops for AMD master driver Content-Language: en-US To: "Mukunda,Vijendar" , 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-15-Vijendar.Mukunda@amd.com> <1af8aa6a-9896-4d35-48de-f084fd16ebc7@linux.intel.com> <216b288d-16d3-5806-86fb-fc6ba83b757a@amd.com> From: Pierre-Louis Bossart In-Reply-To: <216b288d-16d3-5806-86fb-fc6ba83b757a@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, 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 >>> +static int __maybe_unused amd_suspend_runtime(struct device *dev) >>> +{ >>> + struct amd_sdwc_ctrl *ctrl = dev_get_drvdata(dev); >>> + struct sdw_bus *bus = &ctrl->bus; >>> + int ret; >>> + >>> + if (bus->prop.hw_disabled || !ctrl->startup_done) { >> do you have a case where the startup is not done? This was an >> Intel-specific thing. > We have included startup_done flag in probe_work to check whether Manager > has started. In case if manager init sequence fails, then there is no need > to apply any PM ops. Not following, sorry. We introduced the .startup callback for intel because of a power dependency where we could not access and initialize the registers at the .probe time for the master driver. Do you have a similar dependency, and if not why not remove this flag?