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;