Merge tag 'xtensa-20170507' of git://github.com/jcmvbkbc/linux-xtensa
[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 .. c:function:: int ioctl( int fd, LIRC_GET_LENGTH, __u32 *length )
18     :name: LIRC_GET_LENGTH
19
20 Arguments
21 =========
22
23 ``fd``
24     File descriptor returned by open().
25
26 ``length``
27     length, in bits
28
29
30 Description
31 ===========
32
33 Retrieves the code length in bits (only for
34 :ref:`LIRC_MODE_LIRCCODE <lirc-mode-lirccode>`).
35 Reads on the device must be done in blocks matching the bit count.
36 The bit could should be rounded up so that it matches full bytes.
37
38
39 Return Value
40 ============
41
42 On success 0 is returned, on error -1 and the ``errno`` variable is set
43 appropriately. The generic error codes are described at the
44 :ref:`Generic Error Codes <gen-errors>` chapter.