Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5758977ioo; Wed, 1 Jun 2022 11:59:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyODxCs3p11KQtXufkYyu88wsjd0ogkPKGNfvvyfjocGqpK7aRY9rDDhsbI6MbLl8a5YsZ/ X-Received: by 2002:a17:90b:17d2:b0:1e2:c0a2:80fb with SMTP id me18-20020a17090b17d200b001e2c0a280fbmr23996715pjb.67.1654109962895; Wed, 01 Jun 2022 11:59:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654109962; cv=none; d=google.com; s=arc-20160816; b=ReAqkpfNGy6WSzfp3vntxAkH78461Vyw/rgVjU8OUsmSWMjX5t8WezI20aO9X6LwEV OoGKBmiLz0QkDXC/TpCuSABBujI8z/xPhal7CUpWYPPF3vNlK/kT1WbLr+WjCJcH7E/2 12tFsICeNC55IlN7nC27TCSaJRugy6Dy6+gYeD5s9F8YecP1lMSIUPC31pBRUvvkqL7C 3c8gZ21zIjDOrFDQV/3itm5/HGh/KXyWceJmNyO7Hmk42HHWRlHRPXvhsgx0LjeRYiMs D+KMmWiznbEaExxgLNI/1F/dqyq3rE4t2PkHf08M14X+nOTubITRhXhlMFxqy+wJYG7m ZaEQ== 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 :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=S9uisrdptfIPDkvI5rpbWpdm1zkgyzUYHlOlidzA01w=; b=NN7PtznQo7bpabqt3BZR1/m//pd52QkGPEwaqYLrV3pWxPyNRdqMp2it0EQWNp43iK QOTVwNo+v/LOHE7vor1a8TCf0tlE7STc+R7vAZCa2T1SiIGiYcTxH8rNmFfObMICAlpM PWQH6L1Qe1ME0KxNgp8AE86RShjaxB9i0s5DIUKzIfkJYqSutyYhm15TBHGskN7J2CvI W5CLT8/yYia7Cu66c/hu2l4bpnmNtbw35PtjLfRT4fJO9JtxZXBV0N3dIB+T8u1y8wqC ghCe4UJej1yafRU9hv2zkfuPMOZM0MiF3+5tF1G9TjA/+8lFloX783UllzfRnYC06Dgw UK8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=vCLEhHpE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id f9-20020a17090274c900b00163e2b5e3fbsi2944397plt.145.2022.06.01.11.59.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 11:59:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=vCLEhHpE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E49B3ED790; Wed, 1 Jun 2022 11:45:50 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352953AbiFAM5c (ORCPT + 99 others); Wed, 1 Jun 2022 08:57:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232460AbiFAM5a (ORCPT ); Wed, 1 Jun 2022 08:57:30 -0400 Received: from alexa-out-sd-01.qualcomm.com (alexa-out-sd-01.qualcomm.com [199.106.114.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A63FEE0B8; Wed, 1 Jun 2022 05:57:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1654088249; x=1685624249; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=S9uisrdptfIPDkvI5rpbWpdm1zkgyzUYHlOlidzA01w=; b=vCLEhHpEWTCg/uNCZRW2n+Im5a0bFQhSsli6qKaj5+E0nXMFE2C68iZM wVUjNiioJz1tFFX3vEnvNdTOGe3KAQUT4ei7/dhsa+HZkG3YjhnVfN9Iy UphVGfuM/ZL9z3VlRh7ydi18EtV0nVMCNMQHZXpZkh7NZM+OYiLpVGNbe Q=; Received: from unknown (HELO ironmsg05-sd.qualcomm.com) ([10.53.140.145]) by alexa-out-sd-01.qualcomm.com with ESMTP; 01 Jun 2022 05:57:28 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg05-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jun 2022 05:57:28 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Wed, 1 Jun 2022 05:57:28 -0700 Received: from [10.216.6.145] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Wed, 1 Jun 2022 05:57:22 -0700 Message-ID: <7c74868d-624b-c18e-b377-026e70813fcc@quicinc.com> Date: Wed, 1 Jun 2022 18:27:18 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH v2] ASoC: qcom: soundwire: Add support for controlling audio CGCR from HLOS Content-Language: en-US To: Matthias Kaehlcke CC: Stephen Boyd , , , , , , , , , , , , , , , , , References: <1652877755-25120-1-git-send-email-quic_srivasam@quicinc.com> <51b8aca1-e038-4907-e973-ebdbebaf9b28@quicinc.com> From: Srinivasa Rao Mandadapu Organization: Qualcomm In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE 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 On 6/1/2022 4:02 AM, Matthias Kaehlcke wrote: Thanks for Your Time Matthias!!! > On Tue, May 24, 2022 at 04:19:47PM +0530, Srinivasa Rao Mandadapu wrote: >> On 5/21/2022 8:43 AM, Stephen Boyd wrote: >> Thanks for your time Stephen!!! >>> Quoting Srinivasa Rao Mandadapu (2022-05-18 05:42:35) >>>> diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c >>>> index da1ad7e..445e481 100644 >>>> --- a/drivers/soundwire/qcom.c >>>> +++ b/drivers/soundwire/qcom.c >>>> @@ -1333,6 +1337,10 @@ static int qcom_swrm_probe(struct platform_device *pdev) >>>> ctrl->bus.compute_params = &qcom_swrm_compute_params; >>>> ctrl->bus.clk_stop_timeout = 300; >>>> >>>> + ctrl->audio_cgcr = devm_reset_control_get_exclusive(dev, "swr_audio_cgcr"); >>>> + if (IS_ERR(ctrl->audio_cgcr)) >>>> + dev_err(dev, "Failed to get audio_cgcr reset required for soundwire-v1.6.0\n"); >>> Why is there no return on error here? Is the reset optional? >> Yes it's optional. For older platforms this is not required. > If it's optional then either there should be no error message, or the > error message should only be logged when the version is >= 1.6.0. There > are few things worse than a kernel log riddled with misleading error > messages. In that case, it can be done like below. Kindly let me know your opinion on this. if (ctrl->version >= 0x01060000) {     ctrl->audio_cgcr = devm_reset_control_get_exclusive(dev, "swr_audio_cgcr");         if (IS_ERR(ctrl->audio_cgcr)) {             dev_err(dev, "Failed to get audio_cgcr reset required for soundwire-v1.6.0\n");             ret = PTR_ERR(ctrl->audio_cgcr);             goto err_clk;         }     }