bcm27xx: add support for linux v5.15
[openwrt/staging/chunkeey.git] / target / linux / bcm27xx / patches-5.15 / 950-0768-media-media.h-Add-new-media-link-type.patch
1 From 895e81564296a55a0691066a1931fd38a0139f63 Mon Sep 17 00:00:00 2001
2 From: Daniel Scally <djrscally@gmail.com>
3 Date: Wed, 2 Mar 2022 22:03:01 +0000
4 Subject: [PATCH] media: media.h: Add new media link type
5
6 To describe in the kernel the connection between devices and their
7 supporting peripherals (for example, a camera sensor and the vcm
8 driving the focusing lens for it), add a new type of media link
9 to introduce the concept of these ancillary links.
10
11 Add some elements to the uAPI documentation to explain the new link
12 type, their purpose and some aspects of their current implementation.
13
14 Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
15 Signed-off-by: Daniel Scally <djrscally@gmail.com>
16 ---
17 .../media/mediactl/media-controller-model.rst | 6 ++++++
18 .../media/mediactl/media-types.rst | 17 ++++++++++++-----
19 include/uapi/linux/media.h | 1 +
20 3 files changed, 19 insertions(+), 5 deletions(-)
21
22 --- a/Documentation/userspace-api/media/mediactl/media-controller-model.rst
23 +++ b/Documentation/userspace-api/media/mediactl/media-controller-model.rst
24 @@ -33,3 +33,9 @@ are:
25
26 - An **interface link** is a point-to-point bidirectional control
27 connection between a Linux Kernel interface and an entity.
28 +
29 +- An **ancillary link** is a point-to-point connection denoting that two
30 + entities form a single logical unit. For example this could represent the
31 + fact that a particular camera sensor and lens controller form a single
32 + physical module, meaning this lens controller drives the lens for this
33 + camera sensor.
34 \ No newline at end of file
35 --- a/Documentation/userspace-api/media/mediactl/media-types.rst
36 +++ b/Documentation/userspace-api/media/mediactl/media-types.rst
37 @@ -412,14 +412,21 @@ must be set for every pad.
38 is set by drivers and is read-only for applications.
39
40 * - ``MEDIA_LNK_FL_LINK_TYPE``
41 - - This is a bitmask that defines the type of the link. Currently,
42 - two types of links are supported:
43 + - This is a bitmask that defines the type of the link. The following
44 + link types are currently supported:
45
46 .. _MEDIA-LNK-FL-DATA-LINK:
47
48 - ``MEDIA_LNK_FL_DATA_LINK`` if the link is between two pads
49 + ``MEDIA_LNK_FL_DATA_LINK`` for links that represent a data connection
50 + between two pads.
51
52 .. _MEDIA-LNK-FL-INTERFACE-LINK:
53
54 - ``MEDIA_LNK_FL_INTERFACE_LINK`` if the link is between an
55 - interface and an entity
56 + ``MEDIA_LNK_FL_INTERFACE_LINK`` for links that associate an entity to its
57 + interface.
58 +
59 + .. _MEDIA-LNK-FL-ANCILLARY-LINK:
60 +
61 + ``MEDIA_LNK_FL_ANCILLARY_LINK`` for links that represent a physical
62 + relationship between two entities. The link may or may not be ummutable, so
63 + applications must not assume either case.
64 \ No newline at end of file
65 --- a/include/uapi/linux/media.h
66 +++ b/include/uapi/linux/media.h
67 @@ -226,6 +226,7 @@ struct media_pad_desc {
68 #define MEDIA_LNK_FL_LINK_TYPE (0xf << 28)
69 # define MEDIA_LNK_FL_DATA_LINK (0 << 28)
70 # define MEDIA_LNK_FL_INTERFACE_LINK (1 << 28)
71 +# define MEDIA_LNK_FL_ANCILLARY_LINK (2 << 28)
72
73 struct media_link_desc {
74 struct media_pad_desc source;