Skip to content

Commit eecaa59

Browse files
djrscallypopcornmix
authored andcommitted
media: media.h: Add new media link type
To describe in the kernel the connection between devices and their supporting peripherals (for example, a camera sensor and the vcm driving the focusing lens for it), add a new type of media link to introduce the concept of these ancillary links. Add some elements to the uAPI documentation to explain the new link type, their purpose and some aspects of their current implementation. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Daniel Scally <djrscally@gmail.com>
1 parent aba971c commit eecaa59

3 files changed

Lines changed: 19 additions & 5 deletions

File tree

‎Documentation/userspace-api/media/mediactl/media-controller-model.rst‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,9 @@ are:
3333

3434
- An **interface link** is a point-to-point bidirectional control
3535
connection between a Linux Kernel interface and an entity.
36+
37+
- An **ancillary link** is a point-to-point connection denoting that two
38+
entities form a single logical unit. For example this could represent the
39+
fact that a particular camera sensor and lens controller form a single
40+
physical module, meaning this lens controller drives the lens for this
41+
camera sensor.

‎Documentation/userspace-api/media/mediactl/media-types.rst‎

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -412,14 +412,21 @@ must be set for every pad.
412412
is set by drivers and is read-only for applications.
413413

414414
* - ``MEDIA_LNK_FL_LINK_TYPE``
415-
- This is a bitmask that defines the type of the link. Currently,
416-
two types of links are supported:
415+
- This is a bitmask that defines the type of the link. The following
416+
link types are currently supported:
417417

418418
.. _MEDIA-LNK-FL-DATA-LINK:
419419

420-
``MEDIA_LNK_FL_DATA_LINK`` if the link is between two pads
420+
``MEDIA_LNK_FL_DATA_LINK`` for links that represent a data connection
421+
between two pads.
421422

422423
.. _MEDIA-LNK-FL-INTERFACE-LINK:
423424

424-
``MEDIA_LNK_FL_INTERFACE_LINK`` if the link is between an
425-
interface and an entity
425+
``MEDIA_LNK_FL_INTERFACE_LINK`` for links that associate an entity to its
426+
interface.
427+
428+
.. _MEDIA-LNK-FL-ANCILLARY-LINK:
429+
430+
``MEDIA_LNK_FL_ANCILLARY_LINK`` for links that represent a physical
431+
relationship between two entities. The link may or may not be ummutable, so
432+
applications must not assume either case.

‎include/uapi/linux/media.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ struct media_pad_desc {
226226
#define MEDIA_LNK_FL_LINK_TYPE (0xf << 28)
227227
# define MEDIA_LNK_FL_DATA_LINK (0 << 28)
228228
# define MEDIA_LNK_FL_INTERFACE_LINK (1 << 28)
229+
# define MEDIA_LNK_FL_ANCILLARY_LINK (2 << 28)
229230

230231
struct media_link_desc {
231232
struct media_pad_desc source;

0 commit comments

Comments
 (0)