Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: lirc: lirc mode ioctls deal with current mode

The ioctl change the current mode or return the current mode; they
do not tell you which modes are possible (use the lirc features
ioctl for that).

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

authored by

Sean Young and committed by
Mauro Carvalho Chehab
e3cd9734 02d742f4

+62 -18
+32 -10
Documentation/media/uapi/rc/lirc-get-rec-mode.rst
··· 10 10 Name 11 11 ==== 12 12 13 - LIRC_GET_REC_MODE/LIRC_SET_REC_MODE - Get/set supported receive modes. 13 + LIRC_GET_REC_MODE/LIRC_SET_REC_MODE - Get/set current receive mode. 14 14 15 15 Synopsis 16 16 ======== 17 17 18 - .. c:function:: int ioctl( int fd, LIRC_GET_REC_MODE, __u32 rx_modes) 18 + .. c:function:: int ioctl( int fd, LIRC_GET_REC_MODE, __u32 *mode) 19 19 :name: LIRC_GET_REC_MODE 20 20 21 - .. c:function:: int ioctl( int fd, LIRC_SET_REC_MODE, __u32 rx_modes) 21 + .. c:function:: int ioctl( int fd, LIRC_SET_REC_MODE, __u32 *mode) 22 22 :name: LIRC_SET_REC_MODE 23 23 24 24 Arguments ··· 27 27 ``fd`` 28 28 File descriptor returned by open(). 29 29 30 - ``rx_modes`` 31 - Bitmask with the supported transmit modes. 30 + ``mode`` 31 + Mode used for receive. 32 32 33 33 Description 34 34 =========== 35 35 36 - Get/set supported receive modes. Only :ref:`LIRC_MODE_MODE2 <lirc-mode-mode2>` 37 - and :ref:`LIRC_MODE_SCANCODE <lirc-mode-scancode>` are supported. 36 + Get and set the current receive mode. Only 37 + :ref:`LIRC_MODE_MODE2 <lirc-mode-mode2>` and 38 + :ref:`LIRC_MODE_SCANCODE <lirc-mode-scancode>` are supported. 38 39 Use :ref:`lirc_get_features` to find out which modes the driver supports. 39 40 40 41 Return Value 41 42 ============ 42 43 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. 44 + .. tabularcolumns:: |p{2.5cm}|p{15.0cm}| 45 + 46 + .. flat-table:: 47 + :header-rows: 0 48 + :stub-columns: 0 49 + 50 + 51 + - .. row 1 52 + 53 + - ``ENODEV`` 54 + 55 + - Device not available. 56 + 57 + - .. row 2 58 + 59 + - ``ENOTTY`` 60 + 61 + - Device does not support receiving. 62 + 63 + - .. row 3 64 + 65 + - ``EINVAL`` 66 + 67 + - Invalid mode or invalid mode for this device.
+30 -8
Documentation/media/uapi/rc/lirc-get-send-mode.rst
··· 10 10 Name 11 11 ==== 12 12 13 - LIRC_GET_SEND_MODE/LIRC_SET_SEND_MODE - Get/set supported transmit mode. 13 + LIRC_GET_SEND_MODE/LIRC_SET_SEND_MODE - Get/set current transmit mode. 14 14 15 15 Synopsis 16 16 ======== 17 17 18 - .. c:function:: int ioctl( int fd, LIRC_GET_SEND_MODE, __u32 *tx_modes ) 18 + .. c:function:: int ioctl( int fd, LIRC_GET_SEND_MODE, __u32 *mode ) 19 19 :name: LIRC_GET_SEND_MODE 20 20 21 - .. c:function:: int ioctl( int fd, LIRC_SET_SEND_MODE, __u32 *tx_modes ) 21 + .. c:function:: int ioctl( int fd, LIRC_SET_SEND_MODE, __u32 *mode ) 22 22 :name: LIRC_SET_SEND_MODE 23 23 24 24 Arguments ··· 27 27 ``fd`` 28 28 File descriptor returned by open(). 29 29 30 - ``tx_modes`` 31 - Bitmask with the supported transmit modes. 30 + ``mode`` 31 + The mode used for transmitting. 32 32 33 33 34 34 Description ··· 44 44 Return Value 45 45 ============ 46 46 47 - On success 0 is returned, on error -1 and the ``errno`` variable is set 48 - appropriately. The generic error codes are described at the 49 - :ref:`Generic Error Codes <gen-errors>` chapter. 47 + 48 + .. tabularcolumns:: |p{2.5cm}|p{15.0cm}| 49 + 50 + .. flat-table:: 51 + :header-rows: 0 52 + :stub-columns: 0 53 + 54 + 55 + - .. row 1 56 + 57 + - ``ENODEV`` 58 + 59 + - Device not available. 60 + 61 + - .. row 2 62 + 63 + - ``ENOTTY`` 64 + 65 + - Device does not support transmitting. 66 + 67 + - .. row 3 68 + 69 + - ``EINVAL`` 70 + 71 + - Invalid mode or invalid mode for this device.