Documentation/userspace-api/media/dvb/frontend_f_open.rst
Source file repositories/reference/linux-study-clean/Documentation/userspace-api/media/dvb/frontend_f_open.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/userspace-api/media/dvb/frontend_f_open.rst- Extension
.rst- Size
- 3011 bytes
- Lines
- 105
- 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.
Dependency Surface
fcntl.h
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:: DTV.fe
.. _frontend_f_open:
***************************
Digital TV frontend open()
***************************
Name
====
fe-open - Open a frontend device
Synopsis
========
.. code-block:: c
#include <fcntl.h>
.. c:function:: int open( const char *device_name, int flags )
Arguments
=========
``device_name``
Device to be opened.
``flags``
Open flags. Access can either be ``O_RDWR`` or ``O_RDONLY``.
Multiple opens are allowed with ``O_RDONLY``. In this mode, only
query and read ioctls are allowed.
Only one open is allowed in ``O_RDWR``. In this mode, all ioctls are
allowed.
When the ``O_NONBLOCK`` flag is given, the system calls may return
``EAGAIN`` error code when no data is available or when the device
driver is temporarily busy.
Other flags have no effect.
Description
===========
This system call opens a named frontend device
(``/dev/dvb/adapter?/frontend?``) for subsequent use. Usually the first
thing to do after a successful open is to find out the frontend type
with :ref:`FE_GET_INFO`.
The device can be opened in read-only mode, which only allows monitoring
of device status and statistics, or read/write mode, which allows any
kind of use (e.g. performing tuning operations.)
In a system with multiple front-ends, it is usually the case that
multiple devices cannot be open in read/write mode simultaneously. As
long as a front-end device is opened in read/write mode, other open()
calls in read/write mode will either fail or block, depending on whether
non-blocking or blocking mode was specified. A front-end device opened
in blocking mode can later be put into non-blocking mode (and vice
versa) using the F_SETFL command of the fcntl system call. This is a
standard system call, documented in the Linux manual page for fcntl.
When an open() call has succeeded, the device will be ready for use in
the specified mode. This implies that the corresponding hardware is
powered up, and that other front-ends may have been powered down to make
that possible.
Return Value
Annotation
- Immediate include surface: `fcntl.h`.
- 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.