Name

struct media_device — Media device

Synopsis

struct media_device {
  struct device * dev;
  struct media_devnode devnode;
  char model[32];
  char serial[40];
  char bus_info[32];
  u32 hw_revision;
  u32 driver_version;
  u32 entity_id;
  struct list_head entities;
  spinlock_t lock;
  struct mutex graph_mutex;
  int (* link_notify) (struct media_link *link, u32 flags,unsigned int notification);
};  

Members

dev

Parent device

devnode

Media device node

model[32]

Device model name

serial[40]

Device serial number (optional)

bus_info[32]

Unique and stable device location identifier

hw_revision

Hardware device revision

driver_version

Device driver version

entity_id

ID of the next entity to be registered

entities

List of registered entities

lock

Entities list lock

graph_mutex

Entities graph operation lock

link_notify

Link state change notification callback

Description

This structure represents an abstract high-level media device. It allows easy access to entities and provides basic media device-level support. The structure can be allocated directly or embedded in a larger structure.

The parent dev is a physical device. It must be set before registering the media device.

model is a descriptive model name exported through sysfs. It doesn't have to be unique.