Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp243531pxm; Wed, 2 Mar 2022 14:25:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJx53VrHFxDAr8ckeldCY/W0HFg5d5iqRB3MLjUGsPtVK50XuFpjOALQ0+uLdLlUpu041UNn X-Received: by 2002:a17:90a:5b0d:b0:1bc:7e66:2970 with SMTP id o13-20020a17090a5b0d00b001bc7e662970mr2031748pji.12.1646259947340; Wed, 02 Mar 2022 14:25:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646259947; cv=none; d=google.com; s=arc-20160816; b=bZU7YbTRhUQmDCvgRD+9BGwOSzzSwkFRSTdg1yNRJhoXTxSladl9vGDp9oQN82U8Fq 3Gap34X7w34jo4jVCT2kD2gwvPSD65q8TGR+0ZNgV8ji74wr8hKWuL4UqVXvqnACz+gO JFTXrMQ9mHoQfLAym1+JDpVHuTkIgay2zrvol7hm7LOFbIk5ItByNC5jts+SAW7eE1MS vW2Av5EkiS+SAiZWRTOcVWAagm7/0p+sSjGS3nLmzvC4wn/P66jsTpM0WhLBr6UKasPz xE0UurIRYP3alDh+yaE9ZCg2r/JC8FoayqIBLO2SkU6ZamDLK26CxMAFN82f5OjHSYuq I43w== 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=GJBBkuVoOY0NadmNicSfZEUGciYZ9mVdm2SUcdDUa1o=; b=dMEicjh14Uw2lt44LiWG7tGG9z8kbCd6K+4WEVJS2IQ+XX+ypblJ6HhgTZ+SS2J5i5 dmsrbTbBP6Bn89sy6cLEW/A9HnYGNa2GOTB7DkMsDmgmVf32zlJBFfGLxQDfxoFpVJnN nOaGKRnt/RMivJEvge8ZbrIMVDPQYoKcR74UFT5IYpvNzk8oJ1HMUnxGIPfb8LL0wG56 MgebkiH3iVu5y0+C/pQnLMdidHr7cP1LrjHzssmmcsl4+XdZfokKUYX/8Z/coySHW9iZ nC2T0WHPw22IaaJKypRvRGAfjM44QYWy1zXSENHHz9zIVtBzPqId/VHwBKUyKXQZKkdg U/Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BiwF3Cgi; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id w2-20020a170902a70200b00149e3fd2fd2si295918plq.332.2022.03.02.14.25.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 14:25:47 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BiwF3Cgi; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BF45CE5430; Wed, 2 Mar 2022 14:24:50 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240494AbiCBJbW (ORCPT + 99 others); Wed, 2 Mar 2022 04:31:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235465AbiCBJbV (ORCPT ); Wed, 2 Mar 2022 04:31:21 -0500 Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C9A8B8231 for ; Wed, 2 Mar 2022 01:30:39 -0800 (PST) Received: by mail-pg1-x530.google.com with SMTP id w37so1139236pga.7 for ; Wed, 02 Mar 2022 01:30:39 -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=GJBBkuVoOY0NadmNicSfZEUGciYZ9mVdm2SUcdDUa1o=; b=BiwF3Cgiq4NVJYHfcc9TVwFXiK/Plrkz9Icej7HVS5zeBpmXcxn/Y6OtaRy0iWYKKw GuT4yZgy1INWhZJwxlOYi4bPJ9B72nL1ga0lPC8lALKz6E63s7JZrhb/SozMC0//IVj7 Q7c3jR/C3CmwE2Ovn3NV9+ZtGBwe4bt69pfIK3KwECUpDuf+4HS2LrYrpumJqMCinOlw 5VLGyVpBy8itZ9mUfzjPyYIvDPXUZzi+KjLpnCZ0fb4ON/2zIttKydFKH/VYORW84qM8 DhqkcPOQL97TuYPRA8kH/fefSoVVY/L5FK5nIDO6fxFoQCaeqbOE5pHTh+2huidDkWf+ z3Vg== 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=GJBBkuVoOY0NadmNicSfZEUGciYZ9mVdm2SUcdDUa1o=; b=boL6ugmyzf7CEwqATpriTH+KouWOGgSJItFT9i6IhOVGK4M/ZMBPDcLjKcPyowyF3Q wrCcymQ6UTlZuZAOkpJRajU4MJNE8FouYrUMtbVZyQNCeSdy4H3IkBWbiWdDJoH3j1/k F1jTpQTioggtpfzgaHB6Gp8rHMDBocobysROvpum2Of47y9CO8TnnnfgJMTSOfSdo8Me bVL9luRn07jtk63curRYVUFyyhmzLCPwFLAIAfaf/Lh4oa1JLyTQ2pF+zeQKYRY89wCO qFtYgTvDZ6Yr1w0YojpNFtqziGMrqpOe/9q5rjxUZMJtmG2U154eW6j27+zRAmmdE/Ir SdMw== X-Gm-Message-State: AOAM532LZwzh/nu8Pyp1iwYdaD6YQgCk/YTeB9zuEtODQ255wr2cFDNH nelNsImwntahe/SJdhV2PGRqcA== X-Received: by 2002:a05:6a00:140c:b0:4e1:530c:edc0 with SMTP id l12-20020a056a00140c00b004e1530cedc0mr32224862pfu.18.1646213438591; Wed, 02 Mar 2022 01:30:38 -0800 (PST) Received: from localhost ([223.184.83.228]) by smtp.gmail.com with ESMTPSA id x6-20020a17090aa38600b001bce781ce03sm4554983pjp.18.2022.03.02.01.30.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 01:30:38 -0800 (PST) Date: Wed, 2 Mar 2022 15:00:36 +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: <20220302093036.qanm3vxuajinzbwb@vireshk-i7> References: <20220301093524.8870-1-lukasz.luba@arm.com> <20220301093524.8870-4-lukasz.luba@arm.com> <20220302074515.dqzoutfiobildiph@vireshk-i7> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716-391-311a52 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 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. -- viresh