Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
[linux-2.6-microblaze.git] / Documentation / userspace-api / media / rc / lirc-get-rec-mode.rst
1 .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later
2 .. c:namespace:: RC
3
4 .. _lirc_get_rec_mode:
5 .. _lirc_set_rec_mode:
6
7 **********************************************
8 ioctls LIRC_GET_REC_MODE and LIRC_SET_REC_MODE
9 **********************************************
10
11 Name
12 ====
13
14 LIRC_GET_REC_MODE/LIRC_SET_REC_MODE - Get/set current receive mode.
15
16 Synopsis
17 ========
18
19 .. c:macro:: LIRC_GET_REC_MODE
20
21 ``int ioctl(int fd, LIRC_GET_REC_MODE, __u32 *mode)``
22
23 .. c:macro:: LIRC_SET_REC_MODE
24
25 ``int ioctl(int fd, LIRC_SET_REC_MODE, __u32 *mode)``
26
27 Arguments
28 =========
29
30 ``fd``
31     File descriptor returned by open().
32
33 ``mode``
34     Mode used for receive.
35
36 Description
37 ===========
38
39 Get and set the current receive mode. Only
40 :ref:`LIRC_MODE_MODE2 <lirc-mode-mode2>` and
41 :ref:`LIRC_MODE_SCANCODE <lirc-mode-scancode>` are supported.
42 Use :ref:`lirc_get_features` to find out which modes the driver supports.
43
44 Return Value
45 ============
46
47 .. tabularcolumns:: |p{2.5cm}|p{15.0cm}|
48
49 .. flat-table::
50     :header-rows:  0
51     :stub-columns: 0
52
53     -  .. row 1
54
55        -  ``ENODEV``
56
57        -  Device not available.
58
59     -  .. row 2
60
61        -  ``ENOTTY``
62
63        -  Device does not support receiving.
64
65     -  .. row 3
66
67        -  ``EINVAL``
68
69        -  Invalid mode or invalid mode for this device.