Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp527887pxm; Wed, 2 Mar 2022 03:34:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJyfdmnwDq+OBG7dZTAHgIklmFHGz814WffSV2V6e9JIGN2QX3789Pb8Wlw0tsGqF1BXTyRw X-Received: by 2002:a17:906:3713:b0:6bb:44b6:547d with SMTP id d19-20020a170906371300b006bb44b6547dmr23326254ejc.758.1646220872223; Wed, 02 Mar 2022 03:34:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646220872; cv=none; d=google.com; s=arc-20160816; b=B9zAI0eCkgxrQq60p5LoCpWqSt5ecRZD1lJpDlSaVuU2Dn3ZFkAWI9uv6jFy8MhDCT hqaAkTTZzTRRMa0c7zdYN6eOhN05NHg25dDzdad6zoAULMsvFFiiLPAG2l795wHjDPpt Xk9JLWOuYWIam/SWdQbli7YmRb74duiBzL08t4FUWYaBp7dZ/FGFP1vYeZKJ2uhjofGM 1MV4TO36OCkFnoC0wk0uQ3FQ9L9vgJzDJbiBL+FhSndTN00gUmh4FbgdGrHkRMS4IeXJ ATWpiwtj5CBXOrhEbpN357UsESjdZLymW8FaYGXiJYkIYPW+QA2uSirxKanTlDatncWZ Gj0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=F9EtQ8yCDPdY6oJUsT6nUpz0TTVJMffkSKOyUDKlf6g=; b=Z19Uqyu37p4ZgLjml6If9RYRfRavzr9mAmoc/MxIIN9O1cb+7QGGETUiM43PjmLvYW re22eZCi7SL0sTSlwY4kaG7UWoyUsQVnE1Pttevn+qzzaTllWJBhFBHuEDevYMMvyWdy iglx9LalNHTqczSmYExAYmF4MJwmzrrLNBoEBgIsoxmNi5+NVaiRBrqF6JLRr0A6rWxm nnu4mhdBrqd8jSAEzPa1sCDSmFDJNxGl4l+45BS+TNEbWzmIETAWrmuZoAfBsx/JDka6 WnTs5v9kcNhPonp7B2gQfDnBIYo8M3+TnXi6byxIh0uBdtEWpY4KH8N/PGcp0FtghwYm XpiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="dNj/gUws"; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s10-20020a170906284a00b006a66a6a36a2si9386318ejc.293.2022.03.02.03.34.07; Wed, 02 Mar 2022 03:34:32 -0800 (PST) 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=@linaro.org header.s=google header.b="dNj/gUws"; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239904AbiCBHqE (ORCPT + 99 others); Wed, 2 Mar 2022 02:46:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239880AbiCBHqA (ORCPT ); Wed, 2 Mar 2022 02:46:00 -0500 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FE82AD135 for ; Tue, 1 Mar 2022 23:45:18 -0800 (PST) Received: by mail-pj1-x102b.google.com with SMTP id p3-20020a17090a680300b001bbfb9d760eso4073459pjj.2 for ; Tue, 01 Mar 2022 23:45:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=F9EtQ8yCDPdY6oJUsT6nUpz0TTVJMffkSKOyUDKlf6g=; b=dNj/gUws35uaqKdhHY3lu4/zgchEG0cqtQXu3vowcftUBbkQXDkZR/CJz0J4FqCnym YHsfvEv3jRC6KpDCQY61D7QW5Q8oVYrwz+W/iVgktqhA3/qjboT8klvbsxZN4hYr0ITE pix8SawqbDMwN93+4g22NeRi8YOW2YoF2EUAS99h2CYBbGwL7ESNnIiBnzojb6OKOG3P 00zgyWDWKDTGg1u3jvQXsogb/NO6DTpgHC56HONXtaW39xDBqLBzAABe0+5ETvNga1ug bKu3nMCvrCIIZdAfh6U1gwvcnicUJ872A6zvrzzSd8mI8IHX6dNmZa5jVZf67asZkh+N QQ2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=F9EtQ8yCDPdY6oJUsT6nUpz0TTVJMffkSKOyUDKlf6g=; b=goxmSpp9iWUfDQ9/TBqmVShS+RNB8TlMsSHpzbdkWea44TXJ5pUFINUXCpRE6t/+1n QMQmi0aBJN/1gMc1nQ0ZcKg+Z81r5pdBsRcXta4RcussfsOGIK72O1O6PMS4V2ijdTkM tNKLp2skMZo0HGYG/FFKPBL5DJyJpfYs4e01PNszH9kn0/mtM4jWlddXrmJ5+e21YTAM Fg25DK3qETdhdZkY/i7j2eMlcljV8CBI5vfucmkmXgDNENTkUJX6dzm76ZAOTYQ7MjUd EHYFlcf+3Ogit9fTHkubDZzr6DTG88gFHD8NFMtOj5Gpd/sIRluJ4BH8SD8aBvS6O3kN TbvA== X-Gm-Message-State: AOAM533dIdgpAwQg5fUyHj20yTVRWz2HG+/MYNYwGOEd6oGD1oqSygQ1 DoQ3nqEydo/2+uvVuLkKTVaQqw== X-Received: by 2002:a17:902:b696:b0:151:7777:2211 with SMTP id c22-20020a170902b69600b0015177772211mr9195582pls.46.1646207117588; Tue, 01 Mar 2022 23:45:17 -0800 (PST) Received: from localhost ([223.184.83.228]) by smtp.gmail.com with ESMTPSA id b3-20020a056a00114300b004e099ec2871sm20035153pfm.154.2022.03.01.23.45.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Mar 2022 23:45:17 -0800 (PST) Date: Wed, 2 Mar 2022 13:15:15 +0530 From: Viresh Kumar To: Lukasz Luba Cc: linux-kernel@vger.kernel.org, dietmar.eggemann@arm.com, rafael@kernel.org, daniel.lezcano@linaro.org, nm@ti.com, sboyd@kernel.org, mka@chromium.org, dianders@chromium.org, robh+dt@kernel.org, devicetree@vger.kernel.org, linux-pm@vger.kernel.org Subject: Re: [PATCH v4 3/4] OPP: Add support of "opp-microwatt" for advanced EM registration Message-ID: <20220302074515.dqzoutfiobildiph@vireshk-i7> References: <20220301093524.8870-1-lukasz.luba@arm.com> <20220301093524.8870-4-lukasz.luba@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220301093524.8870-4-lukasz.luba@arm.com> User-Agent: NeoMutt/20180716-391-311a52 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_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 01-03-22, 09:35, Lukasz Luba wrote: > /** > * dev_pm_opp_of_register_em() - Attempt to register an Energy Model > * @dev : Device for which an Energy Model has to be registered > @@ -1517,6 +1567,12 @@ int dev_pm_opp_of_register_em(struct device *dev, struct cpumask *cpus) > goto failed; > } > > + /* First, try to find more precised Energy Model in DT */ > + if (_of_has_opp_microwatt_property(dev)) { > + em_cb.active_power = _get_dt_power; You can also do (to fix the warning) this instead: em_cb = EM_DATA_CB(_get_dt_power); Similar for the else part. > + goto register_em; > + } > + > np = of_node_get(dev->of_node); > if (!np) { > ret = -EINVAL; > @@ -1538,6 +1594,7 @@ int dev_pm_opp_of_register_em(struct device *dev, struct cpumask *cpus) > goto failed; > } > > +register_em: > ret = em_dev_register_perf_domain(dev, nr_opp, &em_cb, cpus, true); > if (ret) > goto failed; > -- > 2.17.1 -- viresh