diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-07-22 08:38:58 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-07-23 07:04:21 -0400 |
commit | b67b81d75056fe0e44d4122e6885b446c881d514 (patch) | |
tree | d57fbd7360e5b94c1e2729475d76eace8c462543 | |
parent | 46f74f1d3efe6608a6cfc7e3bb653b5f11f87a15 (diff) |
[media] move V4L2 clocks to a separate .rst file
Move the v4l2 clocks stuff from v4l2-framework to a separate
file and adds an attention that came from the v4l2-clk.h.
Note: as this is meant to be a temporary kAPI, and it is
used only by two drivers (soc_camera and em28xx), where
the first one is in deprecation process, it probably not
a worth effort to document its header.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r-- | Documentation/media/kapi/v4l2-clocks.rst | 29 | ||||
-rw-r--r-- | Documentation/media/kapi/v4l2-core.rst | 1 | ||||
-rw-r--r-- | Documentation/media/kapi/v4l2-framework.rst | 25 |
3 files changed, 30 insertions, 25 deletions
diff --git a/Documentation/media/kapi/v4l2-clocks.rst b/Documentation/media/kapi/v4l2-clocks.rst new file mode 100644 index 000000000000..b8a895860a8a --- /dev/null +++ b/Documentation/media/kapi/v4l2-clocks.rst | |||
@@ -0,0 +1,29 @@ | |||
1 | V4L2 clocks | ||
2 | ----------- | ||
3 | |||
4 | .. attention:: | ||
5 | |||
6 | This is a temporary API and it shall be replaced by the generic | ||
7 | clock API, when the latter becomes widely available. | ||
8 | |||
9 | Many subdevices, like camera sensors, TV decoders and encoders, need a clock | ||
10 | signal to be supplied by the system. Often this clock is supplied by the | ||
11 | respective bridge device. The Linux kernel provides a Common Clock Framework for | ||
12 | this purpose. However, it is not (yet) available on all architectures. Besides, | ||
13 | the nature of the multi-functional (clock, data + synchronisation, I2C control) | ||
14 | connection of subdevices to the system might impose special requirements on the | ||
15 | clock API usage. E.g. V4L2 has to support clock provider driver unregistration | ||
16 | while a subdevice driver is holding a reference to the clock. For these reasons | ||
17 | a V4L2 clock helper API has been developed and is provided to bridge and | ||
18 | subdevice drivers. | ||
19 | |||
20 | The API consists of two parts: two functions to register and unregister a V4L2 | ||
21 | clock source: v4l2_clk_register() and v4l2_clk_unregister() and calls to control | ||
22 | a clock object, similar to the respective generic clock API calls: | ||
23 | v4l2_clk_get(), v4l2_clk_put(), v4l2_clk_enable(), v4l2_clk_disable(), | ||
24 | v4l2_clk_get_rate(), and v4l2_clk_set_rate(). Clock suppliers have to provide | ||
25 | clock operations that will be called when clock users invoke respective API | ||
26 | methods. | ||
27 | |||
28 | It is expected that once the CCF becomes available on all relevant | ||
29 | architectures this API will be removed. | ||
diff --git a/Documentation/media/kapi/v4l2-core.rst b/Documentation/media/kapi/v4l2-core.rst index 67eaf0c0b6b6..c69d167bce7a 100644 --- a/Documentation/media/kapi/v4l2-core.rst +++ b/Documentation/media/kapi/v4l2-core.rst | |||
@@ -9,6 +9,7 @@ Video2Linux devices | |||
9 | v4l2-controls | 9 | v4l2-controls |
10 | v4l2-device | 10 | v4l2-device |
11 | v4l2-fh | 11 | v4l2-fh |
12 | v4l2-clocks | ||
12 | v4l2-dv-timings | 13 | v4l2-dv-timings |
13 | v4l2-event | 14 | v4l2-event |
14 | v4l2-flash-led-class | 15 | v4l2-flash-led-class |
diff --git a/Documentation/media/kapi/v4l2-framework.rst b/Documentation/media/kapi/v4l2-framework.rst index 8b4f684e1a7a..7f4f26e666a2 100644 --- a/Documentation/media/kapi/v4l2-framework.rst +++ b/Documentation/media/kapi/v4l2-framework.rst | |||
@@ -79,28 +79,3 @@ and the v4l2_fh struct keeps track of filehandle instances. | |||
79 | The V4L2 framework also optionally integrates with the media framework. If a | 79 | The V4L2 framework also optionally integrates with the media framework. If a |
80 | driver sets the struct v4l2_device mdev field, sub-devices and video nodes | 80 | driver sets the struct v4l2_device mdev field, sub-devices and video nodes |
81 | will automatically appear in the media framework as entities. | 81 | will automatically appear in the media framework as entities. |
82 | |||
83 | V4L2 clocks | ||
84 | ----------- | ||
85 | |||
86 | Many subdevices, like camera sensors, TV decoders and encoders, need a clock | ||
87 | signal to be supplied by the system. Often this clock is supplied by the | ||
88 | respective bridge device. The Linux kernel provides a Common Clock Framework for | ||
89 | this purpose. However, it is not (yet) available on all architectures. Besides, | ||
90 | the nature of the multi-functional (clock, data + synchronisation, I2C control) | ||
91 | connection of subdevices to the system might impose special requirements on the | ||
92 | clock API usage. E.g. V4L2 has to support clock provider driver unregistration | ||
93 | while a subdevice driver is holding a reference to the clock. For these reasons | ||
94 | a V4L2 clock helper API has been developed and is provided to bridge and | ||
95 | subdevice drivers. | ||
96 | |||
97 | The API consists of two parts: two functions to register and unregister a V4L2 | ||
98 | clock source: v4l2_clk_register() and v4l2_clk_unregister() and calls to control | ||
99 | a clock object, similar to the respective generic clock API calls: | ||
100 | v4l2_clk_get(), v4l2_clk_put(), v4l2_clk_enable(), v4l2_clk_disable(), | ||
101 | v4l2_clk_get_rate(), and v4l2_clk_set_rate(). Clock suppliers have to provide | ||
102 | clock operations that will be called when clock users invoke respective API | ||
103 | methods. | ||
104 | |||
105 | It is expected that once the CCF becomes available on all relevant | ||
106 | architectures this API will be removed. | ||