From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7BD9AC433DF for ; Mon, 19 Oct 2020 00:57:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 280F2222BA for ; Mon, 19 Oct 2020 00:57:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HOu9dnEU" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730230AbgJSA5Z (ORCPT ); Sun, 18 Oct 2020 20:57:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727023AbgJSA5Y (ORCPT ); Sun, 18 Oct 2020 20:57:24 -0400 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E2DAC061755; Sun, 18 Oct 2020 17:57:24 -0700 (PDT) Received: by mail-lj1-x243.google.com with SMTP id c21so10080850ljj.0; Sun, 18 Oct 2020 17:57:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=sq/fKrB7mG48ri9jjuKCMbdKq/hUy3mDsrWp2NWD4FI=; b=HOu9dnEUMSvBwwEDFflgztbLkdZREqSdWavTEIDtuHSX8s2Hjp1sw/XWojB/TYvdGB qqdgEG0WSzQdz+9aKx/hC6bUCA6F7VPhQADm6kkEYjvIR/MaUwfO99i/EPyMfp3zus6e 41H0kDD90PmflO5C9fqW79xiRLAW3UMespDMv+GCwqTABfx+JcSEGK0cmn9yLzkQ/rdJ YqYhYnWTf/dAeUyy98xLE9UZHbZ0QCeAhQexYaJl855imtggi9tYQWImBbvygqB22WGU jvgNjRCLZZSoyRHM2ov/3+HenE9WiSDxHEPYjqEZFlYDvpQZph3G+YcuSMakzksMWUdX IQ3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=sq/fKrB7mG48ri9jjuKCMbdKq/hUy3mDsrWp2NWD4FI=; b=m9Q9g5ifcIkCzkNE/MMBaxbJYn0E2WjvSbeoOuKPPue2HcUiTqUefeWb00sbcDCEbG Wlf7vfhE9/6cp5AkTnJ4Q1nk3Az/ZdrTQUYn5UnH1JSN0FcLvB3ECYGvfx7cc2es/h9g qP1N7KT8CU941AuZUclC5VRupIpBPQxSA9UOOMyVEhp5m/riZfxEeRxVfP33+63eWkJx 8yL0JbSYAZjjUdRTeBRyuBpJ8G7imlcRDMxeBzcEH2Ea6LTAV+tlm7gxwhHiYSJHTH9M LWrnDFW2Vi9vXqY85jBryW/xrH0JAVwSgQsHtrvvVbVnj+Ghn2eM7easCU0xlrdRhwig TsNQ== X-Gm-Message-State: AOAM532wdOTuBVSawTBxoxBqZL+iXrcQYbYH9mEBCFbW8Yb036wnK+bb n1/pvJLYCJYEhi5nMARn5T0= X-Google-Smtp-Source: ABdhPJyK8mSOtak89RU8lRlRZ78DRh+qQB6CLZw71ATAXOw9lpLzBNtL/IBgKKlGwlOmbsJ7CvYCyA== X-Received: by 2002:a2e:9847:: with SMTP id e7mr2797266ljj.46.1603069042955; Sun, 18 Oct 2020 17:57:22 -0700 (PDT) Received: from [192.168.2.145] (109-252-193-186.dynamic.spd-mgts.ru. [109.252.193.186]) by smtp.googlemail.com with ESMTPSA id h20sm2990253lfc.264.2020.10.18.17.57.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 18 Oct 2020 17:57:22 -0700 (PDT) Subject: Re: [PATCH v3 1/2] PM / devfreq: Add governor feature flag To: Chanwoo Choi , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org Cc: leonard.crestez@nxp.com, lukasz.luba@arm.com, enric.balletbo@collabora.com, hl@rock-chips.com, thierry.reding@gmail.com, jonathanh@nvidia.com, abel.vesa@nxp.com, k.konieczny@samsung.com, b.zolnierkie@samsung.com, chanwoo@kernel.org, myungjoo.ham@samsung.com, kyungmin.park@samsung.com References: <20201007050703.20759-1-cw00.choi@samsung.com> <20201007050703.20759-2-cw00.choi@samsung.com> From: Dmitry Osipenko Message-ID: <83b952ab-a25e-8984-8804-1dd990eec835@gmail.com> Date: Mon, 19 Oct 2020 03:57:21 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201007050703.20759-2-cw00.choi@samsung.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 07.10.2020 08:07, Chanwoo Choi пишет: > The devfreq governor is able to have the specific flag as follows > in order to implement the specific feature. For example, devfreq allows > user to change the governors on runtime via sysfs interface. > But, if devfreq device uses 'passive' governor, don't allow user to change > the governor. For this case, define the DEVFREQ_GOV_FLAT_IMMUTABLE s/DEVFREQ_GOV_FLAT/DEVFREQ_GOV_FLAG/ ... > /** > * struct devfreq_governor - Devfreq policy governor > * @node: list node - contains registered devfreq governors > * @name: Governor's name > - * @immutable: Immutable flag for governor. If the value is 1, > - * this governor is never changeable to other governor. > - * @interrupt_driven: Devfreq core won't schedule polling work for this > - * governor if value is set to 1. > + * @flag: Governor's feature flag > * @get_target_freq: Returns desired operating frequency for the device. > * Basically, get_target_freq will run > * devfreq_dev_profile.get_dev_status() to get the > @@ -50,8 +57,7 @@ struct devfreq_governor { > struct list_head node; > > const char name[DEVFREQ_NAME_LEN]; > - const unsigned int immutable; > - const unsigned int interrupt_driven; > + const u64 flag; A plural form of flag(s) is more common, IMO. It's also possible to use a single bit:1 for the struct members. Thus, could you please explain what are the benefits of the "flag"?