linux-stable/Documentation
Chanwoo Choi 5f1a9066fc PM / devfreq: Add governor attribute flag for specifc sysfs nodes
DEVFREQ supports the default governors like performance, simple_ondemand 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 the available attributes.

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.

When adding the governor, can add the following attributes
according to the governor feature.

[Definition for speific sysfs attributes]
- DEVFREQ_GOV_ATTR_POLLING_INTERVAL to update polling interval for timer.
  : /sys/class/devfreq/[devfreq dev name]/polling_interval
- DEVFREQ_GOV_ATTR_TIMER to change the type of timer on either deferrable
  or dealyed timer.
  : /sys/class/devfreq/[devfreq dev name]/timer

And all devfreq governors have to support the following common attributes.
The common attributes are added to devfreq class by default.
- governor
- available_governors
- available_frequencies
- cur_freq
- target_freq
- min_freq
- max_freq
- trans_stat

[Table of governor attribute flags 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
------------------------------------------------------------------------------

Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Tested-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2020-10-26 11:46:54 +09:00
..
ABI PM / devfreq: Add governor attribute flag for specifc sysfs nodes 2020-10-26 11:46:54 +09:00
accounting
admin-guide xen: branch for v5.10-rc1c 2020-10-25 10:55:35 -07:00
arm As hoped, things calmed down for docs this cycle; fewer changes and almost 2020-10-12 16:21:29 -07:00
arm64 A handful of late-arriving documentation fixes. 2020-10-23 17:13:53 -07:00
block block-5.10-2020-10-24 2020-10-24 12:46:42 -07:00
bpf bpf: Migrate from patchwork.ozlabs.org to patchwork.kernel.org. 2020-10-11 22:05:47 +02:00
cdrom
core-api dma-mapping: document dma_{alloc,free}_pages 2020-10-23 12:07:46 +02:00
cpu-freq
crypto crypto: af_alg - add extra parameters for DRBG interface 2020-09-25 17:48:52 +10:00
dev-tools linux-kselftest-kunit-5.10-rc1 2020-10-18 14:45:59 -07:00
devicetree ARM: Devicetree updates 2020-10-24 10:44:18 -07:00
doc-guide docs: kerneldoc.py: add support for kerneldoc -nosymbol 2020-10-15 07:49:38 +02:00
driver-api A handful of late-arriving documentation fixes. 2020-10-23 17:13:53 -07:00
fault-injection A handful of late-arriving documentation fixes. 2020-10-23 17:13:53 -07:00
fb drm fixes (round two) for 5.10-rc1 2020-10-23 13:56:34 -07:00
features s390 updates for the 5.10 merge window 2020-10-16 12:36:38 -07:00
filesystems The siginificant new ext4 feature this time around is Harshad's new 2020-10-22 10:31:08 -07:00
firmware-guide
firmware_class
fpga
gpu drm fixes for 5.10-rc1 2020-10-20 10:19:02 -07:00
hid
hwmon - New Drivers 2020-10-14 15:56:58 -07:00
i2c Documentation: i2c: add testunit docs to index 2020-10-05 22:57:45 +02:00
ia64
ide
iio
infiniband
input
isdn
kbuild kbuild: doc: describe proper script invocation 2020-10-13 18:38:26 -07:00
kernel-hacking
leds
litmus-tests
livepatch
locking
m68k
maintainer
mhi
mips dt: Remove booting-without-of.rst 2020-10-13 13:33:16 -05:00
misc-devices
netlabel
networking Fixes for 5.10-rc1 from the networking tree: 2020-10-23 12:05:49 -07:00
nios2
nvdimm
openrisc
parisc
PCI Documentation: better locations for sysfs-pci, sysfs-tagging 2020-10-09 09:33:23 -06:00
pcmcia
power PCI/PM: Rename pci_dev.d3_delay to d3hot_delay 2020-09-29 14:21:50 -05:00
powerpc docs updates for v5.10-rc1 2020-10-16 15:02:21 -07:00
process A handful of late-arriving documentation fixes. 2020-10-23 17:13:53 -07:00
RCU Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu 2020-10-09 08:21:56 +02:00
riscv
s390
scheduler
scsi SPDX patches for 5.10-rc1 2020-10-14 16:19:42 -07:00
security
sh dt: Remove booting-without-of.rst 2020-10-13 13:33:16 -05:00
sound docs: writing-an-alsa-driver.rst: fix some bad c:func: markups 2020-10-15 07:49:43 +02:00
sparc
sphinx docs: get rid of :c:type explicit declarations for structs 2020-10-15 07:49:40 +02:00
sphinx-static
spi
staging
target
timers
trace docs updates for v5.10-rc1 2020-10-16 15:02:21 -07:00
translations A handful of late-arriving documentation fixes. 2020-10-23 17:13:53 -07:00
usb
userspace-api docs updates for v5.10-rc1 2020-10-16 15:02:21 -07:00
virt ARM: 2020-10-23 11:17:56 -07:00
vm A handful of late-arriving documentation fixes. 2020-10-23 17:13:53 -07:00
w1 docs: w1: w1_therm: Fix broken xref, mistakes, clarify text 2020-10-08 09:47:15 +02:00
watchdog
x86 A handful of late-arriving documentation fixes. 2020-10-23 17:13:53 -07:00
xtensa
.gitignore
asm-annotations.rst
atomic_bitops.txt
atomic_t.txt
Changes
CodingStyle
conf.py docs: conf.py: change the Sphinx 3.x+ text 2020-10-15 07:49:45 +02:00
COPYING-logo
docutils.conf
dontdiff
index.rst
Kconfig
logo.gif
Makefile
memory-barriers.txt
SubmittingPatches
watch_queue.rst