From patchwork Fri Jul 1 08:20: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: 12902944 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 3A443C43334 for ; Fri, 1 Jul 2022 08:23:25 +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=UpFP/x+OXlU6qsDjTvmVHSb7hvOTvuxJGFUeWXkrJ2k=; b=4mMCUjCNrDSTxm 7t2NuPghM1kNtMB7ElwCw/LDkAmxU83Vjn6nkEPv+ZCbZhFhIOB9y2djNsaVRv0A40u9ewmsqu0bu cjjMRrVFNcCJivjcAOxekiD+zuiCwt/4UHK8wyfMIrq1uIVAJWDuAc8vqBj96VjnfNR8qAhbjJbby DHYbidTOdcfWjeNtKQhTH6YnspIhFyFSLEmv7UYZ1nK1t9sKcz2BH8otV6+l6uhv0/zrW89qICgHw vvP3OReoneDN6IYHgbXxVqY90HADhqUXpULCauyTsHVPDk4Nkfdse02t3uy3IFTp5ip9NiNKBQdEr SuyPFFbkUzchjNFkcj9w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o7Bup-003c4g-0q; Fri, 01 Jul 2022 08:22:15 +0000 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o7Btt-003bWA-7Y for linux-arm-kernel@lists.infradead.org; Fri, 01 Jul 2022 08:21:18 +0000 Received: by mail-pj1-x1032.google.com with SMTP id n16-20020a17090ade9000b001ed15b37424so1966488pjv.3 for ; Fri, 01 Jul 2022 01:21:15 -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=aJVM4zFbFbhC4PcmmIcXH43PSItTV2w1+waf0FbvJO8=; b=ac3+8dQHtEe1GOgSD/+czOHQobsLexnh9mWvBEggRIwxaSkJBUDtOkg+DdQaX5UU4E /gF3RRVm1g4RdX3XjTJQAcgHRHoZT54dk8B20CgpadbZbkeIczX08V0uSVwJZ/2fHpOc BrxDO5WkUpbdEm5ZsGV4KXnf8tLMdR9fC5obVM1zvtSDdtsWzQqeuANKELx6Z0FiWqeh Xpy4r/vAGHlZOBjNPfjrlhLmEIdrQaRr2fS57CCpFMYLsBczqnDWqCURvTumj1Y6c1Mb sac7u8Q5HUOdteP+2VnJmr6qovBq50d5MAhM1sgP+0JN/+NPK4UjkYBMtVaMxEyWS+KA FaDA== 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=aJVM4zFbFbhC4PcmmIcXH43PSItTV2w1+waf0FbvJO8=; b=YZGcxHfzS7pv3C7O4kQBf1RL+XWLjXbOrzfhT8LCyHNW+iipY9cAZVJpxjo+zILDC8 HS4DG2ZLnrveiHQttjTAA20sfo0ApFz3ibhnhoBSF+SpPr30EBDDKzlgxkqYA68VWiVU SldCN1ip7g4oBI3GCdU64LKBMz6KLbOMgaIwnXLVKarFnrCOnAzfvjzGnS/MHMuv70+k NP7krbRcZBaP70AzVE1X4RFkftRO/vv/QHk/Tl+Q/Cx52HRpDMXYdVZTTcOGXLAbPT3F 3FgEIEGd6Q1N8nuZUdqnYINJB2UcByizLI7PKmgtBns83pyquY8zpMw3CzmANDDLVznC E97A== X-Gm-Message-State: AJIora+m1VMAcKwVFj/mWH/6LyrT83ZPe8wy25XCwZq7RuDFpwyCiMYY a5uJGF1YZmZKVeQRHIUgG4JXUA== X-Google-Smtp-Source: AGRyM1vu5xQ/FaApTDjk/0jnEWXTkKjAl95QQ8Gbqhs9UyvgMPjWnaNlxNRSi4k/foLg6slD829VNA== X-Received: by 2002:a17:902:f650:b0:15f:3a10:a020 with SMTP id m16-20020a170902f65000b0015f3a10a020mr18701639plg.61.1656663675180; Fri, 01 Jul 2022 01:21:15 -0700 (PDT) Received: from localhost ([122.172.201.58]) by smtp.gmail.com with ESMTPSA id n17-20020a056a0007d100b0051bada81bc7sm14907263pfu.161.2022.07.01.01.21.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 01:21:14 -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 J. Wysocki" , Stephen Boyd , Nishanth Menon , linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH V2 11/30] devfreq: sun8i: Migrate to dev_pm_opp_set_config() Date: Fri, 1 Jul 2022 13:50:06 +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-20220701_012117_331458_9B98998C X-CRM114-Status: GOOD ( 14.16 ) 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 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/devfreq/sun8i-a33-mbus.c b/drivers/devfreq/sun8i-a33-mbus.c index 13d32213139f..0dcc13cae7d7 100644 --- a/drivers/devfreq/sun8i-a33-mbus.c +++ b/drivers/devfreq/sun8i-a33-mbus.c @@ -337,6 +337,10 @@ 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_names = (const char *[]){ "dram" }, + .clk_count = 1, + }; variant = device_get_match_data(dev); if (!variant) @@ -404,9 +408,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; }