rpms/kernel/devel kernel.spec, 1.351, 1.352 linux-2.6-lirc.patch, 1.3, 1.4 linux-2.6-lirc-semaphore-to-completion.patch, 1.1, NONE
Jarod Wilson (jwilson)
fedora-extras-commits at redhat.com
Thu Jan 10 16:55:43 UTC 2008
- Previous message (by thread): rpms/perl-Perl-MinimumVersion/F-7 perl-Perl-MinimumVersion.spec, 1.2, 1.3
- Next message (by thread): rpms/odccm/devel odccm-odccmd, NONE, 1.1 odccm.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jwilson
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20826
Modified Files:
kernel.spec linux-2.6-lirc.patch
Removed Files:
linux-2.6-lirc-semaphore-to-completion.patch
Log Message:
* Thu Jan 10 2008 Jarod Wilson <jwilson at redhat.com>
- Update lirc to latest upstream plus kthread support
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.351
retrieving revision 1.352
diff -u -r1.351 -r1.352
--- kernel.spec 10 Jan 2008 14:51:34 -0000 1.351
+++ kernel.spec 10 Jan 2008 16:54:51 -0000 1.352
@@ -634,7 +634,6 @@
Patch1504: linux-2.6-xfs-optimize-away-realtime-tests.patch
Patch1509: linux-2.6-xfs-setfattr-32bit-compat.patch
Patch1515: linux-2.6-lirc.patch
-Patch1516: linux-2.6-lirc-semaphore-to-completion.patch
Patch1520: linux-2.6-dcdbas-autoload.patch
# drm-mm catchup (modesetting, ...)
@@ -1153,7 +1152,6 @@
# http://www.lirc.org/
ApplyPatch linux-2.6-lirc.patch
-ApplyPatch linux-2.6-lirc-semaphore-to-completion.patch
# DMI autoloading for dcdbas driver
ApplyPatch linux-2.6-dcdbas-autoload.patch
@@ -1739,6 +1737,9 @@
%kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL} -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.conf %{with_xen} xen
%changelog
+* Thu Jan 10 2008 Jarod Wilson <jwilson at redhat.com>
+- Update lirc to latest upstream plus kthread support
+
* Thu Jan 10 2008 Kyle McMartin <kmcmartin at redhat.com>
- 2.6.24-rc7-git2
linux-2.6-lirc.patch:
View full diff with command:
/usr/bin/cvs -f diff -kk -u -N -r 1.3 -r 1.4 linux-2.6-lirc.patch
Index: linux-2.6-lirc.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-lirc.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- linux-2.6-lirc.patch 13 Sep 2007 18:17:42 -0000 1.3
+++ linux-2.6-lirc.patch 10 Jan 2008 16:54:51 -0000 1.4
@@ -1,8 +1,43 @@
+Linux Infrared Remote Control drivers (http://lirc.org/)
+
+Signed-off-by: Jarod Wilson <jwilson at redhat.com>
+
+ drivers/input/Kconfig | 2 +
+ drivers/input/Makefile | 1 +
+ drivers/input/lirc/Kconfig | 127 +++
+ drivers/input/lirc/Makefile | 24 +
+ drivers/input/lirc/commandir.c | 1009 +++++++++++++++++++++++
+ drivers/input/lirc/commandir.h | 41 +
+ drivers/input/lirc/kcompat.h | 150 ++++
+ drivers/input/lirc/lirc.h | 101 +++
+ drivers/input/lirc/lirc_atiusb.c | 1326 ++++++++++++++++++++++++++++++
+ drivers/input/lirc/lirc_bt829.c | 393 +++++++++
+ drivers/input/lirc/lirc_cmdir.c | 605 ++++++++++++++
+ drivers/input/lirc/lirc_cmdir.h | 27 +
+ drivers/input/lirc/lirc_dev.c | 827 +++++++++++++++++++
+ drivers/input/lirc/lirc_dev.h | 264 ++++++
+ drivers/input/lirc/lirc_i2c.c | 671 +++++++++++++++
+ drivers/input/lirc/lirc_igorplugusb.c | 624 ++++++++++++++
+ drivers/input/lirc/lirc_imon.c | 1165 +++++++++++++++++++++++++++
+ drivers/input/lirc/lirc_it87.c | 1012 +++++++++++++++++++++++
+ drivers/input/lirc/lirc_it87.h | 116 +++
+ drivers/input/lirc/lirc_mceusb.c | 890 ++++++++++++++++++++
+ drivers/input/lirc/lirc_mceusb2.c | 1042 ++++++++++++++++++++++++
+ drivers/input/lirc/lirc_parallel.c | 745 +++++++++++++++++
+ drivers/input/lirc/lirc_parallel.h | 26 +
+ drivers/input/lirc/lirc_pvr150.c | 1431 +++++++++++++++++++++++++++++++++
+ drivers/input/lirc/lirc_sasem.c | 971 ++++++++++++++++++++++
+ drivers/input/lirc/lirc_serial.c | 1348 +++++++++++++++++++++++++++++++
+ drivers/input/lirc/lirc_sir.c | 1323 ++++++++++++++++++++++++++++++
+ drivers/input/lirc/lirc_streamzap.c | 810 +++++++++++++++++++
+ drivers/input/lirc/lirc_ttusbir.c | 393 +++++++++
+ 29 files changed, 17464 insertions(+), 0 deletions(-)
+
diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig
-index 2d87357..61fd0ca 100644
+index 63512d9..de4b170 100644
--- a/drivers/input/Kconfig
+++ b/drivers/input/Kconfig
-@@ -183,5 +183,7 @@ source "drivers/input/gameport/Kconfig"
+@@ -161,5 +161,7 @@ source "drivers/input/gameport/Kconfig"
endmenu
@@ -11,15 +46,14 @@
endmenu
diff --git a/drivers/input/Makefile b/drivers/input/Makefile
-index 15eb752..195d342 100644
+index 99af903..78b0420 100644
--- a/drivers/input/Makefile
+++ b/drivers/input/Makefile
-@@ -22,4 +22,4 @@ obj-$(CONFIG_INPUT_JOYSTICK) += joystick/
- obj-$(CONFIG_INPUT_TABLET) += tablet/
+@@ -22,3 +22,4 @@ obj-$(CONFIG_INPUT_TABLET) += tablet/
obj-$(CONFIG_INPUT_TOUCHSCREEN) += touchscreen/
obj-$(CONFIG_INPUT_MISC) += misc/
--
-+obj-$(CONFIG_INPUT_LIRC) += lirc/
+
++obj-$(CONFIG_INPUT_LIRC) += lirc/
diff --git a/drivers/input/lirc/Kconfig b/drivers/input/lirc/Kconfig
new file mode 100644
index 0000000..138e58a
@@ -185,10 +219,10 @@
+obj-$(CONFIG_LIRC_TTUSBIR) += lirc_ttusbir.o
diff --git a/drivers/input/lirc/commandir.c b/drivers/input/lirc/commandir.c
new file mode 100644
-index 0000000..32f46aa
+index 0000000..a49d996
--- /dev/null
+++ b/drivers/input/lirc/commandir.c
-@@ -0,0 +1,999 @@
+@@ -0,0 +1,1009 @@
+
+/*
+ *
@@ -275,8 +309,7 @@
+int debug_commandir;
+
+/* Structure to hold all of our device specific stuff */
-+struct usb_skel
-+{
++struct usb_skel {
+ struct usb_device *udev; /* the usb device for this device */
+ struct usb_interface *interface; /* the interface for this device */
+ unsigned char *bulk_in_buffer; /* the buffer to receive data */
@@ -447,7 +480,8 @@
+
+ /* check whether minor already includes base */
+ minor = interface->minor;
-+ if (minor >= USB_CMDIR_MINOR_BASE) minor = minor-USB_CMDIR_MINOR_BASE;
++ if (minor >= USB_CMDIR_MINOR_BASE)
++ minor = minor-USB_CMDIR_MINOR_BASE;
+
+ /* let the user know what node this device is now attached to */
+ info("CommandIR USB device now attached to commandir%d", minor);
@@ -462,6 +496,7 @@
+ return retval;
+}
+
++
+static void cmdir_disconnect(struct usb_interface *interface)
+{
+ struct usb_skel *dev;
@@ -482,7 +517,8 @@
+ kref_put(&dev->kref, cmdir_delete);
+
+ /* check whether minor already includes base */
-+ if (minor >= USB_CMDIR_MINOR_BASE) minor = minor-USB_CMDIR_MINOR_BASE;
++ if (minor >= USB_CMDIR_MINOR_BASE)
++ minor = minor-USB_CMDIR_MINOR_BASE;
+
+ info("CommandIR #%d now disconnected", minor);
+
@@ -491,7 +527,8 @@
+ /* decrement until find next valid device */
+ while (rx_device > 0) {
+ rx_device--;
-+ if (cmdir_check(rx_device) == 0) break;
++ if (cmdir_check(rx_device) == 0)
++ break;
+ }
+ if (minor > 0)
+ info("Active Receiver is on CommandIR #%d", rx_device);
@@ -509,7 +546,7 @@
+ return -ENODEV;
+
+ /* decrement the count on our device */
-+ kref_put(&dev->kref, cmdir_delete);
++ kref_put(&dev->kref, cmdir_delete);
+ return retval;
+}
+
@@ -595,19 +632,22 @@
+ }
+ if (transmitters & (multiplier*0x02)) {
+ cmdir_var[next_pos] = '2';
-+ if (next_comma > 0) cmdir_var[next_pos-2] = ',';
++ if (next_comma > 0)
++ cmdir_var[next_pos-2] = ',';
+ next_pos += 3;
+ next_comma++;
+ }
+ if (transmitters & (multiplier*0x04)) {
+ cmdir_var[next_pos] = '3';
-+ if (next_comma > 0) cmdir_var[next_pos-2] = ',';
++ if (next_comma > 0)
++ cmdir_var[next_pos-2] = ',';
+ next_pos += 3;
+ next_comma++;
+ }
+ if (transmitters & (multiplier*0x08)) {
+ cmdir_var[next_pos] = '4';
-+ if (next_comma > 0) cmdir_var[next_pos-2] = ',';
++ if (next_comma > 0)
++ cmdir_var[next_pos-2] = ',';
+ next_pos += 3;
+ next_comma++;
+ }
@@ -905,7 +945,8 @@
+ /* start it up: */
+
+ last_sent = nexttosend - 1;
-+ if (last_sent < 0) last_sent = QUEUELENGTH - 1;
++ if (last_sent < 0)
++ last_sent = QUEUELENGTH - 1;
+ /* Final check - is it TIME to send this packet yet? */
+ /* if (wait_to_tx(waitusecs[last_sent]) == 0) { */
+ /* always send if there's room,
@@ -966,8 +1007,10 @@
+ * for non-zero last_tx's. */
+ int wait_until_sec = 0, wait_until_usec = 0;
+ int now_sec = 0, now_usec = 0;
-+ if (debug_commandir == 1) printk(KERN_INFO "waittotx(%d)\n", usecs);
-+ if (usecs == 0) return 0;
++ if (debug_commandir == 1)
++ printk(KERN_INFO "waittotx(%d)\n", usecs);
++ if (usecs == 0)
++ return 0;
+
+ if (!(last_tx_sec == 0 && last_tx_usec == 0)) {
+ /* calculate wait time: */
@@ -1166,7 +1209,8 @@
+ struct usb_skel *dev;
+ dev = (struct usb_skel *)urb->context;
+ send_status = SEND_IDLE;
-+ if (debug_commandir == 1) printk(KERN_INFO "callback()\n");
++ if (debug_commandir == 1)
++ printk(KERN_INFO "callback()\n");
[...2980 lines suppressed...]
+ sz->plugin.set_use_dec = &streamzap_use_dec;
+ sz->plugin.ioctl = streamzap_ioctl;
-+#ifdef LIRC_HAVE_SYSFS
+ sz->plugin.dev = &udev->dev;
-+#endif
+ sz->plugin.owner = THIS_MODULE;
+
+ sz->idle = 1;
@@ -17505,9 +17062,10 @@
+ if (sz->urb_in)
+ usb_free_urb(sz->urb_in);
+
-+ if (sz->buf_in)
++ if (sz->buf_in) {
+ usb_buffer_free(udev, sz->buf_in_len,
+ sz->buf_in, sz->dma_in);
++ }
+ kfree(sz);
+ }
+
@@ -17722,10 +17280,10 @@
+#endif /* MODULE */
diff --git a/drivers/input/lirc/lirc_ttusbir.c b/drivers/input/lirc/lirc_ttusbir.c
new file mode 100644
-index 0000000..b80dbf8
+index 0000000..929583d
--- /dev/null
+++ b/drivers/input/lirc/lirc_ttusbir.c
-@@ -0,0 +1,361 @@
+@@ -0,0 +1,393 @@
+/****************************************************************************
+ ** lirc_ttusbir.c ***********************************************************
+ ****************************************************************************
@@ -17749,6 +17307,16 @@
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
++
++/* This LIRC driver provides access to the TechnoTrend USB IR Receiver.
++ * The receiver delivers the IR signal as raw sampled true/false data in
++ * isochronous USB packets each of size 128 byte.
++ * Currently the driver reduces the sampling rate by factor of 8 as this
++ * is still more than enough to decode RC-5 - others should be analyzed.
++ * But the driver does not rely on RC-5 it should be able to decode every
++ * IR signal that is not too fast.
++ */
++
+#include <linux/version.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
@@ -17765,9 +17333,6 @@
+MODULE_AUTHOR("Stefan Macher (st_maker-lirc at yahoo.de)");
+MODULE_LICENSE("GPL");
+
-+/* @TODO Is it enough to have only two, I guess yes */
-+#define NUM_URBS 4 /* Number of URBs used in the queue */
-+
+/* #define DEBUG */
+#ifdef DEBUG
+#define DPRINTK printk
@@ -17782,6 +17347,12 @@
+static int set_use_inc(void *data);
+static void set_use_dec(void *data);
+
++static int num_urbs = 2;
++module_param(num_urbs, int, 0444);
++MODULE_PARM_DESC(num_urbs,
++ "Number of URBs in queue. Try to increase to 4 in case "
++ "of problems (default: 2; minimum: 2)");
++
+/* table of devices that work with this driver */
+static struct usb_device_id device_id_table[] = {
+ { USB_DEVICE(0x0B48, 0x2003) },
@@ -17798,8 +17369,7 @@
+};
+
+/* USB device definition */
-+struct ttusbir_device
-+{
++struct ttusbir_device {
+ struct usb_driver *driver;
+ struct usb_device *udev;
+ struct usb_interface *interf;
@@ -17807,8 +17377,8 @@
+ unsigned int ifnum; /* Interface number to use */
+ unsigned int alt_setting; /* alternate setting to use */
+ unsigned int endpoint; /* Endpoint to use */
-+ struct urb *urb[NUM_URBS];
-+ char buffer[NUM_URBS][128];
++ struct urb **urb; /* num_urb URB pointers*/
++ char **buffer; /* 128 byte buffer for each URB */
+ struct lirc_buffer rbuf; /* Buffer towards LIRC */
+ struct lirc_plugin plugin;
+ int minor;
@@ -17826,10 +17396,10 @@
+ struct ttusbir_device *ttusbir = data;
+
+ DPRINTK("Sending first URBs\n");
-+
++ /* @TODO Do I need to check if I am already opened */
+ ttusbir->opened = 1;
+
-+ for (i = 0; i < NUM_URBS; i++)
++ for (i = 0; i < num_urbs; i++)
+ usb_submit_urb(ttusbir->urb[i], GFP_KERNEL);
+
+ return 0;
@@ -17848,11 +17418,12 @@
+ * USB specific functions
+ */
+
-+/* This mapping table is used to do a very simple filtering of the input signal
-+ * For a value with at least 4 bits set it returns 0xFF otherwise 0x00.
-+ * For faster IR signals this can not be used. But for RC-5 we still have
-+ * about 14 bytes per pulse/space
-+ */
++/* This mapping table is used to do a very simple filtering of the
++ * input signal.
++ * For a value with at least 4 bits set it returns 0xFF otherwise
++ * 0x00. For faster IR signals this can not be used. But for RC-5 we
++ * still have about 14 samples per pulse/space, i.e. we sample with 14
++ * times higher frequency than the signal frequency */
+const unsigned char map_table[] =
+{
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -17904,6 +17475,7 @@
+ buf = (unsigned char *)urb->transfer_buffer;
+
+ for (i = 0; i < 128; i++) {
++ /* Here we do the filtering and some kind of down sampling */
+ buf[i] = ~map_table[buf[i]];
+ if (ttusbir->last_pulse == buf[i]) {
+ if (ttusbir->last_num < PULSE_MASK/63)
@@ -17933,6 +17505,7 @@
+ int alt_set, endp;
+ int found = 0;
+ int i, j;
++ int struct_size;
+ struct usb_host_interface *host_interf;
+ struct usb_interface_descriptor *interf_desc;
+ struct usb_host_endpoint *host_endpoint;
@@ -17940,12 +17513,27 @@
+
+ DPRINTK("Module ttusbir probe\n");
+
-+ ttusbir = (struct ttusbir_device *)
-+ kzalloc(sizeof(struct ttusbir_device), GFP_KERNEL);
++ /* To reduce memory fragmentation we use only one allocation */
++ struct_size = sizeof(struct ttusbir_device) +
++ (sizeof(struct urb *) * num_urbs) +
++ (sizeof(char *) * num_urbs) +
++ (num_urbs * 128);
++ ttusbir = kmalloc(struct_size, GFP_KERNEL);
+ if (!ttusbir)
+ return -ENOMEM;
++ memset(ttusbir, 0, struct_size);
++
++ ttusbir->urb = (struct urb **)((char *)ttusbir +
++ sizeof(struct ttusbir_device));
++ ttusbir->buffer = (char **)((char *)ttusbir->urb +
++ (sizeof(struct urb *) * num_urbs));
++ for (i = 0; i < num_urbs; i++)
++ ttusbir->buffer[i] = (char *)ttusbir->buffer +
++ (sizeof(char *)*num_urbs) + (i * 128);
++
+ ttusbir->driver = &driver;
+ ttusbir->alt_setting = -1;
++ /* @TODO check if error can be returned */
+ ttusbir->udev = usb_get_dev(interface_to_usbdev(intf));
+ ttusbir->interf = intf;
+ ttusbir->last_pulse = 0x00;
@@ -18014,7 +17602,7 @@
+ }
+
+ /* Allocate and setup the URB that we will use to talk to the device */
-+ for (i = 0; i < NUM_URBS; i++) {
++ for (i = 0; i < num_urbs; i++) {
+ ttusbir->urb[i] = usb_alloc_urb(8, GFP_KERNEL);
+ if (!ttusbir->urb[i]) {
+ err("Could not allocate memory for the URB\n");
@@ -18053,14 +17641,16 @@
+
+ DPRINTK("Module ttusbir disconnect\n");
+
-+ lock_kernel();
+ ttusbir = (struct ttusbir_device *) usb_get_intfdata(intf);
+ usb_set_intfdata(intf, NULL);
+ lirc_unregister_plugin(ttusbir->minor);
-+ unlock_kernel();
++ DPRINTK("unregistered\n");
+
-+ for (i = 0; i < NUM_URBS; i++)
++ for (i = 0; i < num_urbs; i++) {
++ usb_kill_urb(ttusbir->urb[i]);
+ usb_free_urb(ttusbir->urb[i]);
++ }
++ DPRINTK("URBs killed\n");
+ lirc_buffer_free(&ttusbir->rbuf);
+ kfree(ttusbir);
+}
--- linux-2.6-lirc-semaphore-to-completion.patch DELETED ---
- Previous message (by thread): rpms/perl-Perl-MinimumVersion/F-7 perl-Perl-MinimumVersion.spec, 1.2, 1.3
- Next message (by thread): rpms/odccm/devel odccm-odccmd, NONE, 1.1 odccm.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list