Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4116595imw; Thu, 7 Jul 2022 13:04:02 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vE9NuXIx+Ymt4+u9NHQTrmWhVgH+7a0SvCEiFFIgpLQT21V4UEoZUa+l6jSSaqFfOdQI23 X-Received: by 2002:a63:7448:0:b0:40c:7d4b:e7c6 with SMTP id e8-20020a637448000000b0040c7d4be7c6mr40354191pgn.140.1657224241974; Thu, 07 Jul 2022 13:04:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657224241; cv=none; d=google.com; s=arc-20160816; b=xqvJz++PmzudHi1HhD7tjDMygpe1gSDD2pyFEKo0jrDRHoKGpRu8ugz153SMs4VzOA pOzqs0keE+Kl2RCOl4vUK5ynXvJuX3oIoelRxseMwRv7FxBSI3YLr+IN0QUIQ2HXU9If K+9VNO4W0MS/8OT7RPQIQMt9pl9Dqn7TggFBA9uALi+Wef91MIsaL9H7jjlLutX8hRfC CUKmbe5ApyaPL1KCc0P+vWQDY/Yca/o3gc767EpeTxXIFjWgbK8mZCsJwB+5Nz7r1uhb X2hVLee5yMjMY4TTHv2n7S5XgbUuPzd2d3XtDuiCrauAHUBbuNmplWPfyhRVsN+vAtIU T53Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=rNjW1kwIEY/5kZagqWsC214U8GWp+x3M7qVK2GMrOLI=; b=vXIkyJAc1vzSbrd4FjtxNyquhbGjFpYVdBzs8GJSGvWTzD8+LmCx5MtXkfcoXmE1ng KlKmbnmS6mGam/7TrDkECFhLRpo4087YTK6QHDdkaqzIYky1SA90QF0EaKlFf8BP9Cxe j8gPKEiq0Fdm+7E35XqsODX2Dgnfua2g8OVrO4eIhGXWNMrC3njLszj0HKMxTj7J20bo MXfU2aNJ3CTT++calnZvmVwVN1RfmVO9DYTE5maWXAqWCqwZTzsPedYMtNhZGWawDX72 tgif0SOElaxEIZiJkdYjYjv+Zsy+MFNBnx58lmdICuq92nkGO5sJJ4AgzmOWAK311qyS lnhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=E1vFwX9S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v4-20020a655684000000b0040c3a6764b6si49628026pgs.203.2022.07.07.13.03.35; Thu, 07 Jul 2022 13:04:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=E1vFwX9S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235974AbiGGTaC (ORCPT + 99 others); Thu, 7 Jul 2022 15:30:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232284AbiGGTaB (ORCPT ); Thu, 7 Jul 2022 15:30:01 -0400 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59F7F20BFE; Thu, 7 Jul 2022 12:30:00 -0700 (PDT) Received: by mail-pf1-x436.google.com with SMTP id x184so7999283pfx.2; Thu, 07 Jul 2022 12:30:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=rNjW1kwIEY/5kZagqWsC214U8GWp+x3M7qVK2GMrOLI=; b=E1vFwX9SAFs6L7n5gRjxI/pxygtN8qYO0JGr7AtKRs/kCmd9Y8DoGc2ob5uARbk178 +N5ZitQyQV4IwDD/fU+pPDuibd7LZnfhZBFB4G4jQNg0mXh6SgluSAD0saMj3dNEVurI w1I3LkMJgTd87dK2KQ/HKFZl2EM5RU1BtZSX/7jOJep4sd/23NOt95fAvRLuX4aHlXGQ Li35EzLsZd1a+7Wi1V5EH8HfHVw89xT3G9DLe8L+xuLGJoMuyK7O4xlryDMgCBAlxIXG /nXCvX108iKCwn+0Q465T4kbyJ2DOVtJBbd92MlpltWJazipX8ZoXhW046kralGWmQR0 oqFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=rNjW1kwIEY/5kZagqWsC214U8GWp+x3M7qVK2GMrOLI=; b=rtAlblJo8CAmBbP5oNMiFae56q3EFgsAaDGRidRy8oLrGbq0DnwTjTxBSYePYA40D4 Q8Vc+OItMzWRGOh9DoOeHq1tgokhwfDlMK4Cbf57FsfRTL7hVeo9aP7RDhHSa33twSxX dVPzUl99Wn3iaRxqxnVozdtVxccihEAjiDOXBe3PZHY3lOdwuGP6FBp+1m6ccQjB/8y/ nZMciZBQwy7uG/6SBsf97UrfsANv7h25PjCSdgvp2E9lz+mB0a+vHyZrEMweBLPOPYS6 wv1WDWoHoKF6Dl5PJIcT56H8Hs7MaEyAmiSDL+1bM4P9vm9L0yjXLLSxi8BAmZEx/51Q iqyA== X-Gm-Message-State: AJIora+DXzuF8fLOW9YG92NhF6ASKybUr8JR+GzD5kKQVjeoIVpNTvkd KilfCJcCCWjcXm1La9yYcJQ= X-Received: by 2002:a62:542:0:b0:525:a313:fe28 with SMTP id 63-20020a620542000000b00525a313fe28mr55479583pff.73.1657222199790; Thu, 07 Jul 2022 12:29:59 -0700 (PDT) Received: from [172.30.1.47] ([14.32.163.5]) by smtp.gmail.com with ESMTPSA id y27-20020a634b1b000000b0040cff9def93sm25909782pga.66.2022.07.07.12.29.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 07 Jul 2022 12:29:59 -0700 (PDT) Message-ID: Date: Fri, 8 Jul 2022 04:29:54 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH V3 10/20] OPP: Migrate set-regulators API to use set-config helpers Content-Language: en-US To: Viresh Kumar , "Rafael J. Wysocki" , Chanwoo Choi , MyungJoo Ham , Kyungmin Park , Krzysztof Kozlowski , Alim Akhtar , Nishanth Menon , Stephen Boyd Cc: linux-pm@vger.kernel.org, Vincent Guittot , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <57b3f53e71550be92e28f4e2fa619f93bb5f3d78.1656935522.git.viresh.kumar@linaro.org> From: Chanwoo Choi In-Reply-To: <57b3f53e71550be92e28f4e2fa619f93bb5f3d78.1656935522.git.viresh.kumar@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 On 22. 7. 4. 21:07, Viresh Kumar wrote: > Now that we have a central API to handle all OPP table configurations, > migrate the set-regulators family of helpers to use the new > infrastructure. > > The return type and parameter to the APIs change a bit due to this, > update the current users as well in the same commit in order to avoid > breaking builds. > > Signed-off-by: Viresh Kumar > --- > drivers/cpufreq/cpufreq-dt.c | 12 ++--- > drivers/devfreq/exynos-bus.c | 19 +++----- > drivers/opp/core.c | 91 ++++++++---------------------------- > include/linux/pm_opp.h | 44 ++++++++++------- > 4 files changed, 60 insertions(+), 106 deletions(-) > (snip) > diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c > index 541baff93ee8..d1235242367f 100644 > --- a/drivers/devfreq/exynos-bus.c > +++ b/drivers/devfreq/exynos-bus.c > @@ -33,7 +33,7 @@ struct exynos_bus { > > unsigned long curr_freq; > > - struct opp_table *opp_table; > + int opp_token; > struct clk *clk; > unsigned int ratio; > }; > @@ -161,8 +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); > - bus->opp_table = NULL; > + dev_pm_opp_put_regulators(bus->opp_token); > } > > static void exynos_bus_passive_exit(struct device *dev) > @@ -179,18 +178,16 @@ static int exynos_bus_parent_parse_of(struct device_node *np, > struct exynos_bus *bus) > { > struct device *dev = bus->dev; > - struct opp_table *opp_table; > const char *supplies[] = { "vdd", NULL }; > int i, ret, count, size; > > - opp_table = dev_pm_opp_set_regulators(dev, supplies); > - if (IS_ERR(opp_table)) { > - ret = PTR_ERR(opp_table); > + ret = dev_pm_opp_set_regulators(dev, supplies); > + if (ret < 0) { > dev_err(dev, "failed to set regulators %d\n", ret); > return ret; > } > > - bus->opp_table = opp_table; > + bus->opp_token = ret; > > /* > * Get the devfreq-event devices to get the current utilization of > @@ -236,8 +233,7 @@ static int exynos_bus_parent_parse_of(struct device_node *np, > return 0; > > err_regulator: > - dev_pm_opp_put_regulators(bus->opp_table); > - bus->opp_table = NULL; > + dev_pm_opp_put_regulators(bus->opp_token); > > return ret; > } > @@ -459,8 +455,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); > - bus->opp_table = NULL; > + dev_pm_opp_put_regulators(bus->opp_token); > > return ret; > } Reviewed-by: Chanwoo Choi Thanks. (snip) -- Best Regards, Samsung Electronics Chanwoo Choi