From patchwork Thu May 26 11:42:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 12862326 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DF14EC433EF for ; Thu, 26 May 2022 11:44:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OyivIOgCMRbiH4S4LPf353hL/bqkhFAgecjYDEzsR0c=; b=uLmeB9Wt7WT3Io lxCGPr+8WTO4C36Kn01ChppAY5KDfZhaUicFh8lLByA+AxYANloCoob0rQpF5N6QIQ21WTeiETriJ +vIlZosACOZ50b/NEuizbz7kdhyEJyzSnQV9eFEZi54d2By8W6af91PchK/sLWckS/W5yTm2yxJpL au+WTdlRXqyJeQHRA+dRgsqLaueTvUMLCS74SrQK4E7b1PPkwRv57dG9vNmO8AbYQbHwint/wRiTD krn6eUZOMvaD0h3PZEVzN7AEci3nQrMbMHfemhIujkqZiIMq4RewYNzFLR9lKNGRBcE0XibU+GAjK W2dV0H6ce0ECOZrfuH1g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nuBu2-00EgsB-Un; Thu, 26 May 2022 11:43:43 +0000 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nuBtz-00EgrM-FK for linux-arm-kernel@lists.infradead.org; Thu, 26 May 2022 11:43:40 +0000 Received: by mail-pj1-x102e.google.com with SMTP id gz24so1532298pjb.2 for ; Thu, 26 May 2022 04:43:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rm1D/w2QvTu4or6R4hVEWZEG7Ji+GbsLOWNM+13EdT0=; b=Fd6PbFwGgpst1ab5pqOOW4QTQNxMqsotRztlxhyBXRB9vSU8cR6l8K41Jbn967c9An MFLcQSGLMm7Mf/rirshMD4Sv+3ABPCSjnyZ4krYlhRhdAd5Dl1q4SJGjZ5qNaqRWihRA J9+lJtvhvQ0tBVhuUY6uoz/0PBzfEC2kioPqVDuMoYW2Z6WEawIjGAjeZJ6Y4UMAX7xj CRP/wK7D/TBdX68CnrinT62c0JI4dD8dZOHu33+1NBXljRLPA3AVTGkfToUUYDAN+Cg8 7HJrhThNKB0IqEON+9/H65bREo6Gg0wtQKOGiUfo/5mZbA0Uzsc54ww9Dcu8PborF3qP 7oGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rm1D/w2QvTu4or6R4hVEWZEG7Ji+GbsLOWNM+13EdT0=; b=ZvBNQbAzvrMQdHb6USukXrRAyKjDS1VWNEPeMZtTCxW8avOoG6D8P3Tb7B2d2Bh9az 1v8Kt5pPL8FJgnluiecXJpCOfMCNhlw59+D4qw6kIYUxq+0TpBuRKfoPRf9xBW3VqgYG tAVTZGknMrPuIkJG2LLD8IhUeJaIYxB7AMg8hNVV+68I5kxusDg5SmCE56W32vjy0AI4 aapcNHfNeDrg/OfHA52E4vLylvAM7V8E4on6mXiijlhvLc4PCfsngImzcBeNFjdQZIlX OOSspICx2xUcrf2/BoOft8ntMUCSko74eVK2LUDKfC/ykd4P0m4zYxRMI+P3gRn1AYNy qjcA== X-Gm-Message-State: AOAM531+24g6mtMvTYUHjJmKV9ttVslOM1hc0koHPk5G6+ODrz7aNv9J x7jrTtFYLSyX1EzKeWRVMHjfrg== X-Google-Smtp-Source: ABdhPJwL2+vUZJljvm15zkMsICuHtMSjWDz1W5QvpfO7supCE+5odduI8PvAbAnWZVnkOOf/YRXaHQ== X-Received: by 2002:a17:90a:8916:b0:1e0:9f07:6d39 with SMTP id u22-20020a17090a891600b001e09f076d39mr2200543pjn.163.1653565417763; Thu, 26 May 2022 04:43:37 -0700 (PDT) Received: from localhost ([122.162.234.2]) by smtp.gmail.com with ESMTPSA id o20-20020a63fb14000000b003ed6b3dc52esm1331741pgh.55.2022.05.26.04.43.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 May 2022 04:43:37 -0700 (PDT) From: Viresh Kumar To: "Rafael J. Wysocki" , Viresh Kumar , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Cc: linux-pm@vger.kernel.org, Vincent Guittot , Rafael Wysocki , Stephen Boyd , Nishanth Menon , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 04/31] cpufreq: imx: Migrate to dev_pm_opp_set_config() Date: Thu, 26 May 2022 17:12:03 +0530 Message-Id: <2d9e2996d9ca9da1561f50f58520c7f2ced53e0a.1653564321.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220526_044339_547468_5D57DCE4 X-CRM114-Status: GOOD ( 13.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The OPP core now provides a unified API for setting all configuration types, i.e. dev_pm_opp_set_config(). Lets start using it. Signed-off-by: Viresh Kumar --- drivers/cpufreq/imx-cpufreq-dt.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/imx-cpufreq-dt.c b/drivers/cpufreq/imx-cpufreq-dt.c index 3fe9125156b4..57917b0670f2 100644 --- a/drivers/cpufreq/imx-cpufreq-dt.c +++ b/drivers/cpufreq/imx-cpufreq-dt.c @@ -86,6 +86,10 @@ static int imx_cpufreq_dt_probe(struct platform_device *pdev) u32 cell_value, supported_hw[2]; int speed_grade, mkt_segment; int ret; + struct dev_pm_opp_config config = { + .supported_hw = supported_hw, + .supported_hw_count = ARRAY_SIZE(supported_hw), + }; cpu_dev = get_cpu_device(0); @@ -153,17 +157,17 @@ static int imx_cpufreq_dt_probe(struct platform_device *pdev) dev_info(&pdev->dev, "cpu speed grade %d mkt segment %d supported-hw %#x %#x\n", speed_grade, mkt_segment, supported_hw[0], supported_hw[1]); - cpufreq_opp_table = dev_pm_opp_set_supported_hw(cpu_dev, supported_hw, 2); + cpufreq_opp_table = dev_pm_opp_set_config(cpu_dev, &config); if (IS_ERR(cpufreq_opp_table)) { ret = PTR_ERR(cpufreq_opp_table); - dev_err(&pdev->dev, "Failed to set supported opp: %d\n", ret); + dev_err(&pdev->dev, "Failed to set Opp config: %d\n", ret); return ret; } cpufreq_dt_pdev = platform_device_register_data( &pdev->dev, "cpufreq-dt", -1, NULL, 0); if (IS_ERR(cpufreq_dt_pdev)) { - dev_pm_opp_put_supported_hw(cpufreq_opp_table); + dev_pm_opp_clear_config(cpufreq_opp_table); ret = PTR_ERR(cpufreq_dt_pdev); dev_err(&pdev->dev, "Failed to register cpufreq-dt: %d\n", ret); return ret; @@ -176,7 +180,7 @@ static int imx_cpufreq_dt_remove(struct platform_device *pdev) { platform_device_unregister(cpufreq_dt_pdev); if (!of_machine_is_compatible("fsl,imx7ulp")) - dev_pm_opp_put_supported_hw(cpufreq_opp_table); + dev_pm_opp_clear_config(cpufreq_opp_table); else clk_bulk_put(ARRAY_SIZE(imx7ulp_clks), imx7ulp_clks); From patchwork Thu May 26 11:42:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 12862327 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D0D2AC433EF for ; Thu, 26 May 2022 11:45:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/PQPRyJBLcL2JUw954LRYWXw22X//6YT0H3C5dpJC9I=; b=wASuZpYyDBYAR4 XTAAgP+0ZMMqUbRszmjkpqgzY4WbpgwNv9QazuiThxyBh7o8HQp6yyV1DilcSysIvzWKaPw2F6OtE bdO+i2t8WP5crnO2LfXBrbg2leh5mmmA3H5kGQ4C+sNtrO8kfjkDbTTUjeremG61uRnJ4JBuIqpus 7duf65qFduuf3ZOk4AUgAD1Gda/pJP+J3wEubzMQeFnblDCdAdZDC22YsaxQ7QKbBGh6bO71pPCIZ Kmh8dCgDKNEl10Y+cRD7ClUJjN1TsYkW//0JzGnKUfImQknxEXldQkqCIJCaAhWrQzUcHELv9999m o/11xaoJoaFRhik4MILw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nuBuD-00Egvf-Iy; Thu, 26 May 2022 11:43:53 +0000 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nuBu5-00Egsq-It for linux-arm-kernel@lists.infradead.org; Thu, 26 May 2022 11:43:47 +0000 Received: by mail-pl1-x62a.google.com with SMTP id s14so1217781plk.8 for ; Thu, 26 May 2022 04:43:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=q5eTD6wz1RXfj8aC8lU6FuYhpZBKLogZOeVce0BXIgM=; b=hyg3hFnQcPvN2g1w1Dk7J+XwKPQZFfUbC4t8cmaoD+p2EK9JJlbZowvdc5GDn2InTZ U/hmhwfU0LvuiYyE9robqo4jdwQQqInnjxW/Pl1wzI0O8uW2DwgSLzevQlopXFz5fDDQ RBQIZ9BWrpxnWvDDB6UO4Hu1VYTzO5OEyoI4iJEmWmlERXPuhRtdi+9kJFFKZ9NM/Dkf 8ua/vHhARhWTbkCkUyI66x1IC49r09iZw7/dTHhXSC6CKW282fnDITCiULd3xIY0vgsc vSiEWao+Zffi8wJQ/olvRqsXhWfsfPpTo3oNS1m8pjS0ILEDsUMoNYBT2Irwy/NprreE 2ctg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=q5eTD6wz1RXfj8aC8lU6FuYhpZBKLogZOeVce0BXIgM=; b=dZrcQq4R1IZtFmXAQ2dPgYNpacKXtiwG5EEjAKuG+DMxZQu4uRk4QV4T9o6aM7QimY 0vw0rgKb1K5sgOnJQ9+hJSIJmKIh7QuxcHBBTWAjcMLZGroJ5PvOYeTtcFETV7k2jpxU Npz5tWeCTOZiLwgQloQVq35ekx8npaz8K2I26dG/Us3EWa8bTTtDvSKIn3Sia7olk6Mr PAT2GhOu9gJnPWMR/pofOCt6xQ+1iBcfCtC7L1Seak4ZcKJWG8aLYvOWPt0ESKGuqT5Q LEvLmGq0chSbXUCIlyDktreksPGYAxIsf8/3UX9yowQhGmeIKIpU40VkhSnrnz+h0Mf1 CtJg== X-Gm-Message-State: AOAM531KxfgPCKbMu4eo5SZN2jqLoF9xt7vZiUxT+QtZhIZexj09KEOf 8zfQiuqxw7hhOM6cjia5QQVY+w== X-Google-Smtp-Source: ABdhPJxX52apzdGJ+G31jFpsd6qyzr51sC9eQfAIoKm53t4NTL029WnhH6PlgGdl81lH5onahxYScQ== X-Received: by 2002:a17:90b:1d87:b0:1dc:a9c0:3d49 with SMTP id pf7-20020a17090b1d8700b001dca9c03d49mr2272677pjb.12.1653565423783; Thu, 26 May 2022 04:43:43 -0700 (PDT) Received: from localhost ([122.162.234.2]) by smtp.gmail.com with ESMTPSA id i2-20020a170902e48200b001617e18e253sm221482ple.143.2022.05.26.04.43.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 May 2022 04:43:43 -0700 (PDT) From: Viresh Kumar To: Patrice Chotard , "Rafael J. Wysocki" , Viresh Kumar Cc: linux-pm@vger.kernel.org, Vincent Guittot , Rafael Wysocki , Stephen Boyd , Nishanth Menon , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 06/31] cpufreq: sti: Migrate to dev_pm_opp_set_config() Date: Thu, 26 May 2022 17:12:05 +0530 Message-Id: X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220526_044345_751138_643DEEBC X-CRM114-Status: GOOD ( 12.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The OPP core now provides a unified API for setting all configuration types, i.e. dev_pm_opp_set_config(). Lets start using it. Signed-off-by: Viresh Kumar --- drivers/cpufreq/sti-cpufreq.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/drivers/cpufreq/sti-cpufreq.c b/drivers/cpufreq/sti-cpufreq.c index fdb0a722d881..f4121a9d27e5 100644 --- a/drivers/cpufreq/sti-cpufreq.c +++ b/drivers/cpufreq/sti-cpufreq.c @@ -159,6 +159,11 @@ static int sti_cpufreq_set_opp_info(void) int ret; char name[MAX_PCODE_NAME_LEN]; struct opp_table *opp_table; + struct dev_pm_opp_config config = { + .supported_hw = version, + .supported_hw_count = ARRAY_SIZE(version), + .prop_name = name, + }; reg_fields = sti_cpufreq_match(); if (!reg_fields) { @@ -210,21 +215,14 @@ static int sti_cpufreq_set_opp_info(void) snprintf(name, MAX_PCODE_NAME_LEN, "pcode%d", pcode); - opp_table = dev_pm_opp_set_prop_name(dev, name); - if (IS_ERR(opp_table)) { - dev_err(dev, "Failed to set prop name\n"); - return PTR_ERR(opp_table); - } - version[0] = BIT(major); version[1] = BIT(minor); version[2] = BIT(substrate); - opp_table = dev_pm_opp_set_supported_hw(dev, version, VERSION_ELEMENTS); + opp_table = dev_pm_opp_set_config(dev, &config); if (IS_ERR(opp_table)) { - dev_err(dev, "Failed to set supported hardware\n"); - ret = PTR_ERR(opp_table); - goto err_put_prop_name; + dev_err(dev, "Failed to set OPP config\n"); + return PTR_ERR(opp_table); } dev_dbg(dev, "pcode: %d major: %d minor: %d substrate: %d\n", @@ -233,10 +231,6 @@ static int sti_cpufreq_set_opp_info(void) version[0], version[1], version[2]); return 0; - -err_put_prop_name: - dev_pm_opp_put_prop_name(opp_table); - return ret; } static int sti_cpufreq_fetch_syscon_registers(void) From patchwork Thu May 26 11:42:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 12862328 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A6A2DC433FE for ; Thu, 26 May 2022 11:45:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gmxaOYA1XkMf0tg5SjXqZ4Kj5aLs4k/fWmGE9kWGz+o=; b=GaYSX+LcE/80Gd NAZmL6+RnBRzkgYdmpH8RiyATsb/UocP1whjRQoSpQyd7lwuvJEbbWscQ3Ctw5GQP3FtgRUw+mY6x EMFxqCLUOPD+s0EQj95T/iaqyECVXLEk6M7Z8fiu9DOAPZqM5Kxbu3G1h2h6zA1JUJ+TQfgCowfuB 7zK7xjYnBfHzl+c+4X3Bwl/grjkVcC9aenxQfNY2zEOFq/m7+B6lZLgzTCoWhIRwCYEgLFYMf0ice r90XNTp0ZRXJDZz410MUMfy0QL4S5nQcaXl2VIcqQPjhJmsUb+5Eu/QVGje4GcoAyy4UNzBXgzFqu V2JFlx80Tc8zOb6k+PEg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nuBuP-00Egyx-Co; Thu, 26 May 2022 11:44:05 +0000 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nuBu8-00EguI-KO for linux-arm-kernel@lists.infradead.org; Thu, 26 May 2022 11:43:50 +0000 Received: by mail-pj1-x1036.google.com with SMTP id l7-20020a17090aaa8700b001dd1a5b9965so1513962pjq.2 for ; Thu, 26 May 2022 04:43:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tnA5+J+gH2mj2CPHfO10MW0xEpoxi+NxT/Ss2uVLmF8=; b=AVIp74S5w8hFRIvL44O8yvtl+fDjhV4Adadv/8mJ+X8nnqJGEThB9Kugaum863mxh2 h9QuOLBSkznxR24EctnKbI9qmhWgcU3DWDFidsDc2fYwO+1F5dcjE8DMFq69+MK23MOE A2D664nA5pvQdof/UuQ5L/JNBfmbziqu3a1t3Q+WBqadmHvmtFBW863HQtRfsx3o9iFv U7RJQyWAEnlH/UAcghhdjnUwN0vjoTwksBEp3VT3kxKIAylChAm5SfCvCCHZ/8+uj6fT 3Pn2GlOIIiC/KHtC45LCPo2xysWCycP3oSH7Wy3Yo7Bn2z3W9qoyVg93iL+7FRzxvTiw fyTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tnA5+J+gH2mj2CPHfO10MW0xEpoxi+NxT/Ss2uVLmF8=; b=Va5zVJ3Q6jFVYTb0qz822G2k3VB33k0Y15b5M4+icsC42RrLRFNwsvMT6bjhGVCAZX j2V2w/Os41R4slhAog+cHReMyZMsEU+jJY2GFjbCl3AkCmVpSh7zLB9HsBoExdqL7URN Spus91EvPPb489vCCRcsLNw+8N/sMdtuFvif2ZM2XEr/DDZ66otm6hJRHyJH1XMQs48X 3InAVO7n5J0tvXHAG6JYASW58ow7f+GZkz0dPwRav+l092fPuuPOHeaFXF+5dtu1ZqkM ZAeN+c9EVInAsFsu3KyCl8Kxn/GLA0z6iu4AMdOIHVEELJZtnsGIA8+OqtXU8p1KRuQ2 1kAg== X-Gm-Message-State: AOAM5307zPnkfmQEhGJTy0cGgN1WjRRIhVRMs4MHMnT/GjJim3yHQzUz EfXDxMIrQ30B2zc5d3JBXAHvYA== X-Google-Smtp-Source: ABdhPJzRIDXg5OmHJJdS+VFy81IjKYyN226dUfeZcatLo6D42DjmKKzBNFVKfJNIlfgyTjHRouDHZw== X-Received: by 2002:a17:90b:2c43:b0:1e1:9ff4:fd12 with SMTP id rw3-20020a17090b2c4300b001e19ff4fd12mr1736285pjb.107.1653565426930; Thu, 26 May 2022 04:43:46 -0700 (PDT) Received: from localhost ([122.162.234.2]) by smtp.gmail.com with ESMTPSA id l12-20020a170902f68c00b0016198062800sm1374400plg.161.2022.05.26.04.43.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 May 2022 04:43:46 -0700 (PDT) From: Viresh Kumar To: Yangtao Li , "Rafael J. Wysocki" , Viresh Kumar , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: linux-pm@vger.kernel.org, Vincent Guittot , Rafael Wysocki , Stephen Boyd , Nishanth Menon , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 07/31] cpufreq: sun50i: Migrate to dev_pm_opp_set_config() Date: Thu, 26 May 2022 17:12:06 +0530 Message-Id: <32db8386ad53c0d0b71c5afba18273e90072c081.1653564321.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220526_044348_734316_A360CAB9 X-CRM114-Status: GOOD ( 12.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The OPP core now provides a unified API for setting all configuration types, i.e. dev_pm_opp_set_config(). Lets start using it. Signed-off-by: Viresh Kumar --- drivers/cpufreq/sun50i-cpufreq-nvmem.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/sun50i-cpufreq-nvmem.c b/drivers/cpufreq/sun50i-cpufreq-nvmem.c index 2deed8d8773f..c1bee39758e2 100644 --- a/drivers/cpufreq/sun50i-cpufreq-nvmem.c +++ b/drivers/cpufreq/sun50i-cpufreq-nvmem.c @@ -104,6 +104,9 @@ static int sun50i_cpufreq_nvmem_probe(struct platform_device *pdev) snprintf(name, MAX_NAME_LEN, "speed%d", speed); for_each_possible_cpu(cpu) { + struct dev_pm_opp_config config = { + .prop_name = name, + }; struct device *cpu_dev = get_cpu_device(cpu); if (!cpu_dev) { @@ -111,10 +114,10 @@ static int sun50i_cpufreq_nvmem_probe(struct platform_device *pdev) goto free_opp; } - opp_tables[cpu] = dev_pm_opp_set_prop_name(cpu_dev, name); + opp_tables[cpu] = dev_pm_opp_set_config(cpu_dev, &config); if (IS_ERR(opp_tables[cpu])) { ret = PTR_ERR(opp_tables[cpu]); - pr_err("Failed to set prop name\n"); + pr_err("Failed to set OPP config\n"); goto free_opp; } } @@ -133,7 +136,7 @@ static int sun50i_cpufreq_nvmem_probe(struct platform_device *pdev) for_each_possible_cpu(cpu) { if (IS_ERR_OR_NULL(opp_tables[cpu])) break; - dev_pm_opp_put_prop_name(opp_tables[cpu]); + dev_pm_opp_clear_config(opp_tables[cpu]); } kfree(opp_tables); @@ -148,7 +151,7 @@ static int sun50i_cpufreq_nvmem_remove(struct platform_device *pdev) platform_device_unregister(cpufreq_dt_pdev); for_each_possible_cpu(cpu) - dev_pm_opp_put_prop_name(opp_tables[cpu]); + dev_pm_opp_clear_config(opp_tables[cpu]); kfree(opp_tables); From patchwork Thu May 26 11:42:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 12862329 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D3CABC433EF for ; Thu, 26 May 2022 11:45:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=310dMoc8wlsNrPLCkaQwv7gDdtqqFuFOlO7P2lO6/4Y=; b=syxGyGtpU076eO MTz82ldKMX6w+0BQuz7o9EgUaYUNizCyBLVsZpqhNih1I831S1Kf5z0Ha0ZjVQ6sl/KQYppFUaoGA INrLj573nis0I2Kv9n4s+kERvdiwLz4iahEQZGX3uC74XytVMw0E1LN9b3T4DXgZFitczx/Khl3zz EPCX435zJVfdj6hymC6mKi/RHgEdZrkIzhjZOliBd+SRX7BHUw/ab0x4RzbUawia0kUxmS+zXglLA 7W3bmCXzlAjPITWnuW82i+2WnTDBKvm9wvaY9aOXz3U3vVlsfebhQ0QKABc8tIJ3wg0QwIeHTmLmM 07hjrpKn93fK04xowp2g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nuBue-00Eh48-Ez; Thu, 26 May 2022 11:44:21 +0000 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nuBuG-00EguI-Ik for linux-arm-kernel@lists.infradead.org; Thu, 26 May 2022 11:43:58 +0000 Received: by mail-pj1-x1036.google.com with SMTP id l7-20020a17090aaa8700b001dd1a5b9965so1513962pjq.2 for ; Thu, 26 May 2022 04:43:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=O6FKGuWTYeL9CyJXF/nui49yX2g2b8cAfQUyL7WS+yM=; b=H3PWYr6fgVdEpbNbAbKBUEcwfB5VncU0s52oMLsps2/EtOooxFx/vAzuIunub4nQIL bUREhE1yrLHPFBXLeuqAeehyM/+oP8dTM7Z9y+FgL7MjBtuMGm1gyYEvAQXf3kzIC4iK ovmdTFDrKNF+RsdaTOThoaul/xyMb5UDuKCtrIJAseOtW2k2uCsEETZWvFr8rpAP47tY F8es6ydbBX/oQWmIydzYPb464BkSllrspADZPLf7grD2dJI7PXk9YarEUyU/JLQYankt ptpi/g+6Gs9tpYmNsHyyPYO7qkeVDcy3fdkFnm5L4ugdVizMFdg9L30cYcph3vWSsS1j n03A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=O6FKGuWTYeL9CyJXF/nui49yX2g2b8cAfQUyL7WS+yM=; b=no+q6OxAtGCx7BEKBdllh2qaKufkDavuJgqpAVjIwoR5o0cpjXt6kUwlHmlPEXt0/r KxO3ArrR2OkJgpnZ8VyfyVzVEGIG7pOpQgPNbfnoqRre6t817l6LU73505nccz/Qlr0f mh/izk66ofFvHOOLmBkdCLRDSURIy8LfTEuNvtg3/149FJOceRoE7BK9W/c8gDwcBGyF SmVPRaGrcr2AUCEUevB1E2fvwfXqyuUAcswHSsV3KaKQJbqAuOEa9MjH8z3U51n5ohVl DDjtFwusI0UGDzgF2X3jNPoACcRmvGtaKVFDpYYUaQyjDKEZQv3q4owSx+BPObs6ppYd 7TUw== X-Gm-Message-State: AOAM533/79Yt6Cu5zi8BQC4a9dIlUNuJy25nYYUNpTSss5GvcuqSx7eQ 54sp3bv8FwK8YCYTuPy+IfRCrA== X-Google-Smtp-Source: ABdhPJylJuyVRIVUb54hEn87GYfGffdmIDUn3OCcqUeKNw1PX/9AHVDbO9nW+pEOObcVYIfVJpAAvQ== X-Received: by 2002:a17:90a:5515:b0:1dc:c1f1:59bd with SMTP id b21-20020a17090a551500b001dcc1f159bdmr2205074pji.81.1653565436253; Thu, 26 May 2022 04:43:56 -0700 (PDT) Received: from localhost ([122.162.234.2]) by smtp.gmail.com with ESMTPSA id ce17-20020a17090aff1100b001e09a4afd69sm1284556pjb.7.2022.05.26.04.43.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 May 2022 04:43:55 -0700 (PDT) From: Viresh Kumar To: Chanwoo Choi , MyungJoo Ham , Kyungmin Park , Krzysztof Kozlowski , Alim Akhtar Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , Rafael Wysocki , Stephen Boyd , Nishanth Menon , Krzysztof Kozlowski , linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/31] devfreq: exynos: Migrate to dev_pm_opp_set_config() Date: Thu, 26 May 2022 17:12:09 +0530 Message-Id: <052c4937ce408a01de5cd7d7e359d333f9b11e57.1653564321.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220526_044356_642740_23EAD8A7 X-CRM114-Status: GOOD ( 14.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The OPP core now provides a unified API for setting all configuration types, i.e. dev_pm_opp_set_config(). Lets start using it. Signed-off-by: Viresh Kumar --- drivers/devfreq/exynos-bus.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c index e689101abc93..780e525eb92a 100644 --- a/drivers/devfreq/exynos-bus.c +++ b/drivers/devfreq/exynos-bus.c @@ -161,7 +161,7 @@ static void exynos_bus_exit(struct device *dev) dev_pm_opp_of_remove_table(dev); clk_disable_unprepare(bus->clk); - dev_pm_opp_put_regulators(bus->opp_table); + dev_pm_opp_clear_config(bus->opp_table); bus->opp_table = NULL; } @@ -182,11 +182,15 @@ static int exynos_bus_parent_parse_of(struct device_node *np, struct opp_table *opp_table; const char *vdd = "vdd"; int i, ret, count, size; + struct dev_pm_opp_config config = { + .regulator_names = &vdd, + .regulator_count = 1, + }; - opp_table = dev_pm_opp_set_regulators(dev, &vdd, 1); + opp_table = dev_pm_opp_set_config(dev, &config); if (IS_ERR(opp_table)) { ret = PTR_ERR(opp_table); - dev_err(dev, "failed to set regulators %d\n", ret); + dev_err(dev, "failed to set OPP config %d\n", ret); return ret; } @@ -236,7 +240,7 @@ static int exynos_bus_parent_parse_of(struct device_node *np, return 0; err_regulator: - dev_pm_opp_put_regulators(bus->opp_table); + dev_pm_opp_clear_config(bus->opp_table); bus->opp_table = NULL; return ret; @@ -459,7 +463,7 @@ static int exynos_bus_probe(struct platform_device *pdev) dev_pm_opp_of_remove_table(dev); clk_disable_unprepare(bus->clk); err_reg: - dev_pm_opp_put_regulators(bus->opp_table); + dev_pm_opp_clear_config(bus->opp_table); bus->opp_table = NULL; return ret; From patchwork Thu May 26 11:42:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 12862330 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 948A6C433FE for ; Thu, 26 May 2022 11:45:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4ehUOm6nA48RkdPY7r+f0t9+Ih0Sl+HWnfcYkvKjHw0=; b=HmjcnjrNwTURl1 WgfDrAxSvi8RxCwn/7QOQioDfz9h/wszqZ0S9GNtln7g+FvY9wemcOowKEtCKiokE55vZgrX9O4Mu L0RlE98uwADS/qk4+BRGSejdl35lAU/M6Yq/jXy5e9r+Z6SkXLOltW+GeXT4Tp2N2UtSIQfqh61CP tV3JCAbEjrbL26Tanjubut7J6pFNrpdaziGQDkl4E4ijpAgcijQZtA3PVpo5iEpk5mPlp9XkfNQR3 Ywu9v3vxrCj9N0yyEllujeGLh4cKks4jFok6e5DjBmn3egycE034rCQN6roMolZLInoLeFqv7pt3X VtvZf0CLoNveGoIowVHA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nuBv2-00EhEE-Br; Thu, 26 May 2022 11:44:44 +0000 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nuBuL-00EgxP-SV for linux-arm-kernel@lists.infradead.org; Thu, 26 May 2022 11:44:03 +0000 Received: by mail-pl1-x62d.google.com with SMTP id q4so1207998plr.11 for ; Thu, 26 May 2022 04:43:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6s0x8dJmuy2Ybw2lPLVZk+KMGhxE6UiFXXt2n7Y53xs=; b=U7t6fFDjDa0Ctor2pMs5mB+RkfuEaQPk9jAll6z0ozbTwHH7hCCOV39QhC1AudH7B7 mQNpvXHdoHtmlP/l8G9ftM8cnpNgbGwwGz9I+OmYGanwKqbuDAFiLpXAxWh8NKaVHaAA aBOK8br6uQdtX1bFAvIQ7JvqoxwHiCHDyyeEoXHWCbLWoVvk7zriP5dvMGGKYIuZyP3N Ec0tGGa/3p+cdA3hyyIF0IaJc8Wg1rXpfwN5vn1/9ccbu8Tx6TT0v0YsqfAustZYcUM+ AEv36mJY1RccxXovNcGZX5iR8HI63Dc4GaojNxWzAlkrNrcHbTysqe9W1RvbTeEt6NOm 3OfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6s0x8dJmuy2Ybw2lPLVZk+KMGhxE6UiFXXt2n7Y53xs=; b=fK2HwLuXbIOP7ccMKdQEbmhuFlSgJa3YG0g7XecaEgi4iXRWg7oQaULN8nxyUfhw/g 0LeQGnOGX/lspnercMqNbIHBnYg5EwCWxs6DS61nsOR18Cn+l8pd/FBN7JK9BCX8gqRb SmNDQmfAPP4INQXybuHWqwJ/5obeTqCnES924qnre95gaCfm6l+BkaggrwFcJTgRaGx4 lNZpCnz/ucCOuWFv25nRY1QwZlzD1MjRa3C9HKvRV/dhyaG7pQ5iHXj7NUW9Any38Wdf BKfpE7Hb+Fn7iJBLrLyIujxNew4HksCAT40PtR/JgPQrV9vRs4SZVE5y8X2tkPAxf9Y2 Es1A== X-Gm-Message-State: AOAM533rB+FzbqAN/JYCWarWple+EtZjw9dBYEBf2Ab3nT9lzR8qHh3R kRgWsv5GVNM7sXuAre8YjII4mg== X-Google-Smtp-Source: ABdhPJxbhS8femEgYxRhuPmf1pbTSv1ParpKVoHJCFN/pCA01ph85V+OU8iJG6Dir5uT/slHjL/sTg== X-Received: by 2002:a17:90a:4cc2:b0:1dd:1010:d10d with SMTP id k60-20020a17090a4cc200b001dd1010d10dmr2174506pjh.205.1653565439389; Thu, 26 May 2022 04:43:59 -0700 (PDT) Received: from localhost ([122.162.234.2]) by smtp.gmail.com with ESMTPSA id v5-20020a62a505000000b005183434ec86sm1261317pfm.135.2022.05.26.04.43.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 May 2022 04:43:59 -0700 (PDT) From: Viresh Kumar To: MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , Rafael Wysocki , Stephen Boyd , Nishanth Menon , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 11/31] devfreq: sun8i: Migrate to dev_pm_opp_set_config() Date: Thu, 26 May 2022 17:12:10 +0530 Message-Id: <276f3e9b7d9b696cbfa1e5546f79db7029510fb4.1653564321.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220526_044402_004300_8A0CE881 X-CRM114-Status: GOOD ( 14.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The OPP core now provides a unified API for setting all configuration types, i.e. dev_pm_opp_set_config(). Lets start using it. Signed-off-by: Viresh Kumar --- drivers/devfreq/sun8i-a33-mbus.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/devfreq/sun8i-a33-mbus.c b/drivers/devfreq/sun8i-a33-mbus.c index 13d32213139f..125b479c9d6d 100644 --- a/drivers/devfreq/sun8i-a33-mbus.c +++ b/drivers/devfreq/sun8i-a33-mbus.c @@ -337,6 +337,9 @@ static int sun8i_a33_mbus_probe(struct platform_device *pdev) unsigned int max_state; const char *err; int i, ret; + struct dev_pm_opp_config config = { + .clk_name = "dram", + }; variant = device_get_match_data(dev); if (!variant) @@ -404,9 +407,9 @@ static int sun8i_a33_mbus_probe(struct platform_device *pdev) priv->profile.freq_table = priv->freq_table; priv->profile.max_state = max_state; - ret = devm_pm_opp_set_clkname(dev, "dram"); + ret = devm_pm_opp_set_config(dev, &config); if (ret) { - err = "failed to add OPP table\n"; + err = "failed to set OPP config\n"; goto err_unlock_mbus; }