History

media: lirc: remove LIRCCODE and LIRC_GET_LENGTH

LIRCCODE is a lirc mode where a driver produces driver-dependent codes for receive and transmit. No driver uses this any more. The LIRC_GET_LENGTH ioctl was used for this mode only.

Sean Young committed 9 years ago

Commit 4e3cd001 parent 794348e10 files · +9 −87Browse files

Unified · Split

10 files
  1. Documentation/media/lirc.h.rst.exceptions +5 −0
  2. Documentation/media/uapi/rc/lirc-dev-intro.rst +0 −15
  3. Documentation/media/uapi/rc/lirc-func.rst +0 −1
  4. Documentation/media/uapi/rc/lirc-get-features.rst +2 −5
  5. Documentation/media/uapi/rc/lirc-get-length.rst +0 −44
  6. Documentation/media/uapi/rc/lirc-get-rec-mode.rst +1 −3
  7. Documentation/media/uapi/rc/lirc-get-send-mode.rst +1 −2
  8. drivers/media/rc/ir-lirc-codec.c +0 −1
  9. drivers/media/rc/lirc_dev.c +0 −12
  10. include/media/lirc_dev.h +0 −4
Documentation/media/lirc.h.rst.exceptions+5−0
@@ -28,6 +28,10 @@ ignore define LIRC_CAN_SEND_MASK · 27 unmodified lines
2828 ignore define LIRC_CAN_REC_MASK
2929 ignore define LIRC_CAN_SET_REC_DUTY_CYCLE
3030
31+# Obsolete ioctls
32+
33+ignore ioctl LIRC_GET_LENGTH
34+
3135 # Undocumented macros
3236
3337 ignore define PULSE_BIT
@@ -40,3 +44,4 @@ ignore define LIRC_VALUE_MASK · 6 unmodified lines
4044 ignore define LIRC_MODE2_MASK
4145
4246 ignore define LIRC_MODE_RAW
47+ignore define LIRC_MODE_LIRCCODE
Documentation/media/uapi/rc/lirc-dev-intro.rst+0−15
@@ -72,21 +72,6 @@ on the following table. · 71 unmodified lines
7272 this packet will be sent, with the number of microseconds with
7373 no IR.
7474
75−.. _lirc-mode-lirccode:
76−
77−``LIRC_MODE_LIRCCODE``
78−
79− This mode can be used for IR receive and send.
80−
81− The IR signal is decoded internally by the receiver, or encoded by the
82− transmitter. The LIRC interface represents the scancode as byte string,
83− which might not be a u32, it can be any length. The value is entirely
84− driver dependent. This mode is used by some older lirc drivers.
85−
86− The length of each code depends on the driver, which can be retrieved
87− with :ref:`lirc_get_length`. This length is used both
88− for transmitting and receiving IR.
89−
9075 .. _lirc-mode-pulse:
9176
9277 ``LIRC_MODE_PULSE``
Documentation/media/uapi/rc/lirc-func.rst+0−1
@@ -18,7 +18,6 @@ LIRC Function Reference · 17 unmodified lines
1818 lirc-set-send-duty-cycle
1919 lirc-get-timeout
2020 lirc-set-rec-timeout
21− lirc-get-length
2221 lirc-set-rec-carrier
2322 lirc-set-rec-carrier-range
2423 lirc-set-send-carrier
Documentation/media/uapi/rc/lirc-get-features.rst+2−5
@@ -62,8 +62,7 @@ LIRC features · 61 unmodified lines
6262
6363 ``LIRC_CAN_REC_LIRCCODE``
6464
65− The driver is capable of receiving using
66− :ref:`LIRC_MODE_LIRCCODE <lirc-mode-LIRCCODE>`.
65+ Unused. Kept just to avoid breaking uAPI.
6766
6867 .. _LIRC-CAN-SET-SEND-CARRIER:
6968
@@ -170,9 +169,7 @@ LIRC features · 100 unmodified lines
170169
171170 ``LIRC_CAN_SEND_LIRCCODE``
172171
173− The driver supports sending (also called as IR blasting or IR TX) using
174− :ref:`LIRC_MODE_LIRCCODE <lirc-mode-LIRCCODE>`.
175−
172+ Unused. Kept just to avoid breaking uAPI.
176173
177174 Return Value
178175 ============
Documentation/media/uapi/rc/lirc-get-length.rst+0−44
@@ -1,44 +0,0 @@
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
34−:ref:`LIRC_MODE_LIRCCODE <lirc-mode-lirccode>`).
35−Reads on the device must be done in blocks matching the bit count.
36−The bit could should be rounded up so that it matches full bytes.
37−
38−
39−Return Value
40−============
41−
42−On success 0 is returned, on error -1 and the ``errno`` variable is set
43−appropriately. The generic error codes are described at the
44−:ref:`Generic Error Codes <gen-errors>` chapter.
Documentation/media/uapi/rc/lirc-get-rec-mode.rst+1−3
@@ -34,9 +34,7 @@ Description · 33 unmodified lines
3434 ===========
3535
3636 Get/set supported receive modes. Only :ref:`LIRC_MODE_MODE2 <lirc-mode-mode2>`
37−and :ref:`LIRC_MODE_LIRCCODE <lirc-mode-lirccode>` are supported for IR
38−receive. Use :ref:`lirc_get_features` to find out which modes the driver
39−supports.
37+is supported for IR receive.
4038
4139 Return Value
4240 ============
Documentation/media/uapi/rc/lirc-get-send-mode.rst+1−2
@@ -36,8 +36,7 @@ Description · 35 unmodified lines
3636
3737 Get/set current transmit mode.
3838
39−Only :ref:`LIRC_MODE_PULSE <lirc-mode-pulse>` and
40−:ref:`LIRC_MODE_LIRCCODE <lirc-mode-lirccode>` is supported by for IR send,
39+Only :ref:`LIRC_MODE_PULSE <lirc-mode-pulse>` is supported by for IR send,
4140 depending on the driver. Use :ref:`lirc_get_features` to find out which
4241 modes the driver supports.
4342
drivers/media/rc/ir-lirc-codec.c+0−1
@@ -388,7 +388,6 @@ static int ir_lirc_register(struct rc_dev *dev) · 387 unmodified lines
388388 ldev->features = features;
389389 ldev->data = &dev->raw->lirc;
390390 ldev->buf = NULL;
391− ldev->code_length = sizeof(struct ir_raw_event) * 8;
392391 ldev->chunk_size = sizeof(int);
393392 ldev->buffer_size = LIRCBUF_SIZE;
394393 ldev->fops = &lirc_fops;
drivers/media/rc/lirc_dev.c+0−12
@@ -137,12 +137,6 @@ int lirc_register_device(struct lirc_dev *d) · 136 unmodified lines
137137 return -EINVAL;
138138 }
139139
140− if (d->code_length < 1 || d->code_length > (BUFLEN * 8)) {
141− dev_err(&d->dev, "code length must be less than %d bits\n",
142− BUFLEN * 8);
143− return -EBADRQC;
144− }
145−
146140 if (!d->buf && !(d->fops && d->fops->read &&
147141 d->fops->poll && d->fops->unlocked_ioctl)) {
148142 dev_err(&d->dev, "undefined read, poll, ioctl\n");
@@ -152,9 +146,6 @@ int lirc_register_device(struct lirc_dev *d) · 3 unmodified lines
152146 /* some safety check 8-) */
153147 d->name[sizeof(d->name) - 1] = '\0';
154148
155− if (d->features == 0)
156− d->features = LIRC_CAN_REC_LIRCCODE;
157−
158149 if (LIRC_CAN_REC(d->features)) {
159150 err = lirc_allocate_buffer(d);
160151 if (err)
@@ -343,9 +334,6 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg) · 182 unmodified lines
343334 * for now, lirc_serial doesn't support mode changing either
344335 */
345336 break;
346− case LIRC_GET_LENGTH:
347− result = put_user(d->code_length, (__u32 __user *)arg);
348− break;
349337 default:
350338 result = -ENOTTY;
351339 }
include/media/lirc_dev.h+0−4
@@ -9,8 +9,6 @@ · 8 unmodified lines
99 #ifndef _LINUX_LIRC_DEV_H
1010 #define _LINUX_LIRC_DEV_H
1111
12−#define BUFLEN 16
13−
1412 #include <linux/slab.h>
1513 #include <linux/fs.h>
1614 #include <linux/ioctl.h>
@@ -117,7 +115,6 @@ static inline unsigned int lirc_buffer_write(struct lirc_buffer *buf, · 100 unmodified lines
117115 *
118116 * @name: used for logging
119117 * @minor: the minor device (/dev/lircX) number for the device
120− * @code_length: length of a remote control key code expressed in bits
121118 * @features: lirc compatible hardware features, like LIRC_MODE_RAW,
122119 * LIRC_CAN\_\*, as defined at include/media/lirc.h.
123120 * @buffer_size: Number of FIFO buffers with @chunk_size size.
@@ -142,7 +139,6 @@ static inline unsigned int lirc_buffer_write(struct lirc_buffer *buf, · 18 unmodified lines
142139 struct lirc_dev {
143140 char name[40];
144141 unsigned int minor;
145− __u32 code_length;
146142 __u32 features;
147143
148144 unsigned int buffer_size; /* in chunks holding one code each */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t