From patchwork Fri Jul 21 09:40:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 706019 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37F33EB64DC for ; Fri, 21 Jul 2023 09:41:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231421AbjGUJln (ORCPT ); Fri, 21 Jul 2023 05:41:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231233AbjGUJlb (ORCPT ); Fri, 21 Jul 2023 05:41:31 -0400 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 699F7358B for ; Fri, 21 Jul 2023 02:41:26 -0700 (PDT) Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1b8ad356f03so11067605ad.1 for ; Fri, 21 Jul 2023 02:41:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689932486; x=1690537286; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ecCZasV/2WenVXDyoE4/W5g65II48G/OFEkNC6yHhK4=; b=xPO2cIrcSsEOWHLbJo/1rP2vhKK+JOYOe3Q0ys29Ek26FtDXZUte1VyFagly6pU1c6 WF0Hc8txjsBW6htA1P6/B3Et9sMJqeMDGtZ9QlhYOAW0k5v/ljmqZ3LlmkBTWsvzLqrc By+JpiGtwqO1BB5Ib/lZKA+iK5vc4vKQps36kqmDyRgmkDM7XVZPlmaHMp4SPBq1vZW9 Ohb/l6AIAQFKjXnSbvcvURLoxKgJJ+vfLtKgnhaxCdFrto/AE8sa0cyu8e0p4uqH3MCP PVOKtMgMkP+mweNRC45npmdd3bl6UkU9I1NWOWNYhrP69yPOZi6RTk00uJW2nAJQTAmH Mivg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689932486; x=1690537286; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ecCZasV/2WenVXDyoE4/W5g65II48G/OFEkNC6yHhK4=; b=QVl+NisxvAFrm+5wAT30Jtw4VRx0DVSR4F4QWtSHdUt+Fxy3D9K7lC8XxvjDkOhxcG xeCeVI/GwHE/BQ2q3Z6UbEsNprDFr70+WR1w1Z7qIYR4ihbW5O1B7wi4qC5czwcvpBMh yU1sbC1Slj1RzCt+xWxZQoL9HUwPWE+Myr6utEaYPOu7p7uxm4qcXlP54qgBPtUkvxlH 5twaxIHDUT2ZML32YKPRxh30vn38dMp0VXY9vIq8dfMcjgSJI/Qcmxhxe+gBqQOA7jM/ QPWPaQx+c5HV1UdEwh2bg9KyoGHKI46efIj/+K3gcqGteIv57M5y6t06NbsVgogDogfr jv3Q== X-Gm-Message-State: ABy/qLYOB5+UIorWzEfQbAceo+CAk8cT4iwjWaUSBdakY8t1dCNR1Ayy KBQw+OOq44IKNRIsMbfrCxUrWQ== X-Google-Smtp-Source: APBJJlHSnvCG5tuyWxpXiUQIgWDsCPS3Y8Nd+m2OqCv6WoSuswjTFEEEnMT3ddbdlQ3vTCzoObeAEw== X-Received: by 2002:a17:902:ba88:b0:1b8:944a:a932 with SMTP id k8-20020a170902ba8800b001b8944aa932mr1144713pls.2.1689932485880; Fri, 21 Jul 2023 02:41:25 -0700 (PDT) Received: from localhost ([122.172.87.195]) by smtp.gmail.com with ESMTPSA id jg5-20020a17090326c500b001b9fdeead86sm2989244plb.68.2023.07.21.02.41.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jul 2023 02:41:25 -0700 (PDT) From: Viresh Kumar To: Viresh Kumar , Nishanth Menon , Stephen Boyd Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , "Rafael J. Wysocki" , Manivannan Sadhasivam , linux-kernel@vger.kernel.org Subject: [PATCH 5/6] OPP: Update _read_freq() to return the correct frequency Date: Fri, 21 Jul 2023 15:10:58 +0530 Message-Id: <13c3657578d0c054cfcfe4496dde560b6a816e3b.1689932341.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Now that we support finding indexed frequencies, lets update _read_freq() to return the right one. Signed-off-by: Viresh Kumar --- drivers/opp/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/opp/core.c b/drivers/opp/core.c index 7b1d5724b3d8..95f49fbe431c 100644 --- a/drivers/opp/core.c +++ b/drivers/opp/core.c @@ -472,7 +472,7 @@ EXPORT_SYMBOL_GPL(dev_pm_opp_get_opp_count); /* Helpers to read keys */ static unsigned long _read_freq(struct dev_pm_opp *opp, int index) { - return opp->rates[0]; + return opp->rates[index]; } static unsigned long _read_level(struct dev_pm_opp *opp, int index)