rpms/kernel/devel config-generic, 1.299, 1.300 config-x86_64-generic, 1.84, 1.85 kernel.spec, 1.1607, 1.1608 linux-2.6.31-lirc.patch, 1.1, 1.2

Jarod Wilson jwilson at fedoraproject.org
Tue Jul 7 06:17:35 UTC 2009


Author: jwilson

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

Modified Files:
	config-generic config-x86_64-generic kernel.spec 
	linux-2.6.31-lirc.patch 
Log Message:
* Tue Jul 07 2009 Jarod Wilson <jarod at redhat.com>
- Make lirc_i2c actually work with 2.6.31 i2c



Index: config-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/config-generic,v
retrieving revision 1.299
retrieving revision 1.300
diff -u -p -r1.299 -r1.300
--- config-generic	6 Jul 2009 16:07:33 -0000	1.299
+++ config-generic	7 Jul 2009 06:17:03 -0000	1.300
@@ -82,7 +82,7 @@ CONFIG_PCI_STUB=y
 CONFIG_PCI_IOV=y
 CONFIG_HT_IRQ=y
 CONFIG_PCI_MSI=y
-CONFIG_PCI_MSI_DEFAULT_ON=y
+# CONFIG_PCI_MSI_DEFAULT_ON is not set
 CONFIG_PCIEPORTBUS=y
 CONFIG_PCIEAER=y
 CONFIG_PCIEASPM=y
@@ -1407,10 +1407,10 @@ CONFIG_ATMEL=m
 # CONFIG_BCM43XX is not set
 CONFIG_B43=m
 CONFIG_B43_PCMCIA=y
-CONFIG_B43_DEBUG=y
+# CONFIG_B43_DEBUG is not set
 # CONFIG_B43_FORCE_PIO is not set
 CONFIG_B43LEGACY=m
-CONFIG_B43LEGACY_DEBUG=y
+# CONFIG_B43LEGACY_DEBUG is not set
 CONFIG_B43LEGACY_DMA=y
 CONFIG_B43LEGACY_PIO=y
 CONFIG_B43LEGACY_DMA_AND_PIO_MODE=y
@@ -3538,7 +3538,7 @@ CONFIG_PM_LEGACY=y
 CONFIG_PM_DEBUG=y
 CONFIG_PM_TRACE=y
 # CONFIG_PM_VERBOSE is not set
-CONFIG_PM_TEST_SUSPEND=y
+# CONFIG_PM_TEST_SUSPEND is not set
 
 ## BEGIN ISA Junk.
 
@@ -3981,7 +3981,7 @@ CONFIG_USB_ATMEL=m
 # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
 CONFIG_FUNCTION_TRACER=y
 # CONFIG_FUNCTION_GRAPH_TRACER is not set
-CONFIG_BOOT_TRACER=y
+# CONFIG_BOOT_TRACER is not set
 CONFIG_STACK_TRACER=y
 # CONFIG_DYNAMIC_PRINTK_DEBUG is not set
 CONFIG_EARLY_PRINTK_DBGP=y


Index: config-x86_64-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/config-x86_64-generic,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -p -r1.84 -r1.85
--- config-x86_64-generic	7 Jul 2009 00:39:57 -0000	1.84
+++ config-x86_64-generic	7 Jul 2009 06:17:03 -0000	1.85
@@ -16,7 +16,7 @@ CONFIG_NUMA=y
 CONFIG_K8_NUMA=y
 CONFIG_X86_64_ACPI_NUMA=y
 # CONFIG_NUMA_EMU is not set
-CONFIG_NR_CPUS=512
+CONFIG_NR_CPUS=64
 CONFIG_X86_POWERNOW_K8=m
 CONFIG_X86_POWERNOW_K8_ACPI=y
 CONFIG_X86_P4_CLOCKMOD=m 


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1607
retrieving revision 1.1608
diff -u -p -r1.1607 -r1.1608
--- kernel.spec	7 Jul 2009 00:39:57 -0000	1.1607
+++ kernel.spec	7 Jul 2009 06:17:04 -0000	1.1608
@@ -1840,6 +1840,9 @@ fi
 # and build.
 
 %changelog
+* Tue Jul 07 2009 Jarod Wilson <jarod at redhat.com>
+- Make lirc_i2c actually work with 2.6.31 i2c
+
 * Mon Jul 06 2009 Chuck Ebbert <cebbert at redhat.com>
 - Use LZMA for kernel compression on X86.
 

linux-2.6.31-lirc.patch:

Index: linux-2.6.31-lirc.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6.31-lirc.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- linux-2.6.31-lirc.patch	6 Jul 2009 16:07:34 -0000	1.1
+++ linux-2.6.31-lirc.patch	7 Jul 2009 06:17:04 -0000	1.2
@@ -1,5 +1,7 @@
 Linux Infrared Remote Control drivers -- http://www.lirc.org
 
