Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp972028pxb; Fri, 22 Apr 2022 15:40:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmabYBV7Iejz9ehhxQnkcNwbU3nCW1AhU9Cu6pz0HjP/6x+U8pUmeYU5AQDXBJ1o1jeLUF X-Received: by 2002:a17:90b:70a:b0:1d8:5662:6de0 with SMTP id s10-20020a17090b070a00b001d856626de0mr5084228pjz.212.1650667232550; Fri, 22 Apr 2022 15:40:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650667232; cv=none; d=google.com; s=arc-20160816; b=eZOzensWCxp9f4uHat9hfJbBkc3Luk0yUNQw7BYDmREerevtWM5GnWMAnuksGEANNI oQ8ccg3okLZXyNG5Ybmh+fDDo07QVrsHKlOBUOEKthQoaN1KQAD/555zto81Rwkc/vDV /abkaXskvmH3/pjUF6anztHdDm8I1tVKXEb2lQxJiwhyFpYs2+0e45XjT0YKkuO7eO29 SAMWvKpuc2xvLPvOS3YnBvnEcZA2P2gfkz+eCZxSdNmA9JctGVTWUHhJvFSrQpHLLfTJ ptCF6/O17Sh9UpqEMdJalCEZTmr5zrm05bz+SX0pPVKCzHbSxbxO+ieQTkM4ppx1zzbg c6JA== 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=NDjZ0N0gN1TiooXdwyqoVEQ1zgLyc3H7m+B0hRI51Fc=; b=Y0k5I/CdXtMd+lxpAUB9FngSag93mGiZXkQkI+r+4KEMJdwttxaH4ukl3h9uKUaH45 prwqyktDfHDWBMWLUZchTCdZn/sOYeLbq2kB7b31O+t89dU6QiOscKQOCD5ZoXN66kHd OumhsoLWTTlQLzNPa7r2Dm1Qt90f2AzIQ6FXlEA5QoyBXee7vanW+lAPJ+c9nmN42FFU ZorhnisBAbloC8RiDHm2BIauWQEhWnG/wJeUpOZ+sN74looBiS1G7RPR+cDr0LEB/xjh PYt7aqfN+EsvlhPVHq67FXOz2gDr+W+5nnHm4Vh9q4zbpxVeJS7CSur8z2ehd6Q0yhTl R7lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="k/40XO9t"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id g8-20020a63b148000000b003a85cf1e1edsi9919227pgp.305.2022.04.22.15.40.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 15:40:32 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="k/40XO9t"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 27FAB3CDE27; Fri, 22 Apr 2022 13:28:21 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344758AbiDTSCv (ORCPT + 99 others); Wed, 20 Apr 2022 14:02:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381404AbiDTSCg (ORCPT ); Wed, 20 Apr 2022 14:02:36 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E5A64706C; Wed, 20 Apr 2022 10:59:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650477587; x=1682013587; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=N62cvOlKD0daSm/0St1yA0uiCTqXXL1RTNMqabzw2jQ=; b=k/40XO9tt96f7ahN59xMssjmm2KXnzw6wRsYQg9+v0JtamaBSOFYTrw3 oXYhrEGp+4ePb4bvagRYOdZnr8UOer0Rc+4atKc3nMCoGJc9m1uvVyuFR fBQDB0c8tIHM/Gg3uCW7bLfQtiUAEzFHIp6dfOlqduTKEsRFLLLjdI+oE GfIbhUFzZsOQU1NfsRzjToASmUgWkFii36UFQ5E7FcNjEFPmSsLdnRxXQ eilRDHIWZPUSQWBiIbSLeNlwpJn+v0DxmvdR+8Sn94r6V55g2MPpppVel N5sagRZo706dJz3g+hDM4Jy8C2ZHqq6WA7rNNdkhPSGGP1+BRpJ+b5pKg A==; X-IronPort-AV: E=McAfee;i="6400,9594,10323"; a="327013172" X-IronPort-AV: E=Sophos;i="5.90,276,1643702400"; d="scan'208";a="327013172" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2022 10:59:46 -0700 X-IronPort-AV: E=Sophos;i="5.90,276,1643702400"; d="scan'208";a="576721817" Received: from sbidasar-mobl.amr.corp.intel.com (HELO [10.209.100.171]) ([10.209.100.171]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2022 10:59:45 -0700 Message-ID: <80503ba6-5a84-9481-11fc-6f0c4303331b@linux.intel.com> Date: Wed, 20 Apr 2022 12:53:10 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.5.0 Subject: Re: [PATCH v3 1/3] soundwire: qcom: add runtime pm support Content-Language: en-US To: Srinivas Kandagatla , robh+dt@kernel.org, vkoul@kernel.org, yung-chuan.liao@linux.intel.com, Mark Brown Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, quic_srivasam@quicinc.com References: <20220228172528.3489-1-srinivas.kandagatla@linaro.org> <20220228172528.3489-2-srinivas.kandagatla@linaro.org> <10eb3973-03c4-74cd-d28a-014fc280cdf8@linux.intel.com> From: Pierre-Louis Bossart In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE autolearn=unavailable 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 >>> @@ -1197,12 +1224,23 @@ static int qcom_swrm_get_port_config(struct qcom_swrm_ctrl *ctrl) >>>   static int swrm_reg_show(struct seq_file *s_file, void *data) >>>   { >>>       struct qcom_swrm_ctrl *swrm = s_file->private; >>> -    int reg, reg_val; >>> +    int reg, reg_val, ret; >>> + >>> +    ret = pm_runtime_get_sync(swrm->dev); >>> +    if (ret < 0 && ret != -EACCES) { >>> +        dev_err_ratelimited(swrm->dev, >>> +                    "pm_runtime_get_sync failed in %s, ret %d\n", >>> +                    __func__, ret); >>> +        pm_runtime_put_noidle(swrm->dev); >> ... here it's missing? >> >> I have a fix ready but thought I would check first if this was intentional > > Its not intentional. > > >> >> https://github.com/thesofproject/linux/pull/3602/commits/6353eec8dc971c5f0fda0166ae1777f71784ea32 > > Fix looks good. Thanks Srini, I'll add Fixes tags and share on alsa-devel. I guess we need to thank Mark Brown for his guidance to use pm_runtime_resume_and_get(), that's how I saw those two cases :-)