Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1601514rdh; Mon, 25 Sep 2023 19:24:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGJhuWCYjbPuiB7sdGiTNPnWxV06evktnp3DJGhNO4BzRAqDYPyQB8bfh9HUJTikOEfASAR X-Received: by 2002:a25:b195:0:b0:d72:a54d:4b7 with SMTP id h21-20020a25b195000000b00d72a54d04b7mr7274787ybj.1.1695695092906; Mon, 25 Sep 2023 19:24:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695695092; cv=none; d=google.com; s=arc-20160816; b=sOmN3Lgne4akQEHu5mCQ+LrkS8tpZzAnQhj9lyWfDtEkCe4oupEcViOf8iZqG9/2or 78S41nHLW/JobP/DBhZtuHVY67Zsp2sy+iwz+5RVHow23isoG4RFx3JKS/1tsQLb/+T2 sfy1j63Y1KHrxwWpgEofK8BmfPFPB+sVMlcTL1miOLLmIYpbE80zLyqmhMkPBgHwSQiQ Ej5VJG2rgpqbR/FDdAe8M42zrh9dOSZlMMRpmpSKESf/ajdgyWBM6Xb3597xXmOtBu9X 86MegvSv37rS/rtLh9VYtDC7mDDZY8c54w+vSnL8n8L8rDvzljgzv+I0h1lxo8u+NzCV bxkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=v69V2ENFt1TssTyCbqe5C845eqJTGhyOD8iB4ntYSb0=; fh=0iKC8n1xKtkvw+5RDzSud32j7h9ilf6Mvh4d+L1hSv0=; b=VlZA1v7ZBn+6tQCwB9nD4nn3oiO375f1ARb/MmULidAycCcAA5FRg/qqLjDmSFyvGA TQ6GV63YwSUwkzRtbEQoO3gVwl/htNOvCRcQ7JrY3IrLz18e59l0z0weL61sbAa873Fa h/Ve4a9GbMmyd2VcqZ7S48xUSb7PJj+FC/c6pVbwrO5FbJtHDHBh+PmOBhDDLHnHVaKW UWTV0Nqwe/khx3mNeDQ/LR1y6+BI38q/3JAbTVYtcBUfWb99M5po2Danmyx1xeN0qysU iNYU151IADeMkRM2s7HHJVvlLW0vJFQkU2GppxufRop0cdG5ReQ0U7sWRXEVdhfuniUV t3Kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ss0xJAl4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id m1-20020a656a01000000b00578b4082453si12444186pgu.712.2023.09.25.19.24.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 19:24:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ss0xJAl4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id C5AD7824E7BC; Mon, 25 Sep 2023 06:18:37 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231803AbjIYNSc (ORCPT + 99 others); Mon, 25 Sep 2023 09:18:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231826AbjIYNSN (ORCPT ); Mon, 25 Sep 2023 09:18:13 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B9E4112 for ; Mon, 25 Sep 2023 06:18:06 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-5042f391153so7479381e87.1 for ; Mon, 25 Sep 2023 06:18:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1695647885; x=1696252685; darn=vger.kernel.org; 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=v69V2ENFt1TssTyCbqe5C845eqJTGhyOD8iB4ntYSb0=; b=ss0xJAl4b3Luv/aaJzHuxFsK8UHwGzcZkvd9g+W7GHGFk2pdzRaZOcqYINxN1ggUBm TfpYLwki/36KbBZjNddluHvRiQx4HqWf9Y2ov8cJcju7UXgvn5J/HV5U0lP2KecSfhKl CIOVMu4v+Flxkat7a+P1af2TK1ctcdTvsnFIJsc7dOytfPqX46MkYXLz+SFTlDXuLbZC UZYtOMTAmRMO4WcipOJz/X177OJYN607BNOYaOye8wMj9QK9aXYtVTjaTEG2PVWoISsM fPy79CEsa5H1kC2edSSjs63IwSAXTftRTKQFwdZtqoVEKp/WpeuPKXNdh0jjx8nQtf0Q snpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695647885; x=1696252685; 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=v69V2ENFt1TssTyCbqe5C845eqJTGhyOD8iB4ntYSb0=; b=ZjfCP7TQj8yqxvaRbAdV2ddxBR1dUC30bQa88XqjhrsG23F9794FtmJsrIYZuiCIUb YZwlAkVY/h2XKb9hn+i9fQhquTqaZVK9gTE6W5PgCHy1Nf6enEAaGBzD3JEzbcBwgKoo UL4z4J9e296IIXQda6DuoAaK7Vp1JNeoTUcuacpvU583oa/MVViQmm60PxKJMp5Mo+cZ s8qFv7wsRHqU3AOOD4r/IF1wHXgTH9v33TNyxCspAwPcMrDAcrTKLm7/+y02x5O4uKkv GSYoAywrSdAAz93ceM8JZ/yLMKIxQSMkdT/mPO4GhyuZ3AYTQjQ5tJ/bePlOCjTsHnTR a5tg== X-Gm-Message-State: AOJu0YxnfwxTU5l3vz2TwQy0U5TodD+LQ2EByOReOwlUtSew6S4G7r12 vnryELviZrvXpuu61sfOQAFWbw== X-Received: by 2002:ac2:4e06:0:b0:502:e235:20c7 with SMTP id e6-20020ac24e06000000b00502e23520c7mr3144823lfr.20.1695647884853; Mon, 25 Sep 2023 06:18:04 -0700 (PDT) Received: from uffe-tuxpro14.. (h-94-254-63-18.NA.cust.bahnhof.se. [94.254.63.18]) by smtp.gmail.com with ESMTPSA id m29-20020a056512015d00b004fe10276bbfsm1823583lfo.296.2023.09.25.06.18.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 06:18:04 -0700 (PDT) From: Ulf Hansson To: Sudeep Holla , Cristian Marussi , Viresh Kumar , "Rafael J . Wysocki" Cc: Nishanth Menon , Stephen Boyd , Nikunj Kela , Prasad Sodagudi , Alexandre Torgue , Ulf Hansson , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 8/9] firmware: arm_scmi: Specify the performance level when adding an OPP Date: Mon, 25 Sep 2023 15:17:14 +0200 Message-Id: <20230925131715.138411-9-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230925131715.138411-1-ulf.hansson@linaro.org> References: <20230925131715.138411-1-ulf.hansson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 25 Sep 2023 06:18:38 -0700 (PDT) To enable the performance level to be used for OPPs, let's convert into using the dev_pm_opp_add_dynamic() API when creating them. This will be particularly useful for the SCMI performance domain, as shown through subsequent changes. Signed-off-by: Ulf Hansson --- drivers/firmware/arm_scmi/perf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c index 733c5ebeb555..c6a1332164c1 100644 --- a/drivers/firmware/arm_scmi/perf.c +++ b/drivers/firmware/arm_scmi/perf.c @@ -787,6 +787,7 @@ static int scmi_dvfs_device_opps_add(const struct scmi_protocol_handle *ph, { int idx, ret; unsigned long freq; + struct dev_pm_opp_data data = {}; struct perf_dom_info *dom; dom = scmi_perf_domain_lookup(ph, domain); @@ -799,7 +800,10 @@ static int scmi_dvfs_device_opps_add(const struct scmi_protocol_handle *ph, else freq = dom->opp[idx].indicative_freq * 1000; - ret = dev_pm_opp_add(dev, freq, 0); + data.level = dom->opp[idx].perf; + data.freq = freq; + + ret = dev_pm_opp_add_dynamic(dev, &data); if (ret) { dev_warn(dev, "failed to add opp %luHz\n", freq); dev_pm_opp_remove_all_dynamic(dev); -- 2.34.1