Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp91487iob; Tue, 17 May 2022 19:50:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWHcmAuPcDaZiKxkynF23O76j3LJ7IhZc2iiUy2VK3XaXKlIJhFYO++rdVDjr5Kvnid3xG X-Received: by 2002:a17:907:1c21:b0:6f4:7a8a:d6a2 with SMTP id nc33-20020a1709071c2100b006f47a8ad6a2mr22357126ejc.288.1652842203856; Tue, 17 May 2022 19:50:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652842203; cv=none; d=google.com; s=arc-20160816; b=MKYEofvjXzmLpkEmUtgdtCuYiPZ5N5Uin4W+QiF1GuNWRXckNt6h7T4ZPas+dB3Zaz Ra6zAeYSynYUMvDKTHsGnAJnwL/Ocv5BGeMPKK/pR5LzV3PbztygIvP5it6rBR0pQBcL KJlTSbnb2G+zUIegt8vwNpcyo0xTlE9Z8k7s5KdxEi922nj9Q+n3VnPz1sTjhb9mUUMg jlmze1S+a76nfks5EHV3HuoRPzN1TWj//J1ZMkJdGGWOYQ/DNorWgveRAVdYzU2adLc9 X6bJgncuVEs066ccQXjTwHadfGNqpDt/q2ILFnOqHIDdm6euz81yTFGxImk0CZPWPtlv bVuw== 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=SQNeGam941FyeYXfP6H024jLtY0W9iMsQ2X/6H/zyv4=; b=PAVLGrG1yBt9ZTW1vjLGuHMSYBQFlh1WEN6IpeS0qXCqGp5Tk17FLnvRNxVBQECwab bKvQvOWMvCYOosH6QSpyMe6n9pcdvLaxeABaoLBr5HKpMjtZbaaMA0ASD5kdAwHYVZwy qbopiCB2dqyXFKCEJcH4H5qGaxQCVOH5rdacgsIWEBGV/9SmuzUfhzeOrnljm1PpOKqv 90tIaXHQ9SFs11sAHKOu1VLZnUkLqwTSyJggJXi6GgDfhgfH/VI7taEp19wnYbsG80Mo 52RFuKiL2b7BSyE9VG+ilDE5PnG/4D19SnG3ZUU4sE3TKC1kZZLw1Y95XGHIl7MivhKS jNxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TZ6691FI; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m6-20020a056402510600b0042aa707181dsi1187968edd.561.2022.05.17.19.49.38; Tue, 17 May 2022 19:50:03 -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=@linaro.org header.s=google header.b=TZ6691FI; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237038AbiEQTRC (ORCPT + 99 others); Tue, 17 May 2022 15:17:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352627AbiEQTRA (ORCPT ); Tue, 17 May 2022 15:17:00 -0400 Received: from mail-io1-xd35.google.com (mail-io1-xd35.google.com [IPv6:2607:f8b0:4864:20::d35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DDF4424A5 for ; Tue, 17 May 2022 12:16:58 -0700 (PDT) Received: by mail-io1-xd35.google.com with SMTP id h85so20327062iof.12 for ; Tue, 17 May 2022 12:16:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=SQNeGam941FyeYXfP6H024jLtY0W9iMsQ2X/6H/zyv4=; b=TZ6691FI6m5zA3ekA8MacmwwWfITp2KMzwxtkyn6VhHryu0URKRSf5U6hzk2o6YEzs /2z7/Otn9ulaWMuhAzXTxR9YQLB7sGStaoIgHG/5rejKgshJVheE98gvvAnAFiVWsm1r jWtVnpwuHWiSArCpL0HDfdMCUr8guYrHUS0d/3HqbBS7aM4I6dmvCAHkUf+Xc6oxk/cK 2ErurirVC4muZeOmN8osOwbn1KF2xWouBhrCi6JbYc5/Q0/zyx0wswU3HzICtJhx4Xld JvfgTJ/ZOd+w940g/OrO6lLGHVvsGk1UgtjWbY1QkFUYYqq4K5uvwaUv0ya5M2glAtJF t7bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=SQNeGam941FyeYXfP6H024jLtY0W9iMsQ2X/6H/zyv4=; b=HIeiEp73AwS6j6m1GsgvKgoo0S7a51kYxil5Bwmf+4se/ZppdRjbL0GOb0RHCj6UN7 +9ys92vglIA1bSwVUbB/4ajz7NSPpI+UIo5XOqU+5Zd70egndSfsOQh8/VxlIUztSoga Ajy+6wNSBAF+lP6iQ5qC/nS7X3BvrDcCSH02nrmVjP7OXhubt4KCyeawVmqcRiTMbtv9 S/qiIdwYLH3pd73P2eoMWFNrwhfDO2IYhv/MEnatQmo5NtY4Mk5J72oXvxqjmNevBD+S xZdn4ceJaVWOD1d87X+YtvcDSApFtRVckJEnDtaAEIQlWIr7q3w3PikZWImSc1ZyXuY1 uCeA== X-Gm-Message-State: AOAM533RpRhJU0HJs7CYqr4M4cS5Ano05KcSsbhCgt3A+2e1nReQLYyy NvyRsw3Nb2PReEN/TaAvLYILsQ== X-Received: by 2002:a05:6638:48:b0:32e:4b7e:aec5 with SMTP id a8-20020a056638004800b0032e4b7eaec5mr4032636jap.186.1652815017720; Tue, 17 May 2022 12:16:57 -0700 (PDT) Received: from [172.22.22.4] (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.googlemail.com with ESMTPSA id u6-20020a056e02080600b002cde6e352c9sm39560ilm.19.2022.05.17.12.16.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 17 May 2022 12:16:57 -0700 (PDT) Message-ID: Date: Tue, 17 May 2022 14:16:55 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH] clk: qcom: rpmh: Add note about sleep/wake state for BCMs Content-Language: en-US To: Stephen Boyd , Michael Turquette , Stephen Boyd , Bjorn Andersson Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, patches@lists.linux.dev, linux-arm-msm@vger.kernel.org, Taniya Das References: <20220517190949.2922197-1-swboyd@chromium.org> From: Alex Elder In-Reply-To: <20220517190949.2922197-1-swboyd@chromium.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 5/17/22 2:09 PM, Stephen Boyd wrote: > The sleep/wake state doesn't need to be set here because of specific > RPMh behavior that carries over the active state when sleep/wake state > hasn't been modified. Add a note to the code so we aren't tempted to set > the sleep/wake states. > > Cc: Alex Elder > Cc: Taniya Das > Signed-off-by: Stephen Boyd Looks good to me. Thanks Stephen. Reviewed-by: Alex Elder > --- > > This superseedes a previous patch[1] I sent that tried to fix this. > > drivers/clk/qcom/clk-rpmh.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c > index aed907982344..c07cab6905cb 100644 > --- a/drivers/clk/qcom/clk-rpmh.c > +++ b/drivers/clk/qcom/clk-rpmh.c > @@ -274,6 +274,11 @@ static int clk_rpmh_bcm_send_cmd(struct clk_rpmh *c, bool enable) > cmd.addr = c->res_addr; > cmd.data = BCM_TCS_CMD(1, enable, 0, cmd_state); > > + /* > + * Send only an active only state request. RPMh continues to > + * use the active state when we're in sleep/wake state as long > + * as the sleep/wake state has never been set. > + */ > ret = clk_rpmh_send(c, RPMH_ACTIVE_ONLY_STATE, &cmd, enable); > if (ret) { > dev_err(c->dev, "set active state of %s failed: (%d)\n", > > base-commit: 42226c989789d8da4af1de0c31070c96726d990c