diff options
author | Ezequiel Garcia <ezequiel@collabora.com> | 2020-01-24 23:35:43 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-03-02 17:11:40 +0300 |
commit | 8fd390b89cc8ca786bc1b66d8a76512a6068b081 (patch) | |
tree | fb5f0c974505a685f67ced9dd9ff1e5c6970c1bb /Documentation | |
parent | 8fb12ce2ec9d569e1b3051f01cee13ff27e29466 (diff) | |
download | linux-8fd390b89cc8ca786bc1b66d8a76512a6068b081.tar.xz |
media: Split v4l2_pipeline_pm_use into v4l2_pipeline_pm_{get, put}
Currently, v4l2_pipeline_pm_use() prototype is:
int v4l2_pipeline_pm_use(struct media_entity *entity, int use)
Where the 'use' argument shall only be set to '1' for enable/power-on,
or to '0' for disable/power-off. The integer return is specified
as only meaningful when 'use' is set to '1'.
Let's enforce this semantic by splitting the function in two:
v4l2_pipeline_pm_get and v4l2_pipeline_pm_put. This is done
for several reasons.
It makes the API easier to use (or harder to misuse).
It removes the constraint on the values the 'use' argument
shall take. Also, it removes the need to constraint
the return value, by making v4l2_pipeline_pm_put void return.
And last, it's more consistent with other kernel APIs, such
as the runtime pm APIs, which makes the code more symmetric.
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/media/kapi/csi2.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Documentation/media/kapi/csi2.rst b/Documentation/media/kapi/csi2.rst index 030a5c41ec75..e111ff7bfd3d 100644 --- a/Documentation/media/kapi/csi2.rst +++ b/Documentation/media/kapi/csi2.rst @@ -74,7 +74,7 @@ Before the receiver driver may enable the CSI-2 transmitter by using the :c:type:`v4l2_subdev_video_ops`->s_stream(), it must have powered the transmitter up by using the :c:type:`v4l2_subdev_core_ops`->s_power() callback. This may take -place either indirectly by using :c:func:`v4l2_pipeline_pm_use` or +place either indirectly by using :c:func:`v4l2_pipeline_pm_get` or directly. Formats |