aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorHans Verkuil <hansverk@cisco.com>2018-02-28 05:41:11 -0500
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-07-25 07:46:24 -0400
commit588f4ee7e6fc5c9a0fb07c7051cdd341949e0feb (patch)
treeefc77a7eb88653e3727d030343d8ba067b6d6454 /include/uapi/linux
parentb0549006263efd59e22518eda230040ffee71b93 (diff)
media: add flags field to struct media_v2_entity
The v2 entity structure never exposed the entity flags, which made it impossible to detect connector or default entities. It is really trivial to just expose this information, so implement this. Signed-off-by: Hans Verkuil <hansverk@cisco.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/media.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h
index f6338bd57929..ebd2cda67833 100644
--- a/include/uapi/linux/media.h
+++ b/include/uapi/linux/media.h
@@ -280,11 +280,21 @@ struct media_links_enum {
280 * MC next gen API definitions 280 * MC next gen API definitions
281 */ 281 */
282 282
283/*
284 * Appeared in 4.19.0.
285 *
286 * The media_version argument comes from the media_version field in
287 * struct media_device_info.
288 */
289#define MEDIA_V2_ENTITY_HAS_FLAGS(media_version) \
290 ((media_version) >= ((4 << 16) | (19 << 8) | 0))
291
283struct media_v2_entity { 292struct media_v2_entity {
284 __u32 id; 293 __u32 id;
285 char name[64]; 294 char name[64];
286 __u32 function; /* Main function of the entity */ 295 __u32 function; /* Main function of the entity */
287 __u32 reserved[6]; 296 __u32 flags;
297 __u32 reserved[5];
288} __attribute__ ((packed)); 298} __attribute__ ((packed));
289 299
290/* Should match the specific fields at media_intf_devnode */ 300/* Should match the specific fields at media_intf_devnode */