+Last updated: Tuesday, July 7, 2009
+
 From http://git.wilsonet.com/linux-2.6-lirc.git/
 
 Signed-off-by: Jarod Wilson <jarod at redhat.com>
@@ -14,9 +16,9 @@ Signed-off-by: Jarod Wilson <jarod at redha
  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_i2c.c         |  537 +++++++++
  drivers/input/lirc/lirc_igorplugusb.c |  556 +++++++++
- drivers/input/lirc/lirc_imon.c        | 2061 +++++++++++++++++++++++++++++++++
+ drivers/input/lirc/lirc_imon.c        | 2062 +++++++++++++++++++++++++++++++++
  drivers/input/lirc/lirc_it87.c        |  986 ++++++++++++++++
  drivers/input/lirc/lirc_it87.h        |  116 ++
  drivers/input/lirc/lirc_ite8709.c     |  539 +++++++++
@@ -29,13 +31,13 @@ Signed-off-by: Jarod Wilson <jarod at redha
  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(-)
+ 24 files changed, 14506 insertions(+), 0 deletions(-)
 
 diff --git a/MAINTAINERS b/MAINTAINERS
-index 1d47043..3009f88 100644
+index 381190c..fc79bdf 100644
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -3553,6 +3553,15 @@ W:	http://www.pasemi.com/
+@@ -3632,6 +3632,15 @@ W:	http://www.pasemi.com/
  L:	linuxppc-dev at ozlabs.org
  S:	Supported
  
@@ -1572,7 +1574,7 @@ index 0000000..a5d5c89
 +MODULE_PARM_DESC(debug, "Enable debugging messages");
 diff --git a/drivers/input/lirc/lirc_dev.h b/drivers/input/lirc/lirc_dev.h
 new file mode 100644
-index 0000000..69828a8
+index 0000000..8eeffa2
 --- /dev/null
 +++ b/drivers/input/lirc/lirc_dev.h
 @@ -0,0 +1,184 @@
@@ -1607,7 +1609,7 @@ index 0000000..69828a8
 +	 * And should allow for some performance fine tunning later */
 +	struct kfifo *fifo;
 +};
-+static void lirc_buffer_clear(struct lirc_buffer *buf)
++static inline void lirc_buffer_clear(struct lirc_buffer *buf)
 +{
 +	if (buf->fifo)
 +		kfifo_reset(buf->fifo);
@@ -1762,10 +1764,10 @@ index 0000000..69828a8
 +#endif
 diff --git a/drivers/input/lirc/lirc_i2c.c b/drivers/input/lirc/lirc_i2c.c
 new file mode 100644
-index 0000000..24b08a3
+index 0000000..5a7f9d0
 --- /dev/null
 +++ b/drivers/input/lirc/lirc_i2c.c
-@@ -0,0 +1,509 @@
+@@ -0,0 +1,537 @@
 +/*
 + * lirc_i2c.c
 + *
@@ -1936,15 +1938,18 @@ index 0000000..24b08a3
 +	struct IR *ir = data;
 +	__u16 code;
 +	unsigned char codes[2];
++	int ret;
 +
 +	/* poll IR chip */
-+	if (size == i2c_master_recv(&ir->c, keybuf, size)) {
++	ret = i2c_master_recv(&ir->c, keybuf, size);
++	if (ret == size) {
 +		ir->b[0] = keybuf[offset];
 +		ir->b[1] = keybuf[offset+1];
 +		ir->b[2] = keybuf[offset+2];
-+		dprintk("key (0x%02x/0x%02x)\n", ir->b[0], ir->b[1]);
++		if (ir->b[0] != 0x00 && ir->b[1] != 0x00)
++			dprintk("key (0x%02x/0x%02x)\n", ir->b[0], ir->b[1]);
 +	} else {
-+		dprintk("read error\n");
++		dprintk("read error (ret=%d)\n", ret);
 +		/* keep last successful read buffer */
 +	}
 +
@@ -1959,6 +1964,7 @@ index 0000000..24b08a3
 +	codes[1] = code & 0xff;
 +
 +	/* return it */
++	dprintk("sending code 0x%02x%02x to lirc\n", codes[0], codes[1]);
 +	lirc_buffer_write(buf, codes);
 +	return 0;
 +}
@@ -2091,6 +2097,8 @@ index 0000000..24b08a3
 +{
 +	struct IR *ir = data;
 +
++	dprintk("%s called\n", __func__);
++
 +	/* lock bttv in memory while /dev/lirc is in use  */
 +	i2c_use_client(&ir->c);
 +
@@ -2101,6 +2109,8 @@ index 0000000..24b08a3
 +{
 +	struct IR *ir = data;
 +
++	dprintk("%s called\n", __func__);
++
 +	i2c_release_client(&ir->c);
 +}
 +
@@ -2118,7 +2128,7 @@ index 0000000..24b08a3
 +
 +static const struct i2c_device_id ir_receiver_id[] = {
 +	/* Generic entry for any IR receiver */
-+	{ "ir_lirc_i2c", 0 },
++	{ "ir_video", 0 },
 +	/* IR device specific entries could be added here */
 +	{ }
 +};
@@ -2134,6 +2144,28 @@ index 0000000..24b08a3
 +	.id_table	= ir_receiver_id,
 +};
 +
++static void pcf_probe(struct i2c_client *client, struct IR *ir)
++{
++	int ret1, ret2, ret3, ret4;
++
++	ret1 = i2c_smbus_write_byte(client, 0xff);
++	ret2 = i2c_smbus_read_byte(client);
++	ret3 = i2c_smbus_write_byte(client, 0x00);
++	ret4 = i2c_smbus_read_byte(client);
++
++	/* in the Asus TV-Box: bit 1-0 */
++	if (((ret2 & 0x03) == 0x03) && ((ret4 & 0x03) == 0x00)) {
++		ir->bits = (unsigned char) ~0x07;
++		ir->flag = 0x04;
++	/* in the Creative/VisionTek BreakOut-Box: bit 7-6 */
++	} else if (((ret2 & 0xc0) == 0xc0) && ((ret4 & 0xc0) == 0x00)) {
++		ir->bits = (unsigned char) ~0xe0;
++		ir->flag = 0x20;
++	}
++
++	return;
++}
++
 +static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
 +{
 +	struct IR *ir;
@@ -2145,7 +2177,7 @@ index 0000000..24b08a3
 +	if (!ir)
 +		return -ENOMEM;
 +	memcpy(&ir->l, &lirc_template, sizeof(struct lirc_driver));
-+	memcpy(&ir->c, &client, sizeof(struct i2c_client));
++	memcpy(&ir->c, client, sizeof(struct i2c_client));
 +
 +	i2c_set_clientdata(client, ir);
 +	ir->l.data    = ir;
@@ -2203,12 +2235,10 @@ index 0000000..24b08a3
 +		break;
 +	case 0x21:
 +	case 0x23:
++		pcf_probe(client, ir);
 +		strlcpy(ir->c.name, "TV-Box IR", I2C_NAME_SIZE);
 +		ir->l.code_length = 8;
 +		ir->l.add_to_buf = add_to_buf_pcf8574;
-+		// FIXME: broken by 2.6.31 i2c fixups...
-+		//ir->bits = flags & 0xff;
-+		//ir->flag = (flags >> 8) & 0xff;
 +		break;
 +	default:
 +		/* shouldn't happen */
@@ -2839,10 +2869,10 @@ index 0000000..ff49bdd
 +
 diff --git a/drivers/input/lirc/lirc_imon.c b/drivers/input/lirc/lirc_imon.c
 new file mode 100644
-index 0000000..987f182
+index 0000000..83e4101
 --- /dev/null
 +++ b/drivers/input/lirc/lirc_imon.c
-@@ -0,0 +1,2061 @@
+@@ -0,0 +1,2062 @@
 +/*
 + *   lirc_imon.c:  LIRC/VFD/LCD driver for SoundGraph iMON IR/VFD/LCD
 + *		   including the iMON PAD model
@@ -4757,7 +4787,8 @@ index 0000000..987f182
 +	case 6:
 +		usb_free_urb(rx_urb);
 +	case 5:
-+		lirc_buffer_free(rbuf);
++		if (rbuf)
++			lirc_buffer_free(rbuf);
 +	case 4:
 +		kfree(rbuf);
 +	case 3:
@@ -13286,7 +13317,7 @@ index 0000000..2955bad
 +module_exit(ttusbir_exit_module);
 diff --git a/drivers/input/lirc/lirc_zilog.c b/drivers/input/lirc/lirc_zilog.c
 new file mode 100644
-index 0000000..71a6f15
+index 0000000..a06e6de
 --- /dev/null
 +++ b/drivers/input/lirc/lirc_zilog.c
 @@ -0,0 +1,1374 @@
@@ -14386,7 +14417,7 @@ index 0000000..71a6f15
 +
 +static const struct i2c_device_id ir_transceiver_id[] = {
 +	/* Generic entry for any IR transceiver */
-+	{ "ir_lirc_i2c", 0 },
++	{ "ir_video", 0 },
 +	/* IR device specific entries could be added here */
 +	{ }
 +};




More information about the fedora-extras-commits mailing list