[media] doc-rst: Document ioctl LIRC_GET_FEATURES
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 11 Jul 2016 01:33:57 +0000 (22:33 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 11 Jul 2016 13:31:19 +0000 (10:31 -0300)
The documentation for this ioctl was really crappy.

Add a better documentation, using the lirc.4 man pages as a
reference, plus what was written originally at the lirc-ioctl.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Documentation/media/lirc.h.rst.exceptions
Documentation/media/uapi/rc/lirc-get-features.rst [new file with mode: 0644]
Documentation/media/uapi/rc/lirc_device_interface.rst
Documentation/media/uapi/rc/lirc_ioctl.rst

index 58439ef..17f6e7e 100644 (file)
@@ -37,38 +37,3 @@ ignore define LIRC_VALUE_MASK
 ignore define LIRC_MODE2_MASK
 
 ignore define LIRC_MODE_RAW
-
-ignore define LIRC_CAN_SEND_RAW
-ignore define LIRC_CAN_SEND_PULSE
-ignore define LIRC_CAN_SEND_MODE2
-ignore define LIRC_CAN_SEND_LIRCCODE
-
-ignore define LIRC_CAN_SEND_MASK
-
-ignore define LIRC_CAN_SET_SEND_CARRIER
-ignore define LIRC_CAN_SET_SEND_DUTY_CYCLE
-ignore define LIRC_CAN_SET_TRANSMITTER_MASK
-
-ignore define LIRC_CAN_REC_RAW
-ignore define LIRC_CAN_REC_PULSE
-ignore define LIRC_CAN_REC_MODE2
-ignore define LIRC_CAN_REC_LIRCCODE
-
-ignore define LIRC_CAN_REC_MASK
-
-ignore define LIRC_CAN_SET_REC_CARRIER
-ignore define LIRC_CAN_SET_REC_DUTY_CYCLE
-
-ignore define LIRC_CAN_SET_REC_DUTY_CYCLE_RANGE
-ignore define LIRC_CAN_SET_REC_CARRIER_RANGE
-ignore define LIRC_CAN_GET_REC_RESOLUTION
-ignore define LIRC_CAN_SET_REC_TIMEOUT
-ignore define LIRC_CAN_SET_REC_FILTER
-
-ignore define LIRC_CAN_MEASURE_CARRIER
-ignore define LIRC_CAN_USE_WIDEBAND_RECEIVER
-
-ignore define LIRC_CAN_SEND(x)
-ignore define LIRC_CAN_REC(x)
-
-ignore define LIRC_CAN_NOTIFY_DECODE
diff --git a/Documentation/media/uapi/rc/lirc-get-features.rst b/Documentation/media/uapi/rc/lirc-get-features.rst
new file mode 100644 (file)
index 0000000..6850f80
--- /dev/null
@@ -0,0 +1,168 @@
+.. -*- coding: utf-8; mode: rst -*-
+
+.. _lirc_get_features:
+
+***********************
+ioctl LIRC_GET_FEATURES
+***********************
+
+Name
+====
+
+LIRC_GET_FEATURES - Get the underlying hardware device's features
+
+Synopsis
+========
+
+.. cpp:function:: int ioctl( int fd, int request, __u32 *features)
+
+Arguments
+=========
+
+``fd``
+    File descriptor returned by open().
+
+``request``
+    LIRC_GET_FEATURES
+
+``features``
+    Bitmask with the LIRC features.
+
+
+Description
+===========
+
+
+Get the underlying hardware device's features. If a driver does not
+announce support of certain features, calling of the corresponding ioctls
+is undefined.
+
+LIRC features
+=============
+
+.. _LIRC_CAN_REC_RAW:
+
+``LIRC_CAN_REC_RAW``
+    The driver is capable of receiving using
+    :ref:`LIRC_MODE_RAW.`
+
+.. _LIRC_CAN_REC_PULSE:
+
+``LIRC_CAN_REC_PULSE``
+    The driver is capable of receiving using
+    :ref:`LIRC_MODE_PULSE.`
+
+.. _LIRC_CAN_REC_MODE2:
+
+``LIRC_CAN_REC_MODE2``
+    The driver is capable of receiving using
+    :ref:`LIRC_MODE_MODE2.`
+
+.. _LIRC_CAN_REC_LIRCCODE:
+
+``LIRC_CAN_REC_LIRCCODE``
+    The driver is capable of receiving using
+    :ref:`LIRC_MODE_LIRCCODE.`
+
+.. _LIRC_CAN_SET_SEND_CARRIER:
+
+``LIRC_CAN_SET_SEND_CARRIER``
+    The driver supports changing the modulation frequency via
+    :ref:`LIRC_SET_SEND_CARRIER.`
+
+.. _LIRC_CAN_SET_SEND_DUTY_CYCLE:
+
+``LIRC_CAN_SET_SEND_DUTY_CYCLE``
+    The driver supports changing the duty cycle using
+    :ref:`LIRC_SET_SEND_DUTY_CYCLE`.
+
+.. _LIRC_CAN_SET_TRANSMITTER_MASK:
+
+``LIRC_CAN_SET_TRANSMITTER_MASK``
+    The driver supports changing the active transmitter(s) using
+    :ref:`LIRC_SET_TRANSMITTER_MASK.`
+
+.. _LIRC_CAN_SET_REC_CARRIER:
+
+``LIRC_CAN_SET_REC_CARRIER``
+    The driver supports setting the receive carrier frequency using
+    :ref:`LIRC_SET_REC_CARRIER.`
+
+.. _LIRC_CAN_SET_REC_DUTY_CYCLE_RANGE:
+
+``LIRC_CAN_SET_REC_DUTY_CYCLE_RANGE``
+    The driver supports
+    :ref:`LIRC_SET_REC_DUTY_CYCLE_RANGE.`
+
+.. _LIRC_CAN_SET_REC_CARRIER_RANGE:
+
+``LIRC_CAN_SET_REC_CARRIER_RANGE``
+    The driver supports
+    :ref:`LIRC_SET_REC_CARRIER_RANGE.`
+
+.. _LIRC_CAN_GET_REC_RESOLUTION:
+
+``LIRC_CAN_GET_REC_RESOLUTION``
+    The driver supports
+    :ref:`LIRC_GET_REC_RESOLUTION.`
+
+.. _LIRC_CAN_SET_REC_TIMEOUT:
+
+``LIRC_CAN_SET_REC_TIMEOUT``
+    The driver supports
+    :ref:`LIRC_SET_REC_TIMEOUT.`
+
+.. _LIRC_CAN_SET_REC_FILTER:
+
+``LIRC_CAN_SET_REC_FILTER``
+    The driver supports
+    :ref:`LIRC_SET_REC_FILTER.`
+
+.. _LIRC_CAN_MEASURE_CARRIER:
+
+``LIRC_CAN_MEASURE_CARRIER``
+    The driver supports measuring of the modulation frequency using
+    :ref:`LIRC_SET_MEASURE_CARRIER_MODE`.
+
+.. _LIRC_CAN_USE_WIDEBAND_RECEIVER:
+
+``LIRC_CAN_USE_WIDEBAND_RECEIVER``
+    The driver supports learning mode using
+    :ref:`LIRC_SET_WIDEBAND_RECEIVER.`
+
+.. _LIRC_CAN_NOTIFY_DECODE:
+
+``LIRC_CAN_NOTIFY_DECODE``
+    The driver supports
+    :ref:`LIRC_NOTIFY_DECODE.`
+
+.. _LIRC_CAN_SEND_RAW:
+
+``LIRC_CAN_SEND_RAW``
+    The driver supports sending using
+    :ref:`LIRC_MODE_RAW.`
+
+.. _LIRC_CAN_SEND_PULSE:
+
+``LIRC_CAN_SEND_PULSE``
+    The driver supports sending using
+    :ref:`LIRC_MODE_PULSE.`
+
+.. _LIRC_CAN_SEND_MODE2:
+
+``LIRC_CAN_SEND_MODE2``
+    The driver supports sending using
+    :ref:`LIRC_MODE_MODE2.`
+
+.. _LIRC_CAN_SEND_LIRCCODE:
+
+``LIRC_CAN_SEND_LIRCCODE``
+    The driver supports sending codes (also called as IR blasting or IR TX).
+
+
+Return Value
+============
+
+On success 0 is returned, on error -1 and the ``errno`` variable is set
+appropriately. The generic error codes are described at the
+:ref:`Generic Error Codes <gen-errors>` chapter.
index a0c27ed..fe13f7d 100644 (file)
@@ -12,4 +12,5 @@ LIRC Device Interface
     lirc_dev_intro
     lirc_read
     lirc_write
+    lirc-get-features
     lirc_ioctl
index 77f39d1..b35c195 100644 (file)
@@ -50,14 +50,6 @@ I/O control requests
 ====================
 
 
-.. _LIRC_GET_FEATURES:
-
-``LIRC_GET_FEATURES``
-
-    Obviously, get the underlying hardware device's features. If a
-    driver does not announce support of certain features, calling of the
-    corresponding ioctls is undefined.
-
 .. _LIRC_GET_SEND_MODE:
 .. _lirc-mode-pulse: