From: Dmitry Osipenko <digetx@gmail.com>
To: Chanwoo Choi <cw00.choi@samsung.com>,
linux-pm@vger.kernel.org, linux-kernel@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, chanwoo@kernel.org, myungjoo.ham@samsung.com,
kyungmin.park@samsung.com,
"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] PM / devfreq: Add governor flags to clarify the features
Date: Mon, 13 Jul 2020 13:37:11 +0300 [thread overview]
Message-ID: <746837bc-6734-3e52-453f-2b59bbca0230@gmail.com> (raw)
In-Reply-To: <20200713083113.5595-3-cw00.choi@samsung.com>
13.07.2020 11:31, Chanwoo Choi пишет:
> DEVFREQ supports the default governors like performance, powersave and also
> allows the devfreq driver to add their own governor like tegra30-devfreq.c
> according to their requirement. In result, some sysfs attributes are
> useful or not useful. Prior to that the user can access all sysfs attributes
> regardless of availability.
>
> So, clarify the access permission of sysfs attributes according to governor.
> When adding the devfreq governor, can specify the available attribute
> information by using DEVFREQ_GOV_ATTR_* constant variable. The user can
> read or write the sysfs attributes in accordance to the specified attributes.
>
> /* Devfreq governor flags for attributes and features */
> [Definition for sysfs attributes]
> - DEVFREQ_GOV_ATTR_GOVERNOR
> - DEVFREQ_GOV_ATTR_AVAIL_GOVERNORS
> - DEVFREQ_GOV_ATTR_AVAIL_FREQUENCIES
> - DEVFREQ_GOV_ATTR_CUR_FREQ
> - DEVFREQ_GOV_ATTR_TARGET_FREQ
> - DEVFREQ_GOV_ATTR_MIN_FREQ
> - DEVFREQ_GOV_ATTR_MAX_FREQ
> - DEVFREQ_GOV_ATTR_TRANS_STAT
> - DEVFREQ_GOV_ATTR_POLLING_INTERVAL
> - DEVFREQ_GOV_ATTR_TIMER
>
> Also, 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
> and set it to flag of passive governor.
>
> [Definition for governor flag]
> - DEVFREQ_GOV_FLAG_IMMUTABLE
> : If immutable flag is set, governor is never changeable to other governors.
> - DEVFREQ_GOV_FLAG_IRQ_DRIVEN
> : Devfreq core won't schedule polling work for this governor if value is set.
>
> [Table of governor flag for devfreq governors]
> ------------------------------------------------------------------------------
> | simple | perfor | power | user | passive | tegra30
> | ondemand | mance | save | space| |
> ------------------------------------------------------------------------------
> governor | O | O | O | O | O | O
> available_governors | O | O | O | O | O | O
> available_frequencies | O | O | O | O | O | O
> cur_freq | O | O | O | O | O | O
> target_freq | O | O | O | O | O | O
> min_freq | O | O | O | O | O | O
> max_freq | O | O | O | O | O | O
> trans_stat | O | O | O | O | O | O
> --------------------------------------------------------
> polling_interval | O | X | X | X | X | O
> timer | O | X | X | X | X | X
> ------------------------------------------------------------------------------
> immutable | X | X | X | X | O | O
> interrupt_driven | X(polling)| X | X | X | X | O (irq)
> ------------------------------------------------------------------------------
>
> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
> ---
Hello, Chanwoo! I tested this series on NVIDIA Tegra30 and everything
working fine!
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Tested-by: Dmitry Osipenko <digetx@gmail.com>
BTW, I'm curious what do you think about hiding the unsupported debugfs
attributes per-device instead of returning the -EACCES?
next prev parent reply other threads:[~2020-07-13 10:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20200713081943epcas1p451280630c83a47b2687ab84d28ccdea0@epcas1p4.samsung.com>
2020-07-13 8:31 ` [PATCH v2 0/2] PM / devfreq: Add governor flags Chanwoo Choi
[not found] ` <CGME20200713081943epcas1p2a618d5a2e87610be7442e1fa584076cf@epcas1p2.samsung.com>
2020-07-13 8:31 ` [PATCH v2 1/2] PM / devfreq: Clean up the devfreq instance name in sysfs attr Chanwoo Choi
2020-07-24 1:42 ` Chanwoo Choi
[not found] ` <CGME20200713081944epcas1p22871b6d8a9455226e6cccd08ac0baa73@epcas1p2.samsung.com>
2020-07-13 8:31 ` [PATCH v2 2/2] PM / devfreq: Add governor flags to clarify the features Chanwoo Choi
2020-07-13 10:37 ` Dmitry Osipenko [this message]
2020-07-13 12:26 ` Chanwoo Choi
2020-07-13 14:26 ` Dmitry Osipenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=746837bc-6734-3e52-453f-2b59bbca0230@gmail.com \
--to=digetx@gmail.com \
--cc=abel.vesa@nxp.com \
--cc=chanwoo@kernel.org \
--cc=cw00.choi@samsung.com \
--cc=enric.balletbo@collabora.com \
--cc=hl@rock-chips.com \
--cc=jonathanh@nvidia.com \
--cc=kyungmin.park@samsung.com \
--cc=leonard.crestez@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=myungjoo.ham@samsung.com \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).