Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3069008pxu; Mon, 19 Oct 2020 03:09:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyN4aoKqqDmogkTrnEKXei4i7FDFp1LobLkIh+8RK7KkD6siMLjPaCUSS3f92HuBMxXZNZJ X-Received: by 2002:a17:907:4365:: with SMTP id nd5mr17391304ejb.56.1603102147571; Mon, 19 Oct 2020 03:09:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603102147; cv=none; d=google.com; s=arc-20160816; b=IsnkK4kj5AvawCHqFwa0EWE9xsnNYeq4wgWaKC8DPOHWiJN8QUUl9O+3NAydaY1eVs C692YpIm4Msq+tW1aUFHudVWlpvF2R0RnqjarvU+YAiJwIiAqISY3KYnwSCmjUz0oMIL UZLHiJzB0o7NNKQN+rdtYDdLPHh16+9+z4UIsg1IseNHHqONvMGf5voE6yQCUL0YRjHA boaNom8PqfqV/FclW4XxcrnDJsXhdf3orbicwHZgiodBdY/wXATjV64AERPbkv8A1dFz LXAK8F0AYLSEmjsdcrMinUuaKdTZ/Zd6X+IZkH6wrr0qtPF3pfY+kB/136FhpzapkRCA /PLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type :content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:organization:from:cc:to:subject :dkim-signature:dkim-filter; bh=Fu9FxWTZj8KK0hKciFpjNBpeDe9Ru6cUtyGHj3g2giU=; b=Z1ybQdwScrdRlV2/CePyVhZ0+9hs/vgmpBqSorwIXIu4y5QJ0yFfk3d3OhXrryYzW/ m3td/5DL1rgbIO/VILjHkFm0sDLRTIqEzhsUVD/U37T/Li3lIVr8CIKlSq+AVVNtaq7U jLtH+5ycS1T0KWcp9IXh/FXpxNWrSAezTFIVRnTI4xjnI/bJmAFKwy0sFJOPB3jcc1Yy DTPoMztp3KW5VojnevW9ORsBMWeYXmr4T840W5waQJsXPy7WnewX3EFbX8X6zVQRxHTX iU2Fiuof6hRQhuXJAHrZZDVumo+o8Iz/aFbn1JPKaHmOHEL1q7PxImZO4IOytayn3lab JnMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=LbAd6nh8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x18si7442757edl.321.2020.10.19.03.08.43; Mon, 19 Oct 2020 03:09:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=LbAd6nh8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731552AbgJSDkS (ORCPT + 99 others); Sun, 18 Oct 2020 23:40:18 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:58935 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731534AbgJSDkS (ORCPT ); Sun, 18 Oct 2020 23:40:18 -0400 Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20201019034014epoutp023ad855a5153bf02b3f2c0dc1730fed51~-R7AgRN390473404734epoutp028 for ; Mon, 19 Oct 2020 03:40:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20201019034014epoutp023ad855a5153bf02b3f2c0dc1730fed51~-R7AgRN390473404734epoutp028 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1603078814; bh=Fu9FxWTZj8KK0hKciFpjNBpeDe9Ru6cUtyGHj3g2giU=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=LbAd6nh8ZKSWVqxd6i/kuSVhwNM6rO8OW4ctvJUhhlZC815H5mrj2P5v0NRkCNrwm mOLrsGcSSGTfhm5Xox3AHRu2oeVWl+gottJXGUHVm8F9CJt4YC4U+XFoboGAC8n2uj oJEOMcX3kdOhRPBzCn4ITRhzt0fhVgN7xXwRhKbE= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20201019034013epcas1p2f08a08b0958a3c9fc496ee28d3493bd4~-R6-1rdTm2094920949epcas1p2B; Mon, 19 Oct 2020 03:40:13 +0000 (GMT) Received: from epsmges1p5.samsung.com (unknown [182.195.40.157]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4CF2Zf5vwGzMqYks; Mon, 19 Oct 2020 03:40:10 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p5.samsung.com (Symantec Messaging Gateway) with SMTP id 09.1C.09577.A9A0D8F5; Mon, 19 Oct 2020 12:40:10 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas1p4.samsung.com (KnoxPortal) with ESMTPA id 20201019034009epcas1p442daef3ca119825a1faebc541fc559eb~-R68ixOhA2048620486epcas1p4h; Mon, 19 Oct 2020 03:40:09 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20201019034009epsmtrp14a627db8699bd6ce7d6e65103969f4a6~-R68h409M1670516705epsmtrp1S; Mon, 19 Oct 2020 03:40:09 +0000 (GMT) X-AuditID: b6c32a39-c13ff70000002569-10-5f8d0a9aff36 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id CD.AF.08604.99A0D8F5; Mon, 19 Oct 2020 12:40:09 +0900 (KST) Received: from [10.113.221.102] (unknown [10.113.221.102]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20201019034009epsmtip1436bd147693d86079a9e245c2afe1972~-R68GwcsU0772407724epsmtip13; Mon, 19 Oct 2020 03:40:09 +0000 (GMT) Subject: Re: [PATCH v3 1/2] PM / devfreq: Add governor feature flag To: Dmitry Osipenko , 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 From: Chanwoo Choi Organization: Samsung Electronics Message-ID: <9267f046-1adc-b43d-51ef-2e0ad41dc322@samsung.com> Date: Mon, 19 Oct 2020 12:53:34 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Thunderbird/59.0 MIME-Version: 1.0 In-Reply-To: <83b952ab-a25e-8984-8804-1dd990eec835@gmail.com> Content-Language: en-US Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrFJsWRmVeSWpSXmKPExsWy7bCmvu4srt54g8VTdC2WXTrKaLFxxnpW i4k3rrBYrP74mNFize1DjBY/NpxitmiZtYjFYsGnGawWZ5vesFusuPuR1eLyrjlsFp97jzBa dH6ZxWaxsKmF3eJ24wo2i5+75rE4CHismbeG0WPH3SWMHjtn3WX32LSqk82jt/kdm8fGdzuY PP7O2s/i0bdlFaPH501yAZxR2TYZqYkpqUUKqXnJ+SmZeem2St7B8c7xpmYGhrqGlhbmSgp5 ibmptkouPgG6bpk5QH8oKZQl5pQChQISi4uV9O1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AAA= X-CMS-MailID: 20201019034009epcas1p442daef3ca119825a1faebc541fc559eb X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20201007045340epcas1p4e63955385b1841f44e7a07e2d5d962c4 References: <20201007050703.20759-1-cw00.choi@samsung.com> <20201007050703.20759-2-cw00.choi@samsung.com> <83b952ab-a25e-8984-8804-1dd990eec835@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/19/20 9:57 AM, Dmitry Osipenko wrote: > 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. When need to add more feature flag, I prefer to add the definition instead of changing the structure. I think it is better. > > 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"? I think that anyone might add the some optional feature. So, I used 'flag' for the extensibility. -- Best Regards, Chanwoo Choi Samsung Electronics