Documentation/userspace-api/media/mediactl/media-ioc-device-info.rst
Source file repositories/reference/linux-study-clean/Documentation/userspace-api/media/mediactl/media-ioc-device-info.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/userspace-api/media/mediactl/media-ioc-device-info.rst- Extension
.rst- Size
- 3123 bytes
- Lines
- 107
- Domain
- Support Tooling And Documentation
- Bucket
- Documentation
- Inferred role
- Support Tooling And Documentation: documentation
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: MC
.. _media_ioc_device_info:
***************************
ioctl MEDIA_IOC_DEVICE_INFO
***************************
Name
====
MEDIA_IOC_DEVICE_INFO - Query device information
Synopsis
========
.. c:macro:: MEDIA_IOC_DEVICE_INFO
``int ioctl(int fd, MEDIA_IOC_DEVICE_INFO, struct media_device_info *argp)``
Arguments
=========
``fd``
File descriptor returned by :c:func:`open()`.
``argp``
Pointer to struct :c:type:`media_device_info`.
Description
===========
All media devices must support the ``MEDIA_IOC_DEVICE_INFO`` ioctl. To
query device information, applications call the ioctl with a pointer to
a struct :c:type:`media_device_info`. The driver
fills the structure and returns the information to the application. The
ioctl never fails.
.. c:type:: media_device_info
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.5cm}|
.. flat-table:: struct media_device_info
:header-rows: 0
:stub-columns: 0
:widths: 1 1 2
* - char
- ``driver``\ [16]
- Name of the driver implementing the media API as a NUL-terminated
ASCII string. The driver version is stored in the
``driver_version`` field.
Driver specific applications can use this information to verify
the driver identity. It is also useful to work around known bugs,
or to identify drivers in error reports.
* - char
- ``model``\ [32]
- Device model name as a NUL-terminated UTF-8 string. The device
version is stored in the ``device_version`` field and is not be
appended to the model name.
* - char
- ``serial``\ [40]
- Serial number as a NUL-terminated ASCII string.
* - char
- ``bus_info``\ [32]
Annotation
- Atlas domain: Support Tooling And Documentation / Documentation.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.