All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] docs: Add initial documentation for devfreq
@ 2019-11-19 16:38 Leonard Crestez
  2019-11-19 20:22 ` Jonathan Corbet
  0 siblings, 1 reply; 2+ messages in thread
From: Leonard Crestez @ 2019-11-19 16:38 UTC (permalink / raw)
  To: Jonathan Corbet, Chanwoo Choi
  Cc: MyungJoo Ham, Kyungmin Park, Matthias Kaehlcke,
	Krzysztof Kozlowski, Artur Świgoń,
	Rafael J. Wysocki, Viresh Kumar, linux-doc, linux-pm

The devfreq subsystem has plenty of kernel-doc comments but they're not
currently included in sphinx documentation.

Add a minimal devfreq.rst file which mostly just includes kernel-doc
comments from devfreq source. This also exposes a number of kernel-doc
warnings on `make htmldocs`

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
---
 Documentation/driver-api/devfreq.rst | 30 ++++++++++++++++++++++++++++
 Documentation/driver-api/index.rst   |  1 +
 2 files changed, 31 insertions(+)
 create mode 100644 Documentation/driver-api/devfreq.rst

diff --git a/Documentation/driver-api/devfreq.rst b/Documentation/driver-api/devfreq.rst
new file mode 100644
index 000000000000..4a0bf87a3b13
--- /dev/null
+++ b/Documentation/driver-api/devfreq.rst
@@ -0,0 +1,30 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+========================
+Device Frequency Scaling
+========================
+
+Introduction
+------------
+
+This framework provides a standard kernel interface for Dynamic Voltage and
+Frequency Switching on arbitrary devices.
+
+It exposes controls for adjusting frequency through sysfs files which are
+similar to the cpufreq subsystem.
+
+Devices for which current usage can be measured can have their frequency
+automatically adjusted by governors.
+
+API
+---
+
+Device drivers need to initialize a :c:type:`devfreq_profile` and call the
+:c:func:`devfreq_add_device` function to create a :c:type:`devfreq` instance.
+
+.. kernel-doc:: include/linux/devfreq.h
+.. kernel-doc:: include/linux/devfreq-event.h
+.. kernel-doc:: drivers/devfreq/devfreq.c
+        :export:
+.. kernel-doc:: drivers/devfreq/devfreq-event.c
+        :export:
diff --git a/Documentation/driver-api/index.rst b/Documentation/driver-api/index.rst
index c6094377f1a3..0ebe205efd0c 100644
--- a/Documentation/driver-api/index.rst
+++ b/Documentation/driver-api/index.rst
@@ -38,10 +38,11 @@ available subsections can be seen below.
    spi
    i2c
    ipmb
    i3c/index
    interconnect
+   devfreq
    hsi
    edac
    scsi
    libata
    target
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] docs: Add initial documentation for devfreq
  2019-11-19 16:38 [PATCH] docs: Add initial documentation for devfreq Leonard Crestez
@ 2019-11-19 20:22 ` Jonathan Corbet
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Corbet @ 2019-11-19 20:22 UTC (permalink / raw)
  To: Leonard Crestez
  Cc: Chanwoo Choi, MyungJoo Ham, Kyungmin Park, Matthias Kaehlcke,
	Krzysztof Kozlowski, Artur Świgoń,
	Rafael J. Wysocki, Viresh Kumar, linux-doc, linux-pm

On Tue, 19 Nov 2019 18:38:56 +0200
Leonard Crestez <leonard.crestez@nxp.com> wrote:

> The devfreq subsystem has plenty of kernel-doc comments but they're not
> currently included in sphinx documentation.
> 
> Add a minimal devfreq.rst file which mostly just includes kernel-doc
> comments from devfreq source. This also exposes a number of kernel-doc
> warnings on `make htmldocs`
> 
> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
> ---
>  Documentation/driver-api/devfreq.rst | 30 ++++++++++++++++++++++++++++
>  Documentation/driver-api/index.rst   |  1 +
>  2 files changed, 31 insertions(+)
>  create mode 100644 Documentation/driver-api/devfreq.rst

Applied, thanks.

jon

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-19 20:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-19 16:38 [PATCH] docs: Add initial documentation for devfreq Leonard Crestez
2019-11-19 20:22 ` Jonathan Corbet

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.