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