Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp719105rwl; Wed, 12 Apr 2023 03:10:35 -0700 (PDT) X-Google-Smtp-Source: AKy350ZEK+7ev8bwKV2dlWpP3bQZ2awRByH4dhpaGH+sOe1JwjC0ESPU709FDgz8F8erQSrBNExm X-Received: by 2002:a17:907:3202:b0:94a:7c86:5580 with SMTP id xg2-20020a170907320200b0094a7c865580mr10045486ejb.47.1681294235215; Wed, 12 Apr 2023 03:10:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681294235; cv=none; d=google.com; s=arc-20160816; b=AbYq58IDm/JqKyUJVCpCb5+Sh9bc/5h1RrPuCpyvHyNfcCMracy3EEf8/oJaXpimYG W2fAV3t8y1XvzEUy08b+xNbdpB3YkxlSElVKjbhA0UM7fcZnRCHW7T/Q4DhZLHY59QeF NfQibK1Z792xW7j5HW219TCNnE5rIE/6ZtzKjxaAWVYdCyVJh8sDMSC1mhR7eG6OasnP iEBcGgWKYxU3+sljVUVWlaJLYAZb9teLkh8YuYs+VZTaWhytfcF8z6RKR461QhXFFc8Y bJBN8x1IcPwPFlCJJdnbn6e5y2oo7A4Xo6JLwcMe8qGHrgLFPort4K6erRT/YIIWkUMw sioQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=360aF3fBSjGbaYmWbJ0DF3LgKW4WkfB9ZLtAvJmmJ2I=; b=XKjChj2v5K4IUWzmwqe/bN3XmVkZtqP08XKBKI2UlZPPa88O3lhUxLzOHWwb9TvzWd 6TJAgRgjNTn/T2hc/8ZSDvZ64/VsXWt7JjrGfd6AKUojN54OaPlskJEDBQnRCNIP19PU lWdnCyzeDH4jRhsvFt1KsGd9aU8F/9TPOTK/HrahFlnOtFl5aeXDqRNkq6TkwQCkEHio JhmzCJx2W3bWp/F4Ba6yMqexLaZyY8R+POULrgV3SHvWV78mbQ3TCKfPPgRzsz4N8rpM 1CZgrbpMgZb9ioSHbgLDTsi1APqihzLRsjAsLTs09BTKYx4cfmYOPqkAEECgSH5bsbDr sOzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=b5VqUxzC; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s22-20020a17090699d600b00933d2299f06si9799220ejn.432.2023.04.12.03.10.11; Wed, 12 Apr 2023 03:10:35 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b=b5VqUxzC; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230036AbjDLKH3 (ORCPT + 99 others); Wed, 12 Apr 2023 06:07:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230522AbjDLKHV (ORCPT ); Wed, 12 Apr 2023 06:07:21 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC3AB83DC for ; Wed, 12 Apr 2023 03:07:08 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2945A63127 for ; Wed, 12 Apr 2023 10:07:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1B8FCC433EF; Wed, 12 Apr 2023 10:07:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681294027; bh=yF/uFRHThBaezM0NTlXWHeSUyorZ+xUTqEgdHeW/6RM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=b5VqUxzCLLBle3AnLLDpUACQQp0zfOI4ujjCkpUTUmw+c/x/Gq2uPB1jdaUd1/Si+ huX4/Iz1vjqPuSpx5iSSKPK5NKxyjg9rMregRYdBC32g9Ewo+lyhON1kyvU4b2Ur0U XlT1BQHMgiPUE1l2Nj0UACdeXxVKRJYUyGwgEiC5qz1NM7kVaHzmxzpvJzM64K62Hh FQpqanHBtWSEsHGmxg9eGfOMhk6UR8NJ5Wea11B/E/c7VvV1YdyhXgy27jGGP5FmkE LLgdeI+Jzwy/MbBrSLkILO0GNdmIxu86R4FKdvZS+AUc0E9BO0ZBoB6aO8w81h0Yed 9I4i3H3Ty87Eg== Date: Wed, 12 Apr 2023 15:37:04 +0530 From: Vinod Koul To: Bard Liao Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, pierre-louis.bossart@linux.intel.com, bard.liao@intel.com Subject: Re: [PATCH] soundwire: intel_auxdevice: improve pm_prepare step Message-ID: References: <20230323025228.1537107-1-yung-chuan.liao@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230323025228.1537107-1-yung-chuan.liao@linux.intel.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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 23-03-23, 10:52, Bard Liao wrote: > From: Pierre-Louis Bossart > > In the case where multiple peripherals are attached on the same link, > it's possible that they are in different pm_runtime states. > > The device_for_each_child() loop to resume all devices before a system > suspend would not work if one peripheral was active and others > suspended. pm_runtime_resume() returns 1 in the former case, which is > taken as a error. As a result, a pm_runtime suspended device might be > skipped if the first device was active. > > This patch changes the behavior of the helper function to only return > zero or a negative error. A Fixes tag is not provided since there are > no existing configurations on Intel platforms with different types of > devices on the same link. Amplifiers may be used on the same link, but > they are used by the same dailink so their pm_runtime state is always > matching. This assumption may not be true in the future, so we should > improve the behavior and align with AMD. Applied, thanks -- ~Vinod