rpms/kernel/F-11 hdpvr-ir-enable.patch, 1.1, 1.2 hid-ignore-all-recent-imon-devices.patch, 1.1, 1.2 kernel.spec, 1.1698, 1.1699 linux-2.6.29-lirc.patch, 1.11, 1.12
Jarod Wilson
jwilson at fedoraproject.org
Mon Aug 10 20:19:23 UTC 2009
- Previous message (by thread): rpms/kernel/F-11 linux-2.6-defaults-saner-vm-settings.patch, 1.2, 1.3 linux-2.6-mm-lru-dont-evict-mapped-executable-pages.patch, 1.3, 1.4 linux-2.6-mm-lru-evict-streaming-io-pages-first.patch, 1.3, 1.4 linux-2.6-mm-lru-report-vm-flags-in-page-referenced.patch, 1.2, 1.3 kernel.spec, 1.1697, 1.1698
- Next message (by thread): rpms/amavisd-new/devel amavisd-snmp.init, NONE, 1.1 .cvsignore, 1.12, 1.13 amavisd-conf.patch, 1.7, 1.8 amavisd-new.spec, 1.26, 1.27 sources, 1.12, 1.13
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jwilson
Update of /cvs/pkgs/rpms/kernel/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv6882
Modified Files:
kernel.spec linux-2.6.29-lirc.patch
Added Files:
hdpvr-ir-enable.patch hid-ignore-all-recent-imon-devices.patch
Log Message:
* Mon Aug 10 2009 Jarod Wilson <jarod at redhat.com>
- Add tunable pad threshold support to lirc_imon
- Blacklist all iMON devices in usbhid driver so lirc_imon can bind
- Add new device ID to lirc_mceusb (#512483)
- Enable IR transceiver on the HD PVR
hdpvr-ir-enable.patch:
hdpvr-core.c | 3 +--
hdpvr-i2c.c | 36 +++++++++++++++++++++++++++++-------
2 files changed, 30 insertions(+), 9 deletions(-)
Index: hdpvr-ir-enable.patch
===================================================================
RCS file: hdpvr-ir-enable.patch
diff -N hdpvr-ir-enable.patch
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ hdpvr-ir-enable.patch 10 Aug 2009 20:19:22 -0000 1.2
@@ -0,0 +1,118 @@
+From http://hg.jannau.net/hdpvr/, pending v4l-dvb pull request
+
+---
+ drivers/media/video/hdpvr/hdpvr-core.c | 3 +-
+ drivers/media/video/hdpvr/hdpvr-i2c.c | 36 +++++++++++++++++++++++++------
+ 2 files changed, 30 insertions(+), 9 deletions(-)
+
+diff --git a/drivers/media/video/hdpvr/hdpvr-core.c b/drivers/media/video/hdpvr/hdpvr-core.c
+index 188bd5a..878d1e5 100644
+--- a/drivers/media/video/hdpvr/hdpvr-core.c
++++ b/drivers/media/video/hdpvr/hdpvr-core.c
+@@ -363,8 +363,7 @@ static int hdpvr_probe(struct usb_interface *interface,
+ }
+
+ #ifdef CONFIG_I2C
+- /* until i2c is working properly */
+- retval = 0; /* hdpvr_register_i2c_adapter(dev); */
++ retval = hdpvr_register_i2c_adapter(dev);
+ if (retval < 0) {
+ v4l2_err(&dev->v4l2_dev, "registering i2c adapter failed\n");
+ goto error;
+diff --git a/drivers/media/video/hdpvr/hdpvr-i2c.c b/drivers/media/video/hdpvr/hdpvr-i2c.c
+index c4b5d15..1c01b6c 100644
+--- a/drivers/media/video/hdpvr/hdpvr-i2c.c
++++ b/drivers/media/video/hdpvr/hdpvr-i2c.c
+@@ -22,7 +22,7 @@
+ #define REQTYPE_I2C_WRITE_STATT 0xd0
+
+ static int hdpvr_i2c_read(struct hdpvr_device *dev, unsigned char addr,
+- char *data, int len)
++ char *data, int len, int bus)
+ {
+ int ret;
+ char *buf = kmalloc(len, GFP_KERNEL);
+@@ -32,7 +32,7 @@ static int hdpvr_i2c_read(struct hdpvr_device *dev, unsigned char addr,
+ ret = usb_control_msg(dev->udev,
+ usb_rcvctrlpipe(dev->udev, 0),
+ REQTYPE_I2C_READ, CTRL_READ_REQUEST,
+- 0x100|addr, 0, buf, len, 1000);
++ bus<<8 | addr, 0, buf, len, 1000);
+
+ if (ret == len) {
+ memcpy(data, buf, len);
+@@ -46,7 +46,7 @@ static int hdpvr_i2c_read(struct hdpvr_device *dev, unsigned char addr,
+ }
+
+ static int hdpvr_i2c_write(struct hdpvr_device *dev, unsigned char addr,
+- char *data, int len)
++ char *data, int len, int bus)
+ {
+ int ret;
+ char *buf = kmalloc(len, GFP_KERNEL);
+@@ -57,14 +57,14 @@ static int hdpvr_i2c_write(struct hdpvr_device *dev, unsigned char addr,
+ ret = usb_control_msg(dev->udev,
+ usb_sndctrlpipe(dev->udev, 0),
+ REQTYPE_I2C_WRITE, CTRL_WRITE_REQUEST,
+- 0x100|addr, 0, buf, len, 1000);
++ bus<<8 | addr, 0, buf, len, 1000);
+
+ if (ret < 0)
+ goto error;
+
+ ret = usb_control_msg(dev->udev,
+ usb_rcvctrlpipe(dev->udev, 0),
+- REQTYPE_I2C_WRITE_STATT, CTRL_READ_REQUEST,
++ REQTYPE_I2C_WRITE_STATT, CTRL_READ_REQUEST,
+ 0, 0, buf, 2, 1000);
+
+ if (ret == 2)
+@@ -93,10 +93,10 @@ static int hdpvr_transfer(struct i2c_adapter *i2c_adapter, struct i2c_msg *msgs,
+
+ if (msgs[i].flags & I2C_M_RD)
+ retval = hdpvr_i2c_read(dev, addr, msgs[i].buf,
+- msgs[i].len);
++ msgs[i].len, 1);
+ else
+ retval = hdpvr_i2c_write(dev, addr, msgs[i].buf,
+- msgs[i].len);
++ msgs[i].len, 1);
+ }
+
+ mutex_unlock(&dev->i2c_mutex);
+@@ -114,6 +114,26 @@ static struct i2c_algorithm hdpvr_algo = {
+ .functionality = hdpvr_functionality,
+ };
+
++static int hdpvr_activate_ir(struct hdpvr_device *dev)
++{
++ char buffer[8];
++
++ mutex_lock(&dev->i2c_mutex);
++
++ hdpvr_i2c_read(dev, 0x54, buffer, 1, 0);
++
++ buffer[0] = 0;
++ buffer[1] = 0x8;
++ hdpvr_i2c_write(dev, 0x54, buffer, 2, 1);
++
++ buffer[1] = 0x18;
++ hdpvr_i2c_write(dev, 0x54, buffer, 2, 1);
++
++ mutex_unlock(&dev->i2c_mutex);
++ return 0;
++}
++
++
+ int hdpvr_register_i2c_adapter(struct hdpvr_device *dev)
+ {
+ struct i2c_adapter *i2c_adap;
+@@ -123,6 +143,8 @@ int hdpvr_register_i2c_adapter(struct hdpvr_device *dev)
+ if (i2c_adap == NULL)
+ goto error;
+
++ hdpvr_activate_ir(dev);
++
+ strlcpy(i2c_adap->name, "Hauppauge HD PVR I2C",
+ sizeof(i2c_adap->name));
+ i2c_adap->algo = &hdpvr_algo;
hid-ignore-all-recent-imon-devices.patch:
hid-core.c | 10 +++++-----
hid-ids.h | 7 ++-----
2 files changed, 7 insertions(+), 10 deletions(-)
Index: hid-ignore-all-recent-imon-devices.patch
===================================================================
RCS file: hid-ignore-all-recent-imon-devices.patch
diff -N hid-ignore-all-recent-imon-devices.patch
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ hid-ignore-all-recent-imon-devices.patch 10 Aug 2009 20:19:22 -0000 1.2
@@ -0,0 +1,63 @@
+[PATCH] hid: ignore all recent SoundGraph iMON devices
+
+After some inspection of the Windows iMON driver, several additional
+device IDs were added to the lirc_imon driver. At least a few of these
+have been seen in the wild, and require manual quirking to keep the
+usbhid driver from binding to them. Rather than list out every single
+device, ignore the entire device ID range, 0x0034 - 0x0046. Some of
+these may not advertise themselves as HID devices, but no harm done to
+such devices anyway.
+
+Signed-off-by: Jarod Wilson <jarod at redhat.com>
+
+---
+ drivers/hid/hid-core.c | 10 +++++-----
+ drivers/hid/hid-ids.h | 7 ++-----
+ 2 files changed, 7 insertions(+), 10 deletions(-)
+
+diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
+index 5eb10c2..18bf803 100644
+--- a/drivers/hid/hid-core.c
++++ b/drivers/hid/hid-core.c
+@@ -1623,11 +1623,6 @@ static const struct hid_device_id hid_ignore_list[] = {
+ { HID_USB_DEVICE(USB_VENDOR_ID_PANJIT, 0x0003) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_PANJIT, 0x0004) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_POWERCOM, USB_DEVICE_ID_POWERCOM_UPS) },
+- { HID_USB_DEVICE(USB_VENDOR_ID_SOUNDGRAPH, USB_DEVICE_ID_SOUNDGRAPH_IMON_LCD) },
+- { HID_USB_DEVICE(USB_VENDOR_ID_SOUNDGRAPH, USB_DEVICE_ID_SOUNDGRAPH_IMON_LCD2) },
+- { HID_USB_DEVICE(USB_VENDOR_ID_SOUNDGRAPH, USB_DEVICE_ID_SOUNDGRAPH_IMON_LCD3) },
+- { HID_USB_DEVICE(USB_VENDOR_ID_SOUNDGRAPH, USB_DEVICE_ID_SOUNDGRAPH_IMON_LCD4) },
+- { HID_USB_DEVICE(USB_VENDOR_ID_SOUNDGRAPH, USB_DEVICE_ID_SOUNDGRAPH_IMON_LCD5) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_TENX, USB_DEVICE_ID_TENX_IBUDDY1) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_TENX, USB_DEVICE_ID_TENX_IBUDDY2) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_LABPRO) },
+@@ -1694,6 +1689,11 @@ static bool hid_ignore(struct hid_device *hdev)
+ hdev->product <= USB_DEVICE_ID_LOGITECH_HARMONY_LAST)
+ return true;
+ break;
++ case USB_VENDOR_ID_SOUNDGRAPH:
++ if (hdev->product >= USB_DEVICE_ID_SOUNDGRAPH_IMON_FIRST &&
++ hdev->product <= USB_DEVICE_ID_SOUNDGRAPH_IMON_LAST)
++ return true;
++ break;
+ }
+
+ if (hdev->type == HID_TYPE_USBMOUSE &&
+diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
+index 6301010..989a3ba 100644
+--- a/drivers/hid/hid-ids.h
++++ b/drivers/hid/hid-ids.h
+@@ -376,11 +376,8 @@
+ #define USB_DEVICE_ID_SONY_PS3_CONTROLLER 0x0268
+
+ #define USB_VENDOR_ID_SOUNDGRAPH 0x15c2
+-#define USB_DEVICE_ID_SOUNDGRAPH_IMON_LCD 0x0038
+-#define USB_DEVICE_ID_SOUNDGRAPH_IMON_LCD2 0x0036
+-#define USB_DEVICE_ID_SOUNDGRAPH_IMON_LCD3 0x0034
+-#define USB_DEVICE_ID_SOUNDGRAPH_IMON_LCD4 0x0044
+-#define USB_DEVICE_ID_SOUNDGRAPH_IMON_LCD5 0x0045
++#define USB_DEVICE_ID_SOUNDGRAPH_IMON_FIRST 0x0034
++#define USB_DEVICE_ID_SOUNDGRAPH_IMON_LAST 0x0046
+
+ #define USB_VENDOR_ID_SUN 0x0430
+ #define USB_DEVICE_ID_RARITAN_KVM_DONGLE 0xcdab
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/kernel.spec,v
retrieving revision 1.1698
retrieving revision 1.1699
diff -u -p -r1.1698 -r1.1699
--- kernel.spec 10 Aug 2009 20:18:34 -0000 1.1698
+++ kernel.spec 10 Aug 2009 20:19:23 -0000 1.1699
@@ -647,6 +647,8 @@ Patch800: linux-2.6-crash-driver.patch
Patch1000: linux-2.6-neigh_-fix-state-transition-INCOMPLETE-_FAILED-via-Netlink-request.patch
Patch1515: linux-2.6.29-lirc.patch
+Patch1517: hid-ignore-all-recent-imon-devices.patch
+Patch1518: hdpvr-ir-enable.patch
Patch1700: agp-set_memory_ucwb.patch
# nouveau + drm fixes
@@ -1871,6 +1873,12 @@ fi
# and build.
%changelog
+* Mon Aug 10 2009 Jarod Wilson <jarod at redhat.com>
+- Add tunable pad threshold support to lirc_imon
+- Blacklist all iMON devices in usbhid driver so lirc_imon can bind
+- Add new device ID to lirc_mceusb (#512483)
+- Enable IR transceiver on the HD PVR
+
* Mon Aug 10 2009 Kyle McMartin <kyle at redhat.com>
- Patch sync-up with F-11-2.6.29.y:
- linux-2.6-x86-delay-tsc-barrier.patch
linux-2.6.29-lirc.patch:
Kconfig | 112 ++
Makefile | 20
lirc.h | 100 ++
lirc_bt829.c | 383 ++++++++
lirc_dev.c | 851 +++++++++++++++++++
lirc_dev.h | 184 ++++
lirc_i2c.c | 649 ++++++++++++++
lirc_igorplugusb.c | 556 ++++++++++++
lirc_imon.c | 2298 +++++++++++++++++++++++++++++++++++++++++++++++++++++
lirc_it87.c | 986 ++++++++++++++++++++++
lirc_it87.h | 116 ++
lirc_ite8709.c | 539 ++++++++++++
lirc_mceusb.c | 1225 ++++++++++++++++++++++++++++
lirc_parallel.c | 709 ++++++++++++++++
lirc_parallel.h | 26
lirc_sasem.c | 931 +++++++++++++++++++++
lirc_serial.c | 1316 ++++++++++++++++++++++++++++++
lirc_sir.c | 1283 +++++++++++++++++++++++++++++
lirc_streamzap.c | 777 +++++++++++++++++
lirc_ttusbir.c | 397 +++++++++
lirc_zilog.c | 1374 +++++++++++++++++++++++++++++++
21 files changed, 14832 insertions(+)
View full diff with command:
/usr/bin/cvs -n -f diff -kk -u -p -N -r 1.11 -r 1.12 linux-2.6.29-lirc.patchIndex: linux-2.6.29-lirc.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/linux-2.6.29-lirc.patch,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -p -r1.11 -r1.12
--- linux-2.6.29-lirc.patch 25 Jul 2009 04:09:30 -0000 1.11
+++ linux-2.6.29-lirc.patch 10 Aug 2009 20:19:23 -0000 1.12
@@ -2,85 +2,40 @@ Linux Infrared Remote Control drivers --
From http://git.wilsonet.com/linux-2.6-lirc.git/
+Refreshed 20090910
+
Signed-off-by: Jarod Wilson <jarod at redhat.com>
---
- MAINTAINERS | 9 +
- drivers/input/Kconfig | 2 +
- drivers/input/Makefile | 2 +
- drivers/input/lirc/Kconfig | 118 ++
- drivers/input/lirc/Makefile | 21 +
+ 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 | 849 ++++++++++++++
+ drivers/input/lirc/lirc_dev.c | 851 ++++++++++++
drivers/input/lirc/lirc_dev.h | 184 +++
- drivers/input/lirc/lirc_i2c.c | 649 +++++++++++
- drivers/input/lirc/lirc_igorplugusb.c | 556 +++++++++
- drivers/input/lirc/lirc_imon.c | 2043 +++++++++++++++++++++++++++++++++
- drivers/input/lirc/lirc_it87.c | 986 ++++++++++++++++
+ drivers/input/lirc/lirc_i2c.c | 649 ++++++++++
+ drivers/input/lirc/lirc_igorplugusb.c | 556 ++++++++
+ drivers/input/lirc/lirc_imon.c | 2298 +++++++++++++++++++++++++++++++++
+ 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 | 749 ++++++++++++
- drivers/input/lirc/lirc_mceusb2.c | 1103 ++++++++++++++++++
- drivers/input/lirc/lirc_parallel.c | 709 ++++++++++++
+ drivers/input/lirc/lirc_ite8709.c | 539 ++++++++
+ drivers/input/lirc/lirc_mceusb.c | 1225 ++++++++++++++++++
+ 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 | 1384 ++++++++++++++++++++++
- 25 files changed, 15243 insertions(+), 0 deletions(-)
+ drivers/input/lirc/lirc_sasem.c | 931 ++++++++++++++
+ drivers/input/lirc/lirc_serial.c | 1316 +++++++++++++++++++
+ drivers/input/lirc/lirc_sir.c | 1283 ++++++++++++++++++
+ drivers/input/lirc/lirc_streamzap.c | 777 +++++++++++
+ drivers/input/lirc/lirc_ttusbir.c | 397 ++++++
+ drivers/input/lirc/lirc_zilog.c | 1374 ++++++++++++++++++++
+ 21 files changed, 14832 insertions(+), 0 deletions(-)
-diff --git a/MAINTAINERS b/MAINTAINERS
-index 59fd2d1..ad1b16c 100644
---- a/MAINTAINERS
-+++ b/MAINTAINERS
-@@ -2749,6 +2749,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 5f9d860..2ba0904 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..0482bb9
+index 0000000..6ef8622
--- /dev/null
+++ b/drivers/input/lirc/Kconfig
-@@ -0,0 +1,118 @@
+@@ -0,0 +1,112 @@
+#
+# LIRC driver(s) configuration
+#
@@ -137,16 +92,10 @@ index 0000000..0482bb9
+ Driver for the ITE8709 IR Receiver
+
+config LIRC_MCEUSB
-+ tristate "Microsoft Media Center Ed. Receiver, v1"
-+ depends on LIRC_DEV && USB
-+ help
-+ Driver for the Microsoft Media Center Ed. Receiver, v1
-+
-+config LIRC_MCEUSB2
-+ tristate "Microsoft Media Center Ed. Receiver, v2"
++ tristate "Windows Media Center Ed. USB IR Transceiver"
+ depends on LIRC_DEV && USB
+ help
-+ Driver for the Microsoft Media Center Ed. Receiver, v2
++ Driver for Windows Media Center Ed. USB IR Transceivers
+
+config LIRC_PARALLEL
+ tristate "Homebrew Parallel Port Receiver"
@@ -201,10 +150,10 @@ index 0000000..0482bb9
+endif
diff --git a/drivers/input/lirc/Makefile b/drivers/input/lirc/Makefile
new file mode 100644
-index 0000000..a22df78
+index 0000000..7b1386e
--- /dev/null
+++ b/drivers/input/lirc/Makefile
-@@ -0,0 +1,21 @@
+@@ -0,0 +1,20 @@
+# Makefile for the lirc drivers.
+#
+
@@ -218,7 +167,6 @@ index 0000000..a22df78
+obj-$(CONFIG_LIRC_IT87) += lirc_it87.o
+obj-$(CONFIG_LIRC_ITE8709) += lirc_ite8709.o
+obj-$(CONFIG_LIRC_MCEUSB) += lirc_mceusb.o
-+obj-$(CONFIG_LIRC_MCEUSB2) += lirc_mceusb2.o
+obj-$(CONFIG_LIRC_PARALLEL) += lirc_parallel.o
+obj-$(CONFIG_LIRC_SASEM) += lirc_sasem.o
+obj-$(CONFIG_LIRC_SERIAL) += lirc_serial.o
@@ -723,10 +671,10 @@ index 0000000..0485884
+MODULE_PARM_DESC(debug, "Debug enabled or not");
diff --git a/drivers/input/lirc/lirc_dev.c b/drivers/input/lirc/lirc_dev.c
new file mode 100644
-index 0000000..8848d8e
+index 0000000..0510b4e
--- /dev/null
+++ b/drivers/input/lirc/lirc_dev.c
-@@ -0,0 +1,849 @@
+@@ -0,0 +1,851 @@
+/*
+ * LIRC base driver
+ *
@@ -800,7 +748,7 @@ index 0000000..8848d8e
+ struct cdev cdev;
+};
+
-+static DEFINE_MUTEX(driver_lock);
++static DEFINE_MUTEX(lirc_dev_lock);
+
+static struct irctl *irctls[MAX_IRCTL_DEVICES];
+
@@ -812,6 +760,7 @@ index 0000000..8848d8e
+ */
+static void init_irctl(struct irctl *ir)
+{
++ dprintk(LOGHEAD "initializing irctl\n", ir->d.name, ir->d.minor);
+ mutex_init(&ir->buffer_lock);
+ ir->d.minor = NOPLUG;
+}
@@ -914,7 +863,7 @@ index 0000000..8848d8e
+ cdev_init(&ir->cdev, &fops);
+ ir->cdev.owner = THIS_MODULE;
+ }
-+ kobject_set_name(&ir->cdev.kobj, "lircv%d", d->minor);
++ kobject_set_name(&ir->cdev.kobj, "lirc%d", d->minor);
+
+ retval = cdev_add(&ir->cdev, MKDEV(MAJOR(lirc_base_dev), d->minor), 1);
+ if (retval)
@@ -995,7 +944,7 @@ index 0000000..8848d8e
+ goto out;
+ }
+
-+ mutex_lock(&driver_lock);
++ mutex_lock(&lirc_dev_lock);
[...2619 lines suppressed...]
+
+static int io = LIRC_PORT;
+static int irq = LIRC_IRQ;
@@ -11730,7 +11310,6 @@ index 0000000..6c64072
+static DECLARE_WAIT_QUEUE_HEAD(lirc_read_queue);
+
+static DEFINE_SPINLOCK(hardware_lock);
-+static DEFINE_SPINLOCK(dev_lock);
+
+static int rx_buf[RBUF_LEN];
+static unsigned int rx_tail, rx_head;
@@ -11747,8 +11326,6 @@ index 0000000..6c64072
+/* SECTION: Prototypes */
+
+/* Communication with user-space */
-+static int lirc_open(struct inode *inode, struct file *file);
-+static int lirc_close(struct inode *inode, struct file *file);
+static unsigned int lirc_poll(struct file *file, poll_table *wait);
+static ssize_t lirc_read(struct file *file, char *buf, size_t count,
+ loff_t *ppos);
@@ -11808,22 +11385,6 @@ index 0000000..6c64072
+
+/* SECTION: Communication with user-space */
+
-+static int lirc_open(struct inode *inode, struct file *file)
-+{
-+ spin_lock(&dev_lock);
-+ if (module_refcount(THIS_MODULE)) {
-+ spin_unlock(&dev_lock);
-+ return -EBUSY;
-+ }
-+ spin_unlock(&dev_lock);
-+ return 0;
-+}
-+
-+static int lirc_close(struct inode *inode, struct file *file)
-+{
-+ return 0;
-+}
-+
+static unsigned int lirc_poll(struct file *file, poll_table *wait)
+{
+ poll_wait(file, &lirc_read_queue, wait);
@@ -12038,8 +11599,8 @@ index 0000000..6c64072
+ .write = lirc_write,
+ .poll = lirc_poll,
+ .ioctl = lirc_ioctl,
-+ .open = lirc_open,
-+ .release = lirc_close,
++ .open = lirc_dev_fop_open,
++ .release = lirc_dev_fop_close,
+};
+
+static int set_use_inc(void *data)
@@ -14049,10 +13610,10 @@ 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..049c3da
+index 0000000..c532399
--- /dev/null
+++ b/drivers/input/lirc/lirc_zilog.c
-@@ -0,0 +1,1384 @@
+@@ -0,0 +1,1374 @@
+/*
+ * i2c IR lirc driver for devices with zilog IR processors
+ *
@@ -15143,18 +14704,26 @@ index 0000000..049c3da
+};
+
+static int ir_attach(struct i2c_adapter *adap, int have_rx, int have_tx);
-+static int ir_detach(struct i2c_client *client);
-+static int ir_probe(struct i2c_adapter *adap);
++static int ir_remove(struct i2c_client *client);
++static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id);
+static int ir_command(struct i2c_client *client, unsigned int cmd, void *arg);
+
++static const struct i2c_device_id ir_transceiver_id[] = {
++ /* Generic entry for any IR transceiver */
++ { "ir_video", 0 },
++ /* IR device specific entries could be added here */
++ { }
++};
++
+static struct i2c_driver driver = {
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "i2c ir driver",
+ },
-+ .attach_adapter = ir_probe,
-+ .detach_client = ir_detach,
++ .probe = ir_probe,
++ .remove = ir_remove,
+ .command = ir_command,
++ .id_table = ir_transceiver_id,
+};
+
+static struct i2c_client client_template = {
@@ -15175,20 +14744,8 @@ index 0000000..049c3da
+
+static int i2c_attach(struct i2c_client *client, struct IR *ir)
+{
-+ int ret;
-+
+ i2c_set_clientdata(client, ir);
+
-+ ret = i2c_attach_client(client);
-+ if (ret != 0) {
-+ client->addr = 0;
-+ return ret;
-+ }
-+ if (!i2c_use_client(client)) {
-+ i2c_detach_client(client);
-+ client->addr = 0;
-+ return -EFAULT;
-+ }
+ ++ir->devs;
+ return 0;
+}
@@ -15289,13 +14846,13 @@ index 0000000..049c3da
+err:
+ /* undo everything, hopefully... */
+ if (ir->c_rx.addr)
-+ ir_detach(&ir->c_rx);
++ ir_remove(&ir->c_rx);
+ if (ir->c_tx.addr)
-+ ir_detach(&ir->c_tx);
++ ir_remove(&ir->c_tx);
+ return ret;
+}
+
-+static int ir_detach(struct i2c_client *client)
++static int ir_remove(struct i2c_client *client)
+{
+ struct IR *ir = i2c_get_clientdata(client);
+ mutex_lock(&ir->lock);
@@ -15316,21 +14873,17 @@ index 0000000..049c3da
+ ir->t_notify2 = NULL;
+ }
+
-+ /* unregister device */
-+ i2c_detach_client(&ir->c_rx);
-+ } else if (client == &ir->c_tx) {
-+ i2c_detach_client(&ir->c_tx);
+ } else {
+ mutex_unlock(&ir->lock);
-+ zilog_error("ir_detach: detached from something we didn't "
-+ "attach to\n");
++ 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("ir_detach: invalid device count\n");
++ zilog_error("%s: invalid device count\n", __func__);
+ return -ENODEV;
+ } else if (ir->devs == 0) {
+ /* unregister lirc driver */
@@ -15349,11 +14902,10 @@ index 0000000..049c3da
+ return 0;
+}
+
-+static int ir_probe(struct i2c_adapter *adap)
++static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
+{
-+ struct i2c_client c;
++ struct i2c_adapter *adap = client->adapter;
+ char buf;
-+ memset(&c, 0, sizeof(c));
+
+ if (adap->id == I2C_HW_B_BT848 ||
+#ifdef I2C_HW_B_HDPVR
@@ -15366,11 +14918,10 @@ index 0000000..049c3da
+ * The external IR receiver is at i2c address 0x71.
+ * The IR transmitter is at 0x70.
+ */
-+ c.adapter = adap;
-+ c.addr = 0x70;
++ client->addr = 0x70;
+
+ if (!disable_rx) {
-+ if (i2c_master_recv(&c, &buf, 1) == 1)
++ if (i2c_master_recv(client, &buf, 1) == 1)
+ have_rx = 1;
+ dprintk("probe 0x70 @ %s: %s\n",
+ adap->name,
@@ -15378,8 +14929,8 @@ index 0000000..049c3da
+ }
+
+ if (!disable_tx) {
-+ c.addr = 0x71;
-+ if (i2c_master_recv(&c, &buf, 1) == 1)
++ client->addr = 0x71;
++ if (i2c_master_recv(client, &buf, 1) == 1)
+ have_tx = 1;
+ dprintk("probe 0x71 @ %s: %s\n",
+ adap->name,
- Previous message (by thread): rpms/kernel/F-11 linux-2.6-defaults-saner-vm-settings.patch, 1.2, 1.3 linux-2.6-mm-lru-dont-evict-mapped-executable-pages.patch, 1.3, 1.4 linux-2.6-mm-lru-evict-streaming-io-pages-first.patch, 1.3, 1.4 linux-2.6-mm-lru-report-vm-flags-in-page-referenced.patch, 1.2, 1.3 kernel.spec, 1.1697, 1.1698
- Next message (by thread): rpms/amavisd-new/devel amavisd-snmp.init, NONE, 1.1 .cvsignore, 1.12, 1.13 amavisd-conf.patch, 1.7, 1.8 amavisd-new.spec, 1.26, 1.27 sources, 1.12, 1.13
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list