Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp2105751pxb; Sat, 19 Feb 2022 02:21:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJwfe/h+Z1PIoKqOzZJMgM0nmuii2gg2R0g/FlcVwOWhLydRmryiCi2efhTVZHwabGW4HnFF X-Received: by 2002:a17:907:2954:b0:6cf:7634:c6b7 with SMTP id et20-20020a170907295400b006cf7634c6b7mr9317084ejc.683.1645266114285; Sat, 19 Feb 2022 02:21:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645266114; cv=none; d=google.com; s=arc-20160816; b=vn01wHEslJG07No5yto86Q5ptEP0ekp3ywB7mXiHHaSDNyMEIv/xizQK7NSWvAyISt o35c+pah1UCxeMCca3jT3wTGkdK83LR7DDA4k+I4uAl+96EXJc/OoLhk1HyHpHEdTTzE GevWNLzjWEkxWKRJuIuS4UjGHzMvXvButo+6Jm5j4vngBMC0J4jpqayGrB/rUlXIV/IC b66pR7j6Ta+g36XN/3rj+IgZTZuTxWgXGsy7A9vqu+/o7dbJTy5z4zfcMfjFjwgVBzjz vGAVIMNvzQczdq4XA8uWY4QmJYuMZexh8VTosCk3GuqfjFR//ioH9zbDLmQrPP4HYwoK XUUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:user-agent:from:references:in-reply-to:mime-version :dkim-signature; bh=DQm3dzVCY1FyK1nVTRS3Y8VEmZfIVCq9w/XynD1Yj4Q=; b=0z/eWovhDiU/c5GLn/ck/VEAB8ZdAVpLz7xRmqG2VhVypjzKJ0qCRO+2LcDnoWujoz Fu3J9AmmdRKBppmml+SxQOM9R00bdhXimpQCG8sVzUQazfLjZAiqtRvad7y4KMfmo/ln 35t4+U4lk/6shxoGLYKovZPoMOzBYZcRIUOX8meUpwtHTyMh4TQaVQN08mAsBje+8Yx5 CpqshzLnmdVQYSa1CFlp0ADZ5O9fbPkOSvaHBmO5K1BuVyI9H+C+NxV0SX1XB7DESSuZ 4PFGkTYgelo02jmfrWsbbZrksKeMNs+Y2bviK1MCpOwqD7pREXvm89BXN6kcKesm8yAU kGDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=PhWFIs+R; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c10si7679052edj.97.2022.02.19.02.21.30; Sat, 19 Feb 2022 02:21:54 -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=@chromium.org header.s=google header.b=PhWFIs+R; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241183AbiBSCq4 (ORCPT + 99 others); Fri, 18 Feb 2022 21:46:56 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:47722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241162AbiBSCqy (ORCPT ); Fri, 18 Feb 2022 21:46:54 -0500 Received: from mail-oo1-xc2d.google.com (mail-oo1-xc2d.google.com [IPv6:2607:f8b0:4864:20::c2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A89B110D8 for ; Fri, 18 Feb 2022 18:46:36 -0800 (PST) Received: by mail-oo1-xc2d.google.com with SMTP id r41-20020a4a966c000000b0031bf85a4124so5910552ooi.0 for ; Fri, 18 Feb 2022 18:46:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:in-reply-to:references:from:user-agent:date:message-id :subject:to:cc:content-transfer-encoding; bh=DQm3dzVCY1FyK1nVTRS3Y8VEmZfIVCq9w/XynD1Yj4Q=; b=PhWFIs+RJpcr112/Fdp4ospixnQKGstbiHUuquknUgzAbkRicCb5xc6wiV/c0B23wO su1uhMIWVBnzciMlN37pXRteUNFruOlD8eWek/kU2o3rK3aND6Rli4kf0nZ0yoYzcezL 3fsYiVrV+KODKAj59h3YVuNk6nO0Egvk657TE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:in-reply-to:references:from :user-agent:date:message-id:subject:to:cc:content-transfer-encoding; bh=DQm3dzVCY1FyK1nVTRS3Y8VEmZfIVCq9w/XynD1Yj4Q=; b=8NZFxtDnRcVa2p38vkkczv32eIbd81kExGy59+Ci34zhnSuMw9z+7+jfXvbWwb+uPB XPgMwD6Zqz1A8fIXED/VhOu7edAp0el5F5Uvjq5FJLYZhUKG1Ow2bdV8FfyZEI886oFa aAKPJ+46BIqsl3BmTqC4YOzARkvBMYahZ5JL9A9kIu/0hKTejD4yAllKzRJsb85HZYnK Z2crk32MOUjtyG4kaxA2L3J2r0tkPDHceJUH73I3GZCHv1SR26UxvLL5S4iLm2KzbNiV KkWShn6Q7d3cpuGc2UTHAGr56BDWsUSYuZPEQ9R0Ry/Iaj06zTLbK6m+Ki69esaHtGF0 j3JQ== X-Gm-Message-State: AOAM531Gamaj/5RLz75KH9zhejk8i14m5l5uc0Xjj3/3VSa0kpAVrAPt UVk6fFCwokg9w+FqXrssP6g7oKDD8wsKORJ/OKV1Lw== X-Received: by 2002:a05:6870:5829:b0:c8:9f42:f919 with SMTP id r41-20020a056870582900b000c89f42f919mr4194397oap.54.1645238796075; Fri, 18 Feb 2022 18:46:36 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 18 Feb 2022 18:46:35 -0800 MIME-Version: 1.0 In-Reply-To: <09b00fe9-1770-1723-3c4c-6c494da87e8d@linaro.org> References: <1644851994-22732-1-git-send-email-quic_srivasam@quicinc.com> <1644851994-22732-8-git-send-email-quic_srivasam@quicinc.com> <09b00fe9-1770-1723-3c4c-6c494da87e8d@linaro.org> From: Stephen Boyd User-Agent: alot/0.10 Date: Fri, 18 Feb 2022 18:46:35 -0800 Message-ID: Subject: Re: [PATCH v6 7/7] pinctrl: qcom: Update clock voting as optional To: Linus Walleij , Srinivas Kandagatla , Srinivasa Rao Mandadapu , agross@kernel.org, alsa-devel@alsa-project.org, bgoswami@codeaurora.org, bjorn.andersson@linaro.org, broonie@kernel.org, devicetree@vger.kernel.org, judyhsiao@chromium.org, lgirdwood@gmail.com, linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, perex@perex.cz, quic_plai@quicinc.com, robh+dt@kernel.org, rohitkr@codeaurora.org, tiwai@suse.com Cc: Venkata Prasad Potturu Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,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 Quoting Srinivas Kandagatla (2022-02-16 07:38:02) > > > On 16/02/2022 14:41, Srinivasa Rao Mandadapu wrote: > > > > On 2/16/2022 7:50 PM, Srinivas Kandagatla wrote: > > Thanks for Your Time Srini!!! > >> > >> On 14/02/2022 15:19, Srinivasa Rao Mandadapu wrote: > >>> diff --git a/drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c > >>> b/drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c > >>> index 5bf30d97..4277e31 100644 > >>> --- a/drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c > >>> +++ b/drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c > >>> @@ -143,6 +143,7 @@ static const struct lpi_pinctrl_variant_data > >>> sc7280_lpi_data =3D { > >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 .ngroups =3D ARRAY_SIZE(sc7280_groups)= , > >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 .functions =3D sc7280_functions, > >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 .nfunctions =3D ARRAY_SIZE(sc7280_func= tions), > >>> +=C2=A0=C2=A0=C2=A0 .is_clk_optional =3D 1, > >> > >> This is forcefully set assuming that sc7280 is always used in ADSP > >> bypass mode. Which is not correct. > >> > >> Can't you use devm_clk_bulk_get_optional instead? > > > > Yes. Agreed. Initially used devm_clk_bulk_get_optional, but Bjorn > > suggested for conditional check instead of optional. > > > > Again Shall we go for optional clock voting? > > That means that the condition has to be dynamic based on the platform > using DSP or not. Which is impossible to deduce without some help from DT= . > > I would prefer to stay with optional clock unless Bjorn has some strong > objection on not using int. I think we need the combination of optional API and bool flag. My understanding is it's optional on sc7280, but not on the previous revision, so we want to be very strict on previous revision and less strict on sc7280. Hence the flag. Maybe we should change it to clk_required and then assume optional going forward. Then the callsite can use one or the other API?