ignore define LIRC_CAN_REC_MASK
ignore define LIRC_CAN_SET_REC_DUTY_CYCLE
+# Obsolete ioctls
+
+ignore ioctl LIRC_GET_LENGTH
+
# Undocumented macros
ignore define PULSE_BIT
ignore define LIRC_MODE2_MASK
ignore define LIRC_MODE_RAW
+ignore define LIRC_MODE_LIRCCODE
this packet will be sent, with the number of microseconds with
no IR.
-.. _lirc-mode-lirccode:
-
-``LIRC_MODE_LIRCCODE``
-
- This mode can be used for IR receive and send.
-
- The IR signal is decoded internally by the receiver, or encoded by the
- transmitter. The LIRC interface represents the scancode as byte string,
- which might not be a u32, it can be any length. The value is entirely
- driver dependent. This mode is used by some older lirc drivers.
-
- The length of each code depends on the driver, which can be retrieved
- with :ref:`lirc_get_length`. This length is used both
- for transmitting and receiving IR.
-
.. _lirc-mode-pulse:
``LIRC_MODE_PULSE``
lirc-set-send-duty-cycle
lirc-get-timeout
lirc-set-rec-timeout
- lirc-get-length
lirc-set-rec-carrier
lirc-set-rec-carrier-range
lirc-set-send-carrier
``LIRC_CAN_REC_LIRCCODE``
- The driver is capable of receiving using
- :ref:`LIRC_MODE_LIRCCODE <lirc-mode-LIRCCODE>`.
+ Unused. Kept just to avoid breaking uAPI.
.. _LIRC-CAN-SET-SEND-CARRIER:
``LIRC_CAN_SEND_LIRCCODE``
- The driver supports sending (also called as IR blasting or IR TX) using
- :ref:`LIRC_MODE_LIRCCODE <lirc-mode-LIRCCODE>`.
-
+ Unused. Kept just to avoid breaking uAPI.
Return Value
============
+++ /dev/null
-.. -*- coding: utf-8; mode: rst -*-
-
-.. _lirc_get_length:
-
-*********************
-ioctl LIRC_GET_LENGTH
-*********************
-
-Name
-====
-
-LIRC_GET_LENGTH - Retrieves the code length in bits.
-
-Synopsis
-========
-
-.. c:function:: int ioctl( int fd, LIRC_GET_LENGTH, __u32 *length )
- :name: LIRC_GET_LENGTH
-
-Arguments
-=========
-
-``fd``
- File descriptor returned by open().
-
-``length``
- length, in bits
-
-
-Description
-===========
-
-Retrieves the code length in bits (only for
-:ref:`LIRC_MODE_LIRCCODE <lirc-mode-lirccode>`).
-Reads on the device must be done in blocks matching the bit count.
-The bit could should be rounded up so that it matches full bytes.
-
-
-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.
===========
Get/set supported receive modes. Only :ref:`LIRC_MODE_MODE2 <lirc-mode-mode2>`
-and :ref:`LIRC_MODE_LIRCCODE <lirc-mode-lirccode>` are supported for IR
-receive. Use :ref:`lirc_get_features` to find out which modes the driver
-supports.
+is supported for IR receive.
Return Value
============
Get/set current transmit mode.
-Only :ref:`LIRC_MODE_PULSE <lirc-mode-pulse>` and
-:ref:`LIRC_MODE_LIRCCODE <lirc-mode-lirccode>` is supported by for IR send,
+Only :ref:`LIRC_MODE_PULSE <lirc-mode-pulse>` is supported by for IR send,
depending on the driver. Use :ref:`lirc_get_features` to find out which
modes the driver supports.
ldev->features = features;
ldev->data = &dev->raw->lirc;
ldev->buf = NULL;
- ldev->code_length = sizeof(struct ir_raw_event) * 8;
ldev->chunk_size = sizeof(int);
ldev->buffer_size = LIRCBUF_SIZE;
ldev->fops = &lirc_fops;
return -EINVAL;
}
- if (d->code_length < 1 || d->code_length > (BUFLEN * 8)) {
- dev_err(&d->dev, "code length must be less than %d bits\n",
- BUFLEN * 8);
- return -EBADRQC;
- }
-
if (!d->buf && !(d->fops && d->fops->read &&
d->fops->poll && d->fops->unlocked_ioctl)) {
dev_err(&d->dev, "undefined read, poll, ioctl\n");
/* some safety check 8-) */
d->name[sizeof(d->name) - 1] = '\0';
- if (d->features == 0)
- d->features = LIRC_CAN_REC_LIRCCODE;
-
if (LIRC_CAN_REC(d->features)) {
err = lirc_allocate_buffer(d);
if (err)
* for now, lirc_serial doesn't support mode changing either
*/
break;
- case LIRC_GET_LENGTH:
- result = put_user(d->code_length, (__u32 __user *)arg);
- break;
default:
result = -ENOTTY;
}
#ifndef _LINUX_LIRC_DEV_H
#define _LINUX_LIRC_DEV_H
-#define BUFLEN 16
-
#include <linux/slab.h>
#include <linux/fs.h>
#include <linux/ioctl.h>
*
* @name: used for logging
* @minor: the minor device (/dev/lircX) number for the device
- * @code_length: length of a remote control key code expressed in bits
* @features: lirc compatible hardware features, like LIRC_MODE_RAW,
* LIRC_CAN\_\*, as defined at include/media/lirc.h.
* @buffer_size: Number of FIFO buffers with @chunk_size size.
struct lirc_dev {
char name[40];
unsigned int minor;
- __u32 code_length;
__u32 features;
unsigned int buffer_size; /* in chunks holding one code each */