Merge branch 'topic/docs-next' into v4l_for_linus
[sfrench/cifs-2.6.git] / Documentation / media / uapi / rc / lirc-get-length.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 .. _lirc_get_length:
4
5 *********************
6 ioctl LIRC_GET_LENGTH
7 *********************
8
9 Name
10 ====
11
12 LIRC_GET_LENGTH - Retrieves the code length in bits.
13
14 Synopsis
15 ========
16
17 .. cpp:function:: int ioctl( int fd, int request, __u32 *length )
18
19 Arguments
20 =========
21
22 ``fd``
23     File descriptor returned by open().
24
25 ``request``
26     LIRC_GET_LENGTH
27
28 ``length``
29     length, in bits
30
31
32 Description
33 ===========
34
35 Retrieves the code length in bits (only for ``LIRC-MODE-LIRCCODE``).
36 Reads on the device must be done in blocks matching the bit count.
37 The bit could should be rounded up so that it matches full bytes.
38
39
40 Return Value
41 ============
42
43 On success 0 is returned, on error -1 and the ``errno`` variable is set
44 appropriately. The generic error codes are described at the
45 :ref:`Generic Error Codes <gen-errors>` chapter.