Merge tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
[sfrench/cifs-2.6.git] / Documentation / media / uapi / rc / lirc-get-timeout.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 .. _lirc_get_min_timeout:
4 .. _lirc_get_max_timeout:
5
6 ****************************************************
7 ioctls LIRC_GET_MIN_TIMEOUT and LIRC_GET_MAX_TIMEOUT
8 ****************************************************
9
10 Name
11 ====
12
13 LIRC_GET_MIN_TIMEOUT / LIRC_GET_MAX_TIMEOUT - Obtain the possible timeout
14 range for IR receive.
15
16 Synopsis
17 ========
18
19 .. cpp:function:: int ioctl( int fd, int request, __u32 *timeout)
20
21 Arguments
22 =========
23
24 ``fd``
25     File descriptor returned by open().
26
27 ``request``
28     LIRC_GET_MIN_TIMEOUT or LIRC_GET_MAX_TIMEOUT
29
30 ``timeout``
31     Timeout, in microseconds.
32
33
34 Description
35 ===========
36
37 Some devices have internal timers that can be used to detect when
38 there's no IR activity for a long time. This can help lircd in
39 detecting that a IR signal is finished and can speed up the decoding
40 process. Returns an integer value with the minimum/maximum timeout
41 that can be set.
42
43 .. note::
44
45    Some devices have a fixed timeout, in that case
46    both ioctls will return the same value even though the timeout
47    cannot be changed via :ref:`LIRC_SET_REC_TIMEOUT`.
48
49
50 Return Value
51 ============
52
53 On success 0 is returned, on error -1 and the ``errno`` variable is set
54 appropriately. The generic error codes are described at the
55 :ref:`Generic Error Codes <gen-errors>` chapter.