Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp763694pxm; Wed, 2 Mar 2022 08:02:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJw25BvYsO7bGmOSM+UH2XCoQy+/NpAdSHme+KsHPKJlcP06H+Psr/Y+WxJNSL1y/wb+uN0I X-Received: by 2002:a17:902:7048:b0:151:6d4b:6118 with SMTP id h8-20020a170902704800b001516d4b6118mr15173856plt.50.1646236955291; Wed, 02 Mar 2022 08:02:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646236955; cv=none; d=google.com; s=arc-20160816; b=fr+acHDlR+QythpxJd4pdRNTz7SIsrNPEyWihvUmrJnL7vIGh2CIst7MQwqTBGwHpt mnrZYVb8Kq7NmHI4OKbvrSh24se3pqKODC4qS/LgW3Q+WxsHaS1DYVDVE9xatqwJJUQe xD6NlG5DHVFXmEjRvWCsRXHYTv7rfhn+Eg/QzYY4wljF00563R5KlRpfWmUSEcbPmzzC ZTiP0864bM4xzrjrJx48tgs3htSHf89oRIqEF1c4ko8HoMtLneTcLW1412OTh85hHz/E L5w/KBLOYsuTBOJKFXrI/S/Nrmd1SfpjUEZU0VHGpBNlJ0FNu31lbwEcbhuS/pgj46ni xrVg== 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; bh=2P/Bj8mVDOvBELweX7Ql+vV6eJD1naM6fWUxkMv5rn4=; b=iYIwa9StQethn5dBHsda9fi0IkrntiAyeSj2m/xva77Jz1ummqCp0flcZzbiO0ZlfP FkZvn9BGS8TqMFUKI4b53/Sz8XS9rR2Ur7pFPFUbpoJn/Go3A0M0q6lkSAgw/VDYLwOP L6M57QogxOB2Gs3bnGWHTdETMlZfwnMqp6CkIADCTjgwsCdWe8mOlR+PidYiN6MxLpMf yYEM0O3SA6gTEJpttcvUreGpxhOdu0uPNVDCDvq2YEDODTJElPjmDnTrlo8/qnggN+8f m5pyfdDoiiibthOscngPpt60EhXyVnj0oVKMzhhjqmwxFlXWS71IssOSo1DSk1TlSCKr z31g== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j4-20020a17090276c400b0014dcf693b8csi15298509plt.20.2022.03.02.08.02.13; Wed, 02 Mar 2022 08:02:35 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240562AbiCBJi2 (ORCPT + 99 others); Wed, 2 Mar 2022 04:38:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240557AbiCBJiZ (ORCPT ); Wed, 2 Mar 2022 04:38:25 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 719D224BC7; Wed, 2 Mar 2022 01:37:41 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B3B9F1042; Wed, 2 Mar 2022 01:37:41 -0800 (PST) Received: from [10.57.21.27] (unknown [10.57.21.27]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BDA013F66F; Wed, 2 Mar 2022 01:37:39 -0800 (PST) Message-ID: Date: Wed, 2 Mar 2022 09:37:37 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v4 3/4] OPP: Add support of "opp-microwatt" for advanced EM registration Content-Language: en-US To: Viresh Kumar 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 References: <20220301093524.8870-1-lukasz.luba@arm.com> <20220301093524.8870-4-lukasz.luba@arm.com> <20220302074515.dqzoutfiobildiph@vireshk-i7> <20220302093036.qanm3vxuajinzbwb@vireshk-i7> From: Lukasz Luba In-Reply-To: <20220302093036.qanm3vxuajinzbwb@vireshk-i7> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_HI,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 3/2/22 09:30, Viresh Kumar wrote: > On 02-03-22, 08:50, Lukasz Luba wrote: >> If you like, I can introduce new dual-macro implementation >> in energy_modle.h which would sole this issue: >> >> ifdef EM: >> #define EM_SET_ACTIVE_POWER_CB(em_cb, cb) ((em_cb).active_power = cb) >> >> ifndef EM: >> #define EM_SET_ACTIVE_POWER_CB(em_cb, cb) do { } while (0) >> >> >> Then we would keep the single call to the registration EM and >> we would have: >> >> if (_of_has_opp_microwatt_property(dev)) { >> EM_SET_ACTIVE_POWER_CB(em_cb, _get_dt_power); >> goto register_em; >> } >> >> >> >> EM_SET_ACTIVE_POWER_CB(em_cb, _get_power); >> >> register_em: >> ret = em_dev_register_perf_domain(dev, nr_opp, &em_cb, cpus, true); >> >> >> I can do that, please let me know. > > That will work as well. > Great. Thank you for your comments. I'll send v5.