Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
[cascardo/linux.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 .. c:function:: int ioctl( int fd, LIRC_GET_MIN_TIMEOUT, __u32 *timeout)
20     :name: LIRC_GET_MIN_TIMEOUT
21
22 .. c:function:: int ioctl( int fd, LIRC_GET_MAX_TIMEOUT, __u32 *timeout)
23     :name: LIRC_GET_MAX_TIMEOUT
24
25 Arguments
26 =========
27
28 ``fd``
29     File descriptor returned by open().
30
31 ``timeout``
32     Timeout, in microseconds.
33
34
35 Description
36 ===========
37
38 Some devices have internal timers that can be used to detect when
39 there's no IR activity for a long time. This can help lircd in
40 detecting that a IR signal is finished and can speed up the decoding
41 process. Returns an integer value with the minimum/maximum timeout
42 that can be set.
43
44 .. note::
45
46    Some devices have a fixed timeout, in that case
47    both ioctls will return the same value even though the timeout
48    cannot be changed via :ref:`LIRC_SET_REC_TIMEOUT`.
49
50
51 Return Value
52 ============
53
54 On success 0 is returned, on error -1 and the ``errno`` variable is set
55 appropriately. The generic error codes are described at the
56 :ref:`Generic Error Codes <gen-errors>` chapter.