Merge tag 'tegra-for-4.8-i2c' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra...
[cascardo/linux.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 ``LIRC-MODE-LIRCCODE``).
34 Reads on the device must be done in blocks matching the bit count.
35 The bit could should be rounded up so that it matches full bytes.
36
37
38 Return Value
39 ============
40
41 On success 0 is returned, on error -1 and the ``errno`` variable is set
42 appropriately. The generic error codes are described at the
43 :ref:`Generic Error Codes <gen-errors>` chapter.