diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-07-12 09:35:26 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-07-12 09:43:04 -0300 |
commit | bd6a63f2e69ea16851a99b200cd2039186173775 (patch) | |
tree | 847ea21e7790244cc946d1d551658888714e28be /Documentation/media/uapi/rc/lirc-dev-intro.rst | |
parent | 048eb3ef7580ef5dd64c74a319e58b1c8568ed68 (diff) | |
download | linux-stable-bd6a63f2e69ea16851a99b200cd2039186173775.tar.gz linux-stable-bd6a63f2e69ea16851a99b200cd2039186173775.tar.bz2 linux-stable-bd6a63f2e69ea16851a99b200cd2039186173775.zip |
[media] doc-rst: reorganize LIRC ReST files
Reorganize the LIRC rst files, using "-" instead of "_" on
their names, and creating a separate chapter for syscalls.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'Documentation/media/uapi/rc/lirc-dev-intro.rst')
-rw-r--r-- | Documentation/media/uapi/rc/lirc-dev-intro.rst | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/Documentation/media/uapi/rc/lirc-dev-intro.rst b/Documentation/media/uapi/rc/lirc-dev-intro.rst new file mode 100644 index 000000000000..ef97e40f2fd8 --- /dev/null +++ b/Documentation/media/uapi/rc/lirc-dev-intro.rst @@ -0,0 +1,62 @@ +.. -*- coding: utf-8; mode: rst -*- + +.. _lirc_dev_intro: + +************ +Introduction +************ + +The LIRC device interface is a bi-directional interface for transporting +raw IR data between userspace and kernelspace. Fundamentally, it is just +a chardev (/dev/lircX, for X = 0, 1, 2, ...), with a number of standard +struct file_operations defined on it. With respect to transporting raw +IR data to and fro, the essential fops are read, write and ioctl. + +Example dmesg output upon a driver registering w/LIRC: + +.. code-block:: none + + $ dmesg |grep lirc_dev + lirc_dev: IR Remote Control driver registered, major 248 + rc rc0: lirc_dev: driver ir-lirc-codec (mceusb) registered at minor = 0 + +What you should see for a chardev: + +.. code-block:: none + + $ ls -l /dev/lirc* + crw-rw---- 1 root root 248, 0 Jul 2 22:20 /dev/lirc0 + +********** +LIRC modes +********** + +LIRC supports some modes of receiving and sending IR codes, as shown +on the following table. + +.. _lirc-mode-mode2: + +``LIRC_MODE_MODE2`` + + The driver returns a sequence of pulse and space codes to userspace. + + This mode is used only for IR receive. + +.. _lirc-mode-lirccode: + +``LIRC_MODE_LIRCCODE`` + + The IR signal is decoded internally by the receiver. The LIRC interface + returns the scancode as an integer value. This is the usual mode used + by several TV media cards. + + This mode is used only for IR receive. + +.. _lirc-mode-pulse: + +``LIRC_MODE_PULSE`` + + On puse mode, a sequence of pulse/space integer values are written to the + lirc device using :Ref:`lirc-write`. + + This mode is used only for IR send. |