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
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+12−5
@@ -412,14 +412,21 @@ must be set for every pad. · 411 unmodified lines
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
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
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;