History

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.

Daniel Scally committed 4 years ago

Commit 4e4dab41 parent af3ed783 files · +19 −5Browse files

Unified · Split

3 files
  1. Documentation/userspace-api/media/mediactl/media-controller-model.rst +6 −0
  2. Documentation/userspace-api/media/mediactl/media-types.rst +12 −5
  3. include/uapi/linux/media.h +1 −0
Documentation/userspace-api/media/mediactl/media-controller-model.rst+6−0
@@ -33,3 +33,9 @@ are: · 32 unmodified lines
33 33
34- An **interface link** is a point-to-point bidirectional control34- An **interface link** is a point-to-point bidirectional control
35 connection between a Linux Kernel interface and an entity.35 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+12−5
@@ -412,14 +412,21 @@ must be set for every pad. · 411 unmodified lines
412 is set by drivers and is read-only for applications.412 is set by drivers and is read-only for applications.
413 413
414 * - ``MEDIA_LNK_FL_LINK_TYPE``414 * - ``MEDIA_LNK_FL_LINK_TYPE``
415 - This is a bitmask that defines the type of the link. Currently,415 - This is a bitmask that defines the type of the link. The following
416 two types of links are supported:416 link types are currently supported:
417 417
418 .. _MEDIA-LNK-FL-DATA-LINK:418 .. _MEDIA-LNK-FL-DATA-LINK:
419 419
420 ``MEDIA_LNK_FL_DATA_LINK`` if the link is between two pads420 ``MEDIA_LNK_FL_DATA_LINK`` for links that represent a data connection
421 between two pads.
421 422
422 .. _MEDIA-LNK-FL-INTERFACE-LINK:423 .. _MEDIA-LNK-FL-INTERFACE-LINK:
423 424
424 ``MEDIA_LNK_FL_INTERFACE_LINK`` if the link is between an425 ``MEDIA_LNK_FL_INTERFACE_LINK`` for links that associate an entity to its
425 interface and an entity426 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
432 immutable, so applications must not assume either case.
include/uapi/linux/media.h+1−0
@@ -226,6 +226,7 @@ struct media_pad_desc { · 225 unmodified lines
226#define MEDIA_LNK_FL_LINK_TYPE (0xf << 28)226#define MEDIA_LNK_FL_LINK_TYPE (0xf << 28)
227# define MEDIA_LNK_FL_DATA_LINK (0 << 28)227# define MEDIA_LNK_FL_DATA_LINK (0 << 28)
228# define MEDIA_LNK_FL_INTERFACE_LINK (1 << 28)228# define MEDIA_LNK_FL_INTERFACE_LINK (1 << 28)
229# define MEDIA_LNK_FL_ANCILLARY_LINK (2 << 28)
229 230
230struct media_link_desc {231struct media_link_desc {
231 struct media_pad_desc source;232 struct media_pad_desc source;