rpms/kernel/devel linux-2.6.31-lirc.patch, NONE, 1.1 config-generic, 1.298, 1.299 kernel.spec, 1.1605, 1.1606 linux-2.6.29-lirc.patch, 1.10, NONE

Jarod Wilson jwilson at fedoraproject.org
Mon Jul 6 16:08:04 UTC 2009


Author: jwilson

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv17099

Modified Files:
	config-generic kernel.spec 
Added Files:
	linux-2.6.31-lirc.patch 
Removed Files:
	linux-2.6.29-lirc.patch 
Log Message:
* Mon Jul 06 2009 Jarod Wilson <jarod at redhat.com>
- Hack up lirc_i2c and lirc_zilog to compile with 2.6.31 i2c
  changes. The drivers might not actually be functional now, but
  at least they compile again. Will fix later, if need be...


linux-2.6.31-lirc.patch:

--- NEW FILE linux-2.6.31-lirc.patch ---
Linux Infrared Remote Control drivers -- http://www.lirc.org

>From http://git.wilsonet.com/linux-2.6-lirc.git/

Signed-off-by: Jarod Wilson <jarod at redhat.com>

---
 MAINTAINERS                           |    9 +
 drivers/input/Kconfig                 |    2 +
 drivers/input/Makefile                |    2 +
 drivers/input/lirc/Kconfig            |  112 ++
 drivers/input/lirc/Makefile           |   20 +
 drivers/input/lirc/lirc.h             |  100 ++
 drivers/input/lirc/lirc_bt829.c       |  383 ++++++
 drivers/input/lirc/lirc_dev.c         |  851 ++++++++++++++
 drivers/input/lirc/lirc_dev.h         |  184 +++
 drivers/input/lirc/lirc_i2c.c         |  509 ++++++++
 drivers/input/lirc/lirc_igorplugusb.c |  556 +++++++++
 drivers/input/lirc/lirc_imon.c        | 2061 +++++++++++++++++++++++++++++++++
 drivers/input/lirc/lirc_it87.c        |  986 ++++++++++++++++
 drivers/input/lirc/lirc_it87.h        |  116 ++
 drivers/input/lirc/lirc_ite8709.c     |  539 +++++++++
 drivers/input/lirc/lirc_mceusb.c      | 1223 +++++++++++++++++++
 drivers/input/lirc/lirc_parallel.c    |  709 +++++++++++
 drivers/input/lirc/lirc_parallel.h    |   26 +
 drivers/input/lirc/lirc_sasem.c       |  931 +++++++++++++++
 drivers/input/lirc/lirc_serial.c      | 1316 +++++++++++++++++++++
 drivers/input/lirc/lirc_sir.c         | 1294 +++++++++++++++++++++
 drivers/input/lirc/lirc_streamzap.c   |  777 +++++++++++++
 drivers/input/lirc/lirc_ttusbir.c     |  397 +++++++
 drivers/input/lirc/lirc_zilog.c       | 1374 ++++++++++++++++++++++
 24 files changed, 14477 insertions(+), 0 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 1d47043..3009f88 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3553,6 +3553,15 @@ W:	http://www.pasemi.com/
 L:	linuxppc-dev at ozlabs.org
 S:	Supported
 
+LINUX INFRARED REMOTE CONTROL DRIVERS (LIRC)
+P:	Jarod Wilson
+M:	jarod at redhat.com
+P:	Christoph Bartelmus
+M:	lirc at bartelmus.de
+W:	http://www.lirc.org/
+L:	lirc-list at lists.sourceforge.net
+S:	Maintained
+
 LINUX SECURITY MODULE (LSM) FRAMEWORK
 P:	Chris Wright
 M:	chrisw at sous-sol.org
diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig
index cd50c00..442f94f 100644
--- a/drivers/input/Kconfig
+++ b/drivers/input/Kconfig
@@ -170,6 +170,8 @@ source "drivers/input/tablet/Kconfig"
 
 source "drivers/input/touchscreen/Kconfig"
 
+source "drivers/input/lirc/Kconfig"
+
 source "drivers/input/misc/Kconfig"
 
 endif
diff --git a/drivers/input/Makefile b/drivers/input/Makefile
index 4c9c745..99e2b5e 100644
--- a/drivers/input/Makefile
+++ b/drivers/input/Makefile
@@ -25,3 +25,5 @@ obj-$(CONFIG_INPUT_MISC)	+= misc/
 obj-$(CONFIG_INPUT_APMPOWER)	+= apm-power.o
 
 obj-$(CONFIG_XEN_KBDDEV_FRONTEND)	+= xen-kbdfront.o
+
+obj-$(CONFIG_INPUT_LIRC)       += lirc/
diff --git a/drivers/input/lirc/Kconfig b/drivers/input/lirc/Kconfig
new file mode 100644
index 0000000..6ef8622
--- /dev/null
+++ b/drivers/input/lirc/Kconfig
@@ -0,0 +1,112 @@
+#
+# LIRC driver(s) configuration
+#
+menuconfig INPUT_LIRC
+	bool "Linux Infrared Remote Control IR receiver/transmitter drivers"
+	help
+	  Say Y here, and all supported Linux Infrared Remote Control IR and
+	  RF receiver and transmitter drivers will be displayed. When paired
+	  with a remote control and the lirc daemon, the receiver drivers
+	  allow control of your Linux system via remote control.
+
+if INPUT_LIRC
+
+config LIRC_DEV
+	tristate "LIRC device loadable module support"
+	help
+	  LIRC device loadable module support, required for most LIRC drivers
+
+config LIRC_BT829
+        tristate "BT829 based hardware"
+	depends on LIRC_DEV
+	help
+	  Driver for the IR interface on BT829-based hardware
+
+config LIRC_I2C
+	tristate "I2C Based IR Receivers"
+	depends on LIRC_DEV
+	help
+	  Driver for I2C-based IR receivers, such as those commonly
+	  found onboard Hauppauge PVR-150/250/350 video capture cards
+
+config LIRC_IGORPLUGUSB
+	tristate "Igor Cesko's USB IR Receiver"
+	depends on LIRC_DEV && USB
+	help
+	  Driver for Igor Cesko's USB IR Receiver
+
+config LIRC_IMON
+	tristate "Soundgraph IMON Receiver"
+	depends on LIRC_DEV
+	help
+	  Driver for the Soundgraph IMON IR Receiver
+
+config LIRC_IT87
+	tristate "ITE IT87XX CIR Port Receiver"
+	depends on LIRC_DEV
+	help
+	  Driver for the ITE IT87xx IR Receiver
+
+config LIRC_ITE8709
+	tristate "ITE8709 CIR Port Receiver"
+	depends on LIRC_DEV && PNP
+	help
+	  Driver for the ITE8709 IR Receiver
+
+config LIRC_MCEUSB
+	tristate "Windows Media Center Ed. USB IR Transceiver"
+	depends on LIRC_DEV && USB
+	help
+	  Driver for Windows Media Center Ed. USB IR Transceivers
+
+config LIRC_PARALLEL
+	tristate "Homebrew Parallel Port Receiver"
+	depends on LIRC_DEV && !SMP
+	help
+	  Driver for Homebrew Parallel Port Receivers
+
+config LIRC_SASEM
+	tristate "Sasem USB IR Remote"
+	depends on LIRC_DEV
+	help
+	  Driver for the Sasem OnAir Remocon-V or Dign HV5 HTPC IR/VFD Module
+
+config LIRC_SERIAL
+	tristate "Homebrew Serial Port Receiver"
+	depends on LIRC_DEV
+	help
+	  Driver for Homebrew Serial Port Receivers
+
+config LIRC_SERIAL_TRANSMITTER
+	bool "Serial Port Transmitter"
+	default y
+	depends on LIRC_SERIAL
+	help
+	  Serial Port Transmitter support
+
+config LIRC_SIR
+	tristate "Built-in SIR IrDA port"
+	depends on LIRC_DEV
+	help
+	  Driver for the SIR IrDA port
+
+config LIRC_STREAMZAP
+	tristate "Streamzap PC Receiver"
+	depends on LIRC_DEV
+	help
+	  Driver for the Streamzap PC Receiver
+
+config LIRC_TTUSBIR
+	tristate "Technotrend USB IR Receiver"
+	depends on LIRC_DEV && USB
+	help
+	  Driver for the Technotrend USB IR Receiver
+
+config LIRC_ZILOG
+	tristate "Zilog/Hauppauge IR Transmitter"
+	depends on LIRC_DEV
+	help
+	  Driver for the Zilog/Hauppauge IR Transmitter, found on
+	  PVR-150/500, HVR-1200/1250/1700/1800, HD-PVR and other cards
+
+endif
diff --git a/drivers/input/lirc/Makefile b/drivers/input/lirc/Makefile
new file mode 100644
index 0000000..7b1386e
--- /dev/null
+++ b/drivers/input/lirc/Makefile
[...14267 lines suppressed...]
+		ir->task = kthread_run(lirc_thread, ir, "lirc_zilog");
+		if (IS_ERR(ir->task)) {
+			ret = PTR_ERR(ir->task);
+			zilog_error("lirc_register_driver: cannot run "
+				    "poll thread %d\n", ret);
+			goto err;
+		}
+		wait_for_completion(&tn);
+		ir->t_notify = NULL;
+	}
+
+	/* initialise TX device */
+	memcpy(&ir->c_tx, &client_template, sizeof(struct i2c_client));
+	if (have_tx) {
+		/* I2C attach to device */
+		ir->c_tx.addr = 0x70;
+		strncpy(ir->c_tx.name, "Zilog/Hauppauge TX", I2C_NAME_SIZE);
+		ret = i2c_attach(&ir->c_tx, ir);
+		if (ret != 0)
+			goto err;
+	}
+
+	/* set lirc_dev stuff */
+	ir->l.code_length = 13;
+	ir->l.rbuf	  = &ir->buf;
+	ir->l.fops	= &lirc_fops;
+	ir->l.data	= ir;
+	ir->l.minor       = minor;
+	ir->l.sample_rate = 0;
+
+	/* register with lirc */
+	ir->l.minor = lirc_register_driver(&ir->l);
+	if (ir->l.minor < 0 || ir->l.minor >= MAX_IRCTL_DEVICES) {
+		zilog_error("ir_attach: \"minor\" must be between 0 and %d "
+			    "(%d)!\n", MAX_IRCTL_DEVICES-1, ir->l.minor);
+		ret = -EBADRQC;
+		goto err;
+	}
+
+	/* store this for getting back in open() later on */
+	ir_devices[ir->l.minor] = ir;
+
+	/*
+	 * if we have the tx device, load the 'firmware'.  We do this
+	 * after registering with lirc as otherwise hotplug seems to take
+	 * 10s to create the lirc device.
+	 */
+	if (have_tx) {
+		/* Special TX init */
+		ret = tx_init(ir);
+		if (ret != 0)
+			goto err;
+	}
+	return 0;
+
+err:
+	/* undo everything, hopefully... */
+	if (ir->c_rx.addr)
+		ir_remove(&ir->c_rx);
+	if (ir->c_tx.addr)
+		ir_remove(&ir->c_tx);
+	return ret;
+}
+
+static int ir_remove(struct i2c_client *client)
+{
+	struct IR *ir = i2c_get_clientdata(client);
+	mutex_lock(&ir->lock);
+
+	if (client == &ir->c_rx) {
+		DECLARE_COMPLETION(tn);
+		DECLARE_COMPLETION(tn2);
+
+		/* end up polling thread */
+		if (ir->task && !IS_ERR(ir->task)) {
+			ir->t_notify = &tn;
+			ir->t_notify2 = &tn2;
+			ir->shutdown = 1;
+			wake_up_process(ir->task);
+			complete(&tn2);
+			wait_for_completion(&tn);
+			ir->t_notify = NULL;
+			ir->t_notify2 = NULL;
+		}
+
+	} else {
+		mutex_unlock(&ir->lock);
+		zilog_error("%s: detached from something we didn't "
+			    "attach to\n", __func__);
+		return -ENODEV;
+	}
+
+	--ir->devs;
+	if (ir->devs < 0) {
+		mutex_unlock(&ir->lock);
+		zilog_error("%s: invalid device count\n", __func__);
+		return -ENODEV;
+	} else if (ir->devs == 0) {
+		/* unregister lirc driver */
+		if (ir->l.minor >= 0 && ir->l.minor < MAX_IRCTL_DEVICES) {
+			lirc_unregister_driver(ir->l.minor);
+			ir_devices[ir->l.minor] = NULL;
+		}
+
+		/* free memory */
+		lirc_buffer_free(&ir->buf);
+		mutex_unlock(&ir->lock);
+		kfree(ir);
+		return 0;
+	}
+	mutex_unlock(&ir->lock);
+	return 0;
+}
+
+static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
+{
+	struct i2c_adapter *adap = client->adapter;
+	char buf;
+
+	if (adap->id == I2C_HW_B_BT848 ||
+#ifdef I2C_HW_B_HDPVR
+	    adap->id == I2C_HW_B_HDPVR ||
+#endif
+	    adap->id == I2C_HW_B_CX2341X) {
+		int have_rx = 0, have_tx = 0;
+
+		/*
+		 * The external IR receiver is at i2c address 0x71.
+		 * The IR transmitter is at 0x70.
+		 */
+		client->addr = 0x70;
+
+		if (!disable_rx) {
+			if (i2c_master_recv(client, &buf, 1) == 1)
+				have_rx = 1;
+			dprintk("probe 0x70 @ %s: %s\n",
+				adap->name,
+				have_rx ? "yes" : "no");
+		}
+
+		if (!disable_tx) {
+			client->addr = 0x71;
+			if (i2c_master_recv(client, &buf, 1) == 1)
+				have_tx = 1;
+			dprintk("probe 0x71 @ %s: %s\n",
+				adap->name,
+				have_tx ? "yes" : "no");
+		}
+
+		if (have_rx || have_tx)
+			return ir_attach(adap, have_rx, have_tx);
+		else
+			zilog_error("%s: no devices found\n", adap->name);
+	}
+
+	return 0;
+}
+
+static int ir_command(struct i2c_client *client, unsigned int cmd, void *arg)
+{
+	/* nothing */
+	return 0;
+}
+
+static int __init zilog_init(void)
+{
+	mutex_init(&tx_data_lock);
+	request_module("firmware_class");
+	i2c_add_driver(&driver);
+	return 0;
+}
+
+static void __exit zilog_exit(void)
+{
+	i2c_del_driver(&driver);
+	/* if loaded */
+	fw_unload();
+}
+
+module_init(zilog_init);
+module_exit(zilog_exit);
+
+MODULE_DESCRIPTION("Zilog/Hauppauge infrared transmitter driver (i2c stack)");
+MODULE_AUTHOR("Gerd Knorr, Michal Kochanowicz, Christoph Bartelmus, "
+	      "Ulrich Mueller, Stefan Jahn, Jerome Brock, Mark Weaver");
+MODULE_LICENSE("GPL");
+/* for compat with old name, which isn't all that accurate anymore */
+MODULE_ALIAS("lirc_pvr150");
+
+module_param(minor, int, 0444);
+MODULE_PARM_DESC(minor, "Preferred minor device number");
+
+module_param(debug, bool, 0644);
+MODULE_PARM_DESC(debug, "Enable debugging messages");
+
+module_param(disable_rx, bool, 0644);
+MODULE_PARM_DESC(disable_rx, "Disable the IR receiver device");
+
+module_param(disable_tx, bool, 0644);
+MODULE_PARM_DESC(disable_tx, "Disable the IR transmitter device");


Index: config-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/config-generic,v
retrieving revision 1.298
retrieving revision 1.299
diff -u -p -r1.298 -r1.299
--- config-generic	3 Jul 2009 06:21:26 -0000	1.298
+++ config-generic	6 Jul 2009 16:07:33 -0000	1.299
@@ -3804,7 +3804,6 @@ CONFIG_LIRC_IMON=m
 CONFIG_LIRC_IT87=m
 CONFIG_LIRC_ITE8709=m
 CONFIG_LIRC_MCEUSB=m
-CONFIG_LIRC_MCEUSB2=m
 CONFIG_LIRC_ZILOG=m
 CONFIG_LIRC_PARALLEL=m
 CONFIG_LIRC_SERIAL=m


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1605
retrieving revision 1.1606
diff -u -p -r1.1605 -r1.1606
--- kernel.spec	5 Jul 2009 00:38:37 -0000	1.1605
+++ kernel.spec	6 Jul 2009 16:07:33 -0000	1.1606
@@ -646,7 +646,7 @@ Patch900: linux-2.6-pci-cacheline-sizing
 
 Patch1000: linux-2.6-neigh_-fix-state-transition-INCOMPLETE-_FAILED-via-Netlink-request.patch
 
-Patch1515: linux-2.6.29-lirc.patch
+Patch1515: linux-2.6.31-lirc.patch
 
 # nouveau + drm fixes
 Patch1811: drm-next.patch
@@ -1214,7 +1214,7 @@ ApplyPatch linux-2.6-pci-cacheline-sizin
 #ApplyPatch linux-2.6-neigh_-fix-state-transition-INCOMPLETE-_FAILED-via-Netlink-request.patch
 
 # http://www.lirc.org/
-#ApplyPatch linux-2.6.29-lirc.patch
+ApplyPatch linux-2.6.31-lirc.patch
 
 ApplyPatch linux-2.6-e1000-ich9.patch
 
@@ -1840,6 +1840,11 @@ fi
 # and build.
 
 %changelog
+* Mon Jul 06 2009 Jarod Wilson <jarod at redhat.com>
+- Hack up lirc_i2c and lirc_zilog to compile with 2.6.31 i2c
+  changes. The drivers might not actually be functional now, but
+  at least they compile again. Will fix later, if need be...
+
 * Sat Jul 04 2009 Dave Jones <davej at redhat.com> 2.6.31-0.42.rc2
 - 2.6.31-rc2
 


--- linux-2.6.29-lirc.patch DELETED ---




More information about the fedora-extras-commits mailing list