Lines Matching +full:device +full:- +full:unique

1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Media device
17 #include <media/media-devnode.h>
18 #include <media/media-entity.h>
21 struct device;
25 * struct media_entity_notify - Media Entity Notify
32 * registered with the media device. This handler is intended for creating
43 * struct media_device_ops - Media device operations
75 * struct media_device - Media device
76 * @dev: Parent device
77 * @devnode: Media device node
78 * @driver_name: Optional device driver name. If not set, calls to
79 * %MEDIA_IOC_DEVICE_INFO will return ``dev->driver->name``.
82 * @model: Device model name
83 * @serial: Device serial number (optional)
84 * @bus_info: Unique and stable device location identifier
85 * @hw_revision: Hardware device revision
88 * @id: Unique ID used on the last registered graph object
89 * @entity_internal_idx: Unique internal entity ID used by the graph traversal
108 * @request_id: Used to generate unique request IDs
110 * This structure represents an abstract high-level media device. It allows easy
111 * access to entities and provides basic media device-level support. The
114 * The parent @dev is a physical device. It must be set before registering the
115 * media device.
118 * be unique.
129 * Use-case: find tuner entity connected to the decoder
145 /* dev->driver_data points to this struct. */
146 struct device *dev;
195 * media_entity_enum_init - Initialise an entity enumeration
198 * @mdev: The related media device
206 mdev->entity_internal_idx_max + 1); in media_entity_enum_init()
210 * media_device_init() - Initializes a media device element
214 * This function initializes the media device prior to its registration.
215 * The media device initialization and registration is split in two functions
216 * to avoid race conditions and make the media device available to user-space
219 * So drivers need to first initialize the media device, register any entity
220 * within the media device, create pad to pad links and then finally register
221 * the media device by calling media_device_register() as a final step.
226 * media_device_cleanup() - Cleanups a media device element
236 * __media_device_register() - Registers a media device element
246 * - &media_entity.dev must point to the parent device (usually a &pci_dev,
249 * - &media_entity.model must be filled with the device model name as a
250 * NUL-terminated UTF-8 string. The device/model revision must not be
255 * - &media_entity.serial is a unique serial number stored as a
256 * NUL-terminated ASCII string. The field is big enough to store a GUID
257 * in text form. If the hardware doesn't provide a unique serial number
260 * - &media_entity.bus_info represents the location of the device in the
261 * system as a NUL-terminated ASCII string. For PCI/PCIe devices
267 * - &media_entity.hw_revision is the hardware device revision in a
268 * driver-specific format. When possible the revision should be formatted
273 …* #) Upon successful registration a character device named media[0-9]+ is created. The device m…
275 * #) Unregistering a media device that hasn't been registered is **NOT** safe.
284 * media_device_register() - Registers a media device element
294 * media_device_unregister() - Unregisters a media device element
299 * media device.
304 * media_device_register_entity() - registers a media entity inside a
305 * previously registered media device.
310 * Entities are identified by a unique positive integer ID. The media
318 * calling media_device_register_entity(). Entities embedded in higher-level
319 * standard structures can have some of those fields set by the higher-level
322 * If the device has pads, media_entity_pads_init() should be called before
343 * media_device_unregister_entity() - unregisters a media entity.
353 * When a media device is unregistered, all its entities are unregistered
364 * media_device_register_entity_notify() - Registers a media entity_notify
367 * @mdev: The media device
380 * media_device_unregister_entity_notify() - Unregister a media entity notify
383 * @mdev: The media device
392 list_for_each_entry(entity, &(mdev)->entities, graph_obj.list)
396 list_for_each_entry(intf, &(mdev)->interfaces, graph_obj.list)
400 list_for_each_entry(pad, &(mdev)->pads, graph_obj.list)
404 list_for_each_entry(link, &(mdev)->links, graph_obj.list)
407 * media_device_pci_init() - create and initialize a
408 * struct &media_device from a PCI device.
412 * @name: media device name. If %NULL, the routine will use the default
413 * name for the pci device, given by pci_name() macro.
419 * __media_device_usb_init() - create and initialize a
420 * struct &media_device from a PCI device.
424 * @board_name: media device name. If %NULL, the routine will use the usb
427 * given by ``udev->dev->driver->name``, with is usually the wrong
484 * media_device_usb_init() - create and initialize a
485 * struct &media_device from a PCI device.
489 * @name: media device name. If %NULL, the routine will use the usb