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
28ignore define LIRC_CAN_REC_MASK28ignore define LIRC_CAN_REC_MASK
29ignore define LIRC_CAN_SET_REC_DUTY_CYCLE29ignore define LIRC_CAN_SET_REC_DUTY_CYCLE
30 30
31# Obsolete ioctls
32
33ignore ioctl LIRC_GET_LENGTH
34
31# Undocumented macros35# Undocumented macros
32 36
33ignore define PULSE_BIT37ignore define PULSE_BIT
@@ -40,3 +44,4 @@ ignore define LIRC_VALUE_MASK · 6 unmodified lines
40ignore define LIRC_MODE2_MASK44ignore define LIRC_MODE2_MASK
41 45
42ignore define LIRC_MODE_RAW46ignore define LIRC_MODE_RAW
47ignore 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
72 this packet will be sent, with the number of microseconds with72 this packet will be sent, with the number of microseconds with
73 no IR.73 no IR.
74 74
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
90.. _lirc-mode-pulse:75.. _lirc-mode-pulse:
91 76
92``LIRC_MODE_PULSE``77``LIRC_MODE_PULSE``
Documentation/media/uapi/rc/lirc-func.rst+0−1
@@ -18,7 +18,6 @@ LIRC Function Reference · 17 unmodified lines
18 lirc-set-send-duty-cycle18 lirc-set-send-duty-cycle
19 lirc-get-timeout19 lirc-get-timeout
20 lirc-set-rec-timeout20 lirc-set-rec-timeout
21 lirc-get-length
22 lirc-set-rec-carrier21 lirc-set-rec-carrier
23 lirc-set-rec-carrier-range22 lirc-set-rec-carrier-range
24 lirc-set-send-carrier23 lirc-set-send-carrier
Documentation/media/uapi/rc/lirc-get-features.rst+2−5
@@ -62,8 +62,7 @@ LIRC features · 61 unmodified lines
62 62
63``LIRC_CAN_REC_LIRCCODE``63``LIRC_CAN_REC_LIRCCODE``
64 64
65 The driver is capable of receiving using65 Unused. Kept just to avoid breaking uAPI.
66 :ref:`LIRC_MODE_LIRCCODE <lirc-mode-LIRCCODE>`.
67 66
68.. _LIRC-CAN-SET-SEND-CARRIER:67.. _LIRC-CAN-SET-SEND-CARRIER:
69 68
@@ -170,9 +169,7 @@ LIRC features · 100 unmodified lines
170 169
171``LIRC_CAN_SEND_LIRCCODE``170``LIRC_CAN_SEND_LIRCCODE``
172 171
173 The driver supports sending (also called as IR blasting or IR TX) using172 Unused. Kept just to avoid breaking uAPI.
174 :ref:`LIRC_MODE_LIRCCODE <lirc-mode-LIRCCODE>`.
175
176 173
177Return Value174Return Value
178============175============
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*********************
6ioctl LIRC_GET_LENGTH
7*********************
8
9Name
10====
11
12LIRC_GET_LENGTH - Retrieves the code length in bits.
13
14Synopsis
15========
16
17.. c:function:: int ioctl( int fd, LIRC_GET_LENGTH, __u32 *length )
18 :name: LIRC_GET_LENGTH
19
20Arguments
21=========
22
23``fd``
24 File descriptor returned by open().
25
26``length``
27 length, in bits
28
29
30Description
31===========
32
33Retrieves the code length in bits (only for
34:ref:`LIRC_MODE_LIRCCODE <lirc-mode-lirccode>`).
35Reads on the device must be done in blocks matching the bit count.
36The bit could should be rounded up so that it matches full bytes.
37
38
39Return Value
40============
41
42On success 0 is returned, on error -1 and the ``errno`` variable is set
43appropriately. 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
34===========34===========
35 35
36Get/set supported receive modes. Only :ref:`LIRC_MODE_MODE2 <lirc-mode-mode2>`36Get/set supported receive modes. Only :ref:`LIRC_MODE_MODE2 <lirc-mode-mode2>`
37and :ref:`LIRC_MODE_LIRCCODE <lirc-mode-lirccode>` are supported for IR37is supported for IR receive.
38receive. Use :ref:`lirc_get_features` to find out which modes the driver
39supports.
40 38
41Return Value39Return Value
42============40============
Documentation/media/uapi/rc/lirc-get-send-mode.rst+1−2
@@ -36,8 +36,7 @@ Description · 35 unmodified lines
36 36
37Get/set current transmit mode.37Get/set current transmit mode.
38 38
39Only :ref:`LIRC_MODE_PULSE <lirc-mode-pulse>` and39Only :ref:`LIRC_MODE_PULSE <lirc-mode-pulse>` is supported by for IR send,
40:ref:`LIRC_MODE_LIRCCODE <lirc-mode-lirccode>` is supported by for IR send,
41depending on the driver. Use :ref:`lirc_get_features` to find out which40depending on the driver. Use :ref:`lirc_get_features` to find out which
42modes the driver supports.41modes the driver supports.
43 42
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
388 ldev->features = features;388 ldev->features = features;
389 ldev->data = &dev->raw->lirc;389 ldev->data = &dev->raw->lirc;
390 ldev->buf = NULL;390 ldev->buf = NULL;
391 ldev->code_length = sizeof(struct ir_raw_event) * 8;
392 ldev->chunk_size = sizeof(int);391 ldev->chunk_size = sizeof(int);
393 ldev->buffer_size = LIRCBUF_SIZE;392 ldev->buffer_size = LIRCBUF_SIZE;
394 ldev->fops = &lirc_fops;393 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
137 return -EINVAL;137 return -EINVAL;
138 }138 }
139 139
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
146 if (!d->buf && !(d->fops && d->fops->read &&140 if (!d->buf && !(d->fops && d->fops->read &&
147 d->fops->poll && d->fops->unlocked_ioctl)) {141 d->fops->poll && d->fops->unlocked_ioctl)) {
148 dev_err(&d->dev, "undefined read, poll, ioctl\n");142 dev_err(&d->dev, "undefined read, poll, ioctl\n");
@@ -152,9 +146,6 @@ int lirc_register_device(struct lirc_dev *d) · 3 unmodified lines
152 /* some safety check 8-) */146 /* some safety check 8-) */
153 d->name[sizeof(d->name) - 1] = '\0';147 d->name[sizeof(d->name) - 1] = '\0';
154 148
155 if (d->features == 0)
156 d->features = LIRC_CAN_REC_LIRCCODE;
157
158 if (LIRC_CAN_REC(d->features)) {149 if (LIRC_CAN_REC(d->features)) {
159 err = lirc_allocate_buffer(d);150 err = lirc_allocate_buffer(d);
160 if (err)151 if (err)
@@ -343,9 +334,6 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg) · 182 unmodified lines
343 * for now, lirc_serial doesn't support mode changing either334 * for now, lirc_serial doesn't support mode changing either
344 */335 */
345 break;336 break;
346 case LIRC_GET_LENGTH:
347 result = put_user(d->code_length, (__u32 __user *)arg);
348 break;
349 default:337 default:
350 result = -ENOTTY;338 result = -ENOTTY;
351 }339 }
include/media/lirc_dev.h+0−4
@@ -9,8 +9,6 @@ · 8 unmodified lines
9#ifndef _LINUX_LIRC_DEV_H9#ifndef _LINUX_LIRC_DEV_H
10#define _LINUX_LIRC_DEV_H10#define _LINUX_LIRC_DEV_H
11 11
12#define BUFLEN 16
13
14#include <linux/slab.h>12#include <linux/slab.h>
15#include <linux/fs.h>13#include <linux/fs.h>
16#include <linux/ioctl.h>14#include <linux/ioctl.h>
@@ -117,7 +115,6 @@ static inline unsigned int lirc_buffer_write(struct lirc_buffer *buf, · 100 unmodified lines
117 *115 *
118 * @name: used for logging116 * @name: used for logging
119 * @minor: the minor device (/dev/lircX) number for the device117 * @minor: the minor device (/dev/lircX) number for the device
120 * @code_length: length of a remote control key code expressed in bits
121 * @features: lirc compatible hardware features, like LIRC_MODE_RAW,118 * @features: lirc compatible hardware features, like LIRC_MODE_RAW,
122 * LIRC_CAN\_\*, as defined at include/media/lirc.h.119 * LIRC_CAN\_\*, as defined at include/media/lirc.h.
123 * @buffer_size: Number of FIFO buffers with @chunk_size size.120 * @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
142struct lirc_dev {139struct lirc_dev {
143 char name[40];140 char name[40];
144 unsigned int minor;141 unsigned int minor;
145 __u32 code_length;
146 __u32 features;142 __u32 features;
147 143
148 unsigned int buffer_size; /* in chunks holding one code each */144 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