rpms/kernel/F-12 kernel.spec, 1.2058, 1.2059 lirc-2.6.32.patch, 1.9, 1.10
Jarod Wilson
jwilson at fedoraproject.org
Mon Apr 5 18:58:50 UTC 2010
Author: jwilson
Update of /cvs/pkgs/rpms/kernel/F-12
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv14232
Modified Files:
kernel.spec lirc-2.6.32.patch
Log Message:
* Mon Apr 05 2010 Jarod Wilson <jarod at redhat.com> 2.6.32.11-99
- Fix oops in lirc_it87 driver (#579270)
- Support more imon 0xffdc key combinations
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-12/kernel.spec,v
retrieving revision 1.2058
retrieving revision 1.2059
diff -u -p -r1.2058 -r1.2059
--- kernel.spec 3 Apr 2010 15:09:38 -0000 1.2058
+++ kernel.spec 5 Apr 2010 18:58:49 -0000 1.2059
@@ -2095,6 +2095,10 @@ fi
# and build.
%changelog
+* Mon Apr 05 2010 Jarod Wilson <jarod at redhat.com> 2.6.32.11-99
+- Fix oops in lirc_it87 driver (#579270)
+- Support more imon 0xffdc key combinations
+
* Sat Apr 03 2010 Chuck Ebbert <cebbert at redhat.com> 2.6.32.11-98
- Linux 2.6.32.11
- Reverted: we already have in our DRM:
lirc-2.6.32.patch:
drivers/input/Kconfig | 30
drivers/input/Makefile | 3
drivers/input/input-polldev.c | 21
drivers/input/lirc/Kconfig | 116 +
drivers/input/lirc/Makefile | 21
drivers/input/lirc/lirc_bt829.c | 383 +++++
drivers/input/lirc/lirc_dev.c | 836 +++++++++++
drivers/input/lirc/lirc_dev.h | 194 ++
drivers/input/lirc/lirc_ene0100.c | 646 ++++++++
drivers/input/lirc/lirc_ene0100.h | 169 ++
drivers/input/lirc/lirc_i2c.c | 536 +++++++
drivers/input/lirc/lirc_igorplugusb.c | 555 +++++++
drivers/input/lirc/lirc_imon.c | 1053 ++++++++++++++
drivers/input/lirc/lirc_it87.c | 1021 +++++++++++++
drivers/input/lirc/lirc_it87.h | 116 +
drivers/input/lirc/lirc_ite8709.c | 540 +++++++
drivers/input/lirc/lirc_mceusb.c | 1385 ++++++++++++++++++
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 | 1317 +++++++++++++++++
drivers/input/lirc/lirc_sir.c | 1283 +++++++++++++++++
drivers/input/lirc/lirc_streamzap.c | 794 ++++++++++
drivers/input/lirc/lirc_ttusbir.c | 397 +++++
drivers/input/lirc/lirc_zilog.c | 1388 ++++++++++++++++++
drivers/input/misc/Kconfig | 11
drivers/input/misc/Makefile | 1
drivers/input/misc/imon.c | 2523 ++++++++++++++++++++++++++++++++++
drivers/input/sparse-keymap.c | 250 +++
include/linux/input/sparse-keymap.h | 62
include/linux/lirc.h | 94 +
31 files changed, 17398 insertions(+), 13 deletions(-)
Index: lirc-2.6.32.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-12/lirc-2.6.32.patch,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -p -r1.9 -r1.10
--- lirc-2.6.32.patch 22 Mar 2010 20:40:52 -0000 1.9
+++ lirc-2.6.32.patch 5 Apr 2010 18:58:49 -0000 1.10
@@ -4,18 +4,18 @@
drivers/input/lirc/Kconfig | 116 ++
drivers/input/lirc/Makefile | 21 +
drivers/input/lirc/lirc_bt829.c | 383 +++++
- drivers/input/lirc/lirc_dev.c | 735 ++++++++++
+ drivers/input/lirc/lirc_dev.c | 836 +++++++++++
drivers/input/lirc/lirc_dev.h | 194 +++
drivers/input/lirc/lirc_ene0100.c | 646 +++++++++
drivers/input/lirc/lirc_ene0100.h | 169 +++
drivers/input/lirc/lirc_i2c.c | 536 +++++++
drivers/input/lirc/lirc_igorplugusb.c | 555 ++++++++
drivers/input/lirc/lirc_imon.c | 1053 ++++++++++++++
- drivers/input/lirc/lirc_it87.c | 1019 +++++++++++++
+ drivers/input/lirc/lirc_it87.c | 1021 +++++++++++++
drivers/input/lirc/lirc_it87.h | 116 ++
drivers/input/lirc/lirc_ite8709.c | 540 +++++++
drivers/input/lirc/lirc_mceusb.c | 1385 ++++++++++++++++++
- drivers/input/lirc/lirc_parallel.c | 709 ++++++++++
+ 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 | 1317 +++++++++++++++++
@@ -25,11 +25,11 @@
drivers/input/lirc/lirc_zilog.c | 1388 ++++++++++++++++++
drivers/input/misc/Kconfig | 11 +
drivers/input/misc/Makefile | 1 +
- drivers/input/misc/imon.c | 2511 +++++++++++++++++++++++++++++++++
+ drivers/input/misc/imon.c | 2523 +++++++++++++++++++++++++++++++++
drivers/input/sparse-keymap.c | 250 ++++
include/linux/input/sparse-keymap.h | 62 +
include/linux/lirc.h | 94 ++
- 31 files changed, 17283 insertions(+), 13 deletions(-)
+ 31 files changed, 17398 insertions(+), 13 deletions(-)
diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig
index cd50c00..198e48f 100644
@@ -741,10 +741,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..324af1a
+index 0000000..f7d6fdd
--- /dev/null
+++ b/drivers/input/lirc/lirc_dev.c
-@@ -0,0 +1,735 @@
+@@ -0,0 +1,836 @@
+/*
+ * LIRC base driver
+ *
@@ -782,6 +782,10 @@ index 0000000..324af1a
+#include <linux/bitops.h>
+#include <linux/device.h>
+#include <linux/cdev.h>
++#include <linux/smp_lock.h>
++#ifdef CONFIG_COMPAT
++#include <linux/compat.h>
++#endif
+
+#include <linux/lirc.h>
+#include "lirc_dev.h"
@@ -908,6 +912,9 @@ index 0000000..324af1a
+ .write = lirc_dev_fop_write,
+ .poll = lirc_dev_fop_poll,
+ .ioctl = lirc_dev_fop_ioctl,
++#ifdef CONFIG_COMPAT
++ .compat_ioctl = lirc_dev_fop_compat_ioctl,
++#endif
+ .open = lirc_dev_fop_open,
+ .release = lirc_dev_fop_close,
+};
@@ -1317,6 +1324,100 @@ index 0000000..324af1a
+}
+EXPORT_SYMBOL(lirc_dev_fop_ioctl);
+
++#ifdef CONFIG_COMPAT
++#define LIRC_GET_FEATURES_COMPAT32 _IOR('i', 0x00000000, __u32)
++
++#define LIRC_GET_SEND_MODE_COMPAT32 _IOR('i', 0x00000001, __u32)
++#define LIRC_GET_REC_MODE_COMPAT32 _IOR('i', 0x00000002, __u32)
++
++#define LIRC_GET_LENGTH_COMPAT32 _IOR('i', 0x0000000f, __u32)
++
++#define LIRC_SET_SEND_MODE_COMPAT32 _IOW('i', 0x00000011, __u32)
++#define LIRC_SET_REC_MODE_COMPAT32 _IOW('i', 0x00000012, __u32)
++
++long lirc_dev_fop_compat_ioctl(struct file *file,
++ unsigned int cmd32,
++ unsigned long arg)
++{
++ mm_segment_t old_fs;
++ int ret;
++ unsigned long val;
++ unsigned int cmd;
++
++ switch (cmd32) {
++ case LIRC_GET_FEATURES_COMPAT32:
++ case LIRC_GET_SEND_MODE_COMPAT32:
++ case LIRC_GET_REC_MODE_COMPAT32:
++ case LIRC_GET_LENGTH_COMPAT32:
++ case LIRC_SET_SEND_MODE_COMPAT32:
++ case LIRC_SET_REC_MODE_COMPAT32:
++ /*
++ * These commands expect (unsigned long *) arg
++ * but the 32-bit app supplied (__u32 *).
++ * Conversion is required.
++ */
++ if (get_user(val, (__u32 *)compat_ptr(arg)))
++ return -EFAULT;
++ lock_kernel();
++ /*
++ * tell lirc_dev_fop_ioctl that it's safe to use the pointer
++ * to val which is in kernel address space and not in
++ * user address space.
++ */
++ old_fs = get_fs();
++ set_fs(KERNEL_DS);
++
++ cmd = _IOC(_IOC_DIR(cmd32), _IOC_TYPE(cmd32), _IOC_NR(cmd32),
++ (_IOC_TYPECHECK(unsigned long)));
++ ret = lirc_dev_fop_ioctl(file->f_path.dentry->d_inode, file,
++ cmd, (unsigned long)(&val));
++
++ set_fs(old_fs);
++ unlock_kernel();
++ switch (cmd) {
++ case LIRC_GET_FEATURES:
++ case LIRC_GET_SEND_MODE:
++ case LIRC_GET_REC_MODE:
++ case LIRC_GET_LENGTH:
++ if (!ret && put_user(val, (__u32 *)compat_ptr(arg)))
++ return -EFAULT;
++ break;
++ }
++ return ret;
++
++ case LIRC_GET_SEND_CARRIER:
++ case LIRC_GET_REC_CARRIER:
++ case LIRC_GET_SEND_DUTY_CYCLE:
++ case LIRC_GET_REC_DUTY_CYCLE:
++ case LIRC_GET_REC_RESOLUTION:
++ case LIRC_SET_SEND_CARRIER:
++ case LIRC_SET_REC_CARRIER:
++ case LIRC_SET_SEND_DUTY_CYCLE:
++ case LIRC_SET_REC_DUTY_CYCLE:
++ case LIRC_SET_TRANSMITTER_MASK:
++ case LIRC_SET_REC_DUTY_CYCLE_RANGE:
++ case LIRC_SET_REC_CARRIER_RANGE:
++ /*
++ * These commands expect (unsigned int *)arg
++ * so no problems here. Just handle the locking.
++ */
++ lock_kernel();
++ cmd = cmd32;
++ ret = lirc_dev_fop_ioctl(file->f_path.dentry->d_inode,
++ file, cmd, arg);
++ unlock_kernel();
++ return ret;
++ default:
++ /* unknown */
++ printk(KERN_ERR "lirc_dev: %s(%s:%d): Unknown cmd %08x\n",
++ __func__, current->comm, current->pid, cmd32);
++ return -ENOIOCTLCMD;
++ }
++}
++EXPORT_SYMBOL(lirc_dev_fop_compat_ioctl);
++#endif
++
++
+ssize_t lirc_dev_fop_read(struct file *file,
+ char *buffer,
+ size_t length,
@@ -4671,10 +4772,10 @@ index 0000000..af5eec8
+module_exit(imon_exit);
diff --git a/drivers/input/lirc/lirc_it87.c b/drivers/input/lirc/lirc_it87.c
new file mode 100644
-index 0000000..f9cdbeb
+index 0000000..a899d00
--- /dev/null
+++ b/drivers/input/lirc/lirc_it87.c
-@@ -0,0 +1,1019 @@
+@@ -0,0 +1,1021 @@
+/*
+ * LIRC driver for ITE IT8712/IT8705 CIR port
+ *
@@ -5601,18 +5702,16 @@ index 0000000..f9cdbeb
+ return 0;
+}
+
-+
-+static int __init lirc_it87_init(void)
++static int it87_probe(struct pnp_dev *pnp_dev,
++ const struct pnp_device_id *dev_id)
+{
+ int retval;
+
-+ retval = pnp_register_driver(&it87_pnp_driver);
-+ if (retval < 0)
-+ return retval;
++ driver.dev = &pnp_dev->dev;
+
+ retval = init_chrdev();
+ if (retval < 0)
-+ goto init_chrdev_failed;
++ return retval;
+
+ retval = init_lirc_it87();
+ if (retval)
@@ -5623,11 +5722,14 @@ index 0000000..f9cdbeb
+init_lirc_it87_failed:
+ drop_chrdev();
+
-+init_chrdev_failed:
-+ pnp_unregister_driver(&it87_pnp_driver);
+ return retval;
+}
+
++static int __init lirc_it87_init(void)
++{
++ return pnp_register_driver(&it87_pnp_driver);
++}
++
+
+static void __exit lirc_it87_exit(void)
+{
@@ -5650,6 +5752,7 @@ index 0000000..f9cdbeb
+static struct pnp_driver it87_pnp_driver = {
+ .name = LIRC_DRIVER_NAME,
+ .id_table = pnp_dev_table,
++ .probe = it87_probe,
+};
+
+module_init(lirc_it87_init);
@@ -14680,10 +14783,10 @@ index a8b8485..79358ff 100644
obj-$(CONFIG_INPUT_M68K_BEEP) += m68kspkr.o
diff --git a/drivers/input/misc/imon.c b/drivers/input/misc/imon.c
new file mode 100644
-index 0000000..d2e5d51
+index 0000000..58a2130
--- /dev/null
+++ b/drivers/input/misc/imon.c
-@@ -0,0 +1,2511 @@
+@@ -0,0 +1,2523 @@
+/*
+ * imon.c: input and display driver for SoundGraph iMON IR/VFD/LCD
+ *
@@ -15089,41 +15192,43 @@ index 0000000..d2e5d51
+/* mce-mode imon mce remote key table */
+static const struct key_entry imon_mce_key_table[] = {
+ /* keys sorted mostly by frequency of use to optimize lookups */
-+ { KE_KEY, 0x800f8415, { KEY_REWIND } },
-+ { KE_KEY, 0x800f8414, { KEY_FASTFORWARD } },
-+ { KE_KEY, 0x800f841b, { KEY_PREVIOUS } },
-+ { KE_KEY, 0x800f841a, { KEY_NEXT } },
-+
-+ { KE_KEY, 0x800f8416, { KEY_PLAY } },
-+ { KE_KEY, 0x800f8418, { KEY_PAUSE } },
-+ { KE_KEY, 0x800f8419, { KEY_STOP } },
-+ { KE_KEY, 0x800f8417, { KEY_RECORD } },
++ { KE_KEY, 0x800ff415, { KEY_REWIND } },
++ { KE_KEY, 0x800ff414, { KEY_FASTFORWARD } },
++ { KE_KEY, 0x800ff41b, { KEY_PREVIOUS } },
++ { KE_KEY, 0x800ff41a, { KEY_NEXT } },
++
++ { KE_KEY, 0x800ff416, { KEY_PLAY } },
++ { KE_KEY, 0x800ff418, { KEY_PAUSE } },
++ { KE_KEY, 0x800ff419, { KEY_STOP } },
++ { KE_KEY, 0x800ff417, { KEY_RECORD } },
+
+ { KE_KEY, 0x02000052, { KEY_UP } },
+ { KE_KEY, 0x02000051, { KEY_DOWN } },
+ { KE_KEY, 0x02000050, { KEY_LEFT } },
+ { KE_KEY, 0x0200004f, { KEY_RIGHT } },
+
-+ { KE_KEY, 0x800f841e, { KEY_UP } },
-+ { KE_KEY, 0x800f841f, { KEY_DOWN } },
-+ { KE_KEY, 0x800f8420, { KEY_LEFT } },
-+ { KE_KEY, 0x800f8421, { KEY_RIGHT } },
++ { KE_KEY, 0x800ff41e, { KEY_UP } },
++ { KE_KEY, 0x800ff41f, { KEY_DOWN } },
++ { KE_KEY, 0x800ff420, { KEY_LEFT } },
++ { KE_KEY, 0x800ff421, { KEY_RIGHT } },
+
-+ { KE_KEY, 0x800f840b, { KEY_ENTER } },
++ /* 0x800ff40b also KEY_NUMERIC_POUND on some receivers */
++ { KE_KEY, 0x800ff40b, { KEY_ENTER } },
+ { KE_KEY, 0x02000028, { KEY_ENTER } },
+/* the OK and Enter buttons decode to the same value on some remotes
+ { KE_KEY, 0x02000028, { KEY_OK } }, */
-+ { KE_KEY, 0x800f8422, { KEY_OK } },
++ { KE_KEY, 0x800ff422, { KEY_OK } },
+ { KE_KEY, 0x0200002a, { KEY_EXIT } },
-+ { KE_KEY, 0x800f8423, { KEY_EXIT } },
++ { KE_KEY, 0x800ff423, { KEY_EXIT } },
+ { KE_KEY, 0x02000029, { KEY_DELETE } },
-+ { KE_KEY, 0x800f840a, { KEY_DELETE } },
++ /* 0x800ff40a also KEY_NUMERIC_STAR on some receivers */
++ { KE_KEY, 0x800ff40a, { KEY_DELETE } },
+
-+ { KE_KEY, 0x800f840e, { KEY_MUTE } },
-+ { KE_KEY, 0x800f8410, { KEY_VOLUMEUP } },
-+ { KE_KEY, 0x800f8411, { KEY_VOLUMEDOWN } },
-+ { KE_KEY, 0x800f8412, { KEY_CHANNELUP } },
-+ { KE_KEY, 0x800f8413, { KEY_CHANNELDOWN } },
++ { KE_KEY, 0x800ff40e, { KEY_MUTE } },
++ { KE_KEY, 0x800ff410, { KEY_VOLUMEUP } },
++ { KE_KEY, 0x800ff411, { KEY_VOLUMEDOWN } },
++ { KE_KEY, 0x800ff412, { KEY_CHANNELUP } },
++ { KE_KEY, 0x800ff413, { KEY_CHANNELDOWN } },
+
+ { KE_KEY, 0x0200001e, { KEY_NUMERIC_1 } },
+ { KE_KEY, 0x0200001f, { KEY_NUMERIC_2 } },
@@ -15136,46 +15241,55 @@ index 0000000..d2e5d51
+ { KE_KEY, 0x02000026, { KEY_NUMERIC_9 } },
+ { KE_KEY, 0x02000027, { KEY_NUMERIC_0 } },
+
-+ { KE_KEY, 0x800f8401, { KEY_NUMERIC_1 } },
-+ { KE_KEY, 0x800f8402, { KEY_NUMERIC_2 } },
-+ { KE_KEY, 0x800f8403, { KEY_NUMERIC_3 } },
-+ { KE_KEY, 0x800f8404, { KEY_NUMERIC_4 } },
-+ { KE_KEY, 0x800f8405, { KEY_NUMERIC_5 } },
-+ { KE_KEY, 0x800f8406, { KEY_NUMERIC_6 } },
-+ { KE_KEY, 0x800f8407, { KEY_NUMERIC_7 } },
-+ { KE_KEY, 0x800f8408, { KEY_NUMERIC_8 } },
-+ { KE_KEY, 0x800f8409, { KEY_NUMERIC_9 } },
-+ { KE_KEY, 0x800f8400, { KEY_NUMERIC_0 } },
++ { KE_KEY, 0x800ff401, { KEY_NUMERIC_1 } },
++ { KE_KEY, 0x800ff402, { KEY_NUMERIC_2 } },
++ { KE_KEY, 0x800ff403, { KEY_NUMERIC_3 } },
++ { KE_KEY, 0x800ff404, { KEY_NUMERIC_4 } },
++ { KE_KEY, 0x800ff405, { KEY_NUMERIC_5 } },
++ { KE_KEY, 0x800ff406, { KEY_NUMERIC_6 } },
++ { KE_KEY, 0x800ff407, { KEY_NUMERIC_7 } },
++ { KE_KEY, 0x800ff408, { KEY_NUMERIC_8 } },
++ { KE_KEY, 0x800ff409, { KEY_NUMERIC_9 } },
++ { KE_KEY, 0x800ff400, { KEY_NUMERIC_0 } },
+
+ { KE_KEY, 0x02200025, { KEY_NUMERIC_STAR } },
+ { KE_KEY, 0x02200020, { KEY_NUMERIC_POUND } },
-+ { KE_KEY, 0x800f841d, { KEY_NUMERIC_STAR } },
-+ { KE_KEY, 0x800f841c, { KEY_NUMERIC_POUND } },
++ /* 0x800ff41d also KEY_BLUE on some receivers */
++ { KE_KEY, 0x800ff41d, { KEY_NUMERIC_STAR } },
++ /* 0x800ff41c also KEY_PREVIOUS on some receivers */
++ { KE_KEY, 0x800ff41c, { KEY_NUMERIC_POUND } },
++
++ { KE_KEY, 0x800ff446, { KEY_TV } },
++ { KE_KEY, 0x800ff447, { KEY_AUDIO } }, /* My Music */
++ { KE_KEY, 0x800ff448, { KEY_PVR } }, /* RecordedTV */
++ { KE_KEY, 0x800ff449, { KEY_CAMERA } },
++ { KE_KEY, 0x800ff44a, { KEY_VIDEO } },
++ /* 0x800ff424 also KEY_MENU on some receivers */
++ { KE_KEY, 0x800ff424, { KEY_DVD } },
++ /* 0x800ff425 also KEY_GREEN on some receivers */
++ { KE_KEY, 0x800ff425, { KEY_TUNER } }, /* LiveTV */
++ { KE_KEY, 0x800ff450, { KEY_RADIO } },
++
++ { KE_KEY, 0x800ff44c, { KEY_LANGUAGE } },
++ { KE_KEY, 0x800ff427, { KEY_ZOOM } }, /* Aspect */
++
++ { KE_KEY, 0x800ff45b, { KEY_RED } },
++ { KE_KEY, 0x800ff45c, { KEY_GREEN } },
++ { KE_KEY, 0x800ff45d, { KEY_YELLOW } },
++ { KE_KEY, 0x800ff45e, { KEY_BLUE } },
++
++ { KE_KEY, 0x800ff466, { KEY_RED } },
++ /* { KE_KEY, 0x800ff425, { KEY_GREEN } }, */
++ { KE_KEY, 0x800ff468, { KEY_YELLOW } },
++ /* { KE_KEY, 0x800ff41d, { KEY_BLUE } }, */
++
++ { KE_KEY, 0x800ff40f, { KEY_INFO } },
++ { KE_KEY, 0x800ff426, { KEY_EPG } }, /* Guide */
++ { KE_KEY, 0x800ff45a, { KEY_SUBTITLE } }, /* Caption/Teletext */
++ { KE_KEY, 0x800ff44d, { KEY_TITLE } },
+
-+ { KE_KEY, 0x800f8446, { KEY_TV } },
-+ { KE_KEY, 0x800f8447, { KEY_AUDIO } }, /* My Music */
-+ { KE_KEY, 0x800f8448, { KEY_PVR } }, /* RecordedTV */
-+ { KE_KEY, 0x800f8449, { KEY_CAMERA } },
-+ { KE_KEY, 0x800f844a, { KEY_VIDEO } },
-+ { KE_KEY, 0x800f8424, { KEY_DVD } },
-+ { KE_KEY, 0x800f8425, { KEY_TUNER } }, /* LiveTV */
-+ { KE_KEY, 0x800f8450, { KEY_RADIO } },
-+
-+ { KE_KEY, 0x800f844c, { KEY_LANGUAGE } },
-+ { KE_KEY, 0x800f8427, { KEY_ZOOM } }, /* Aspect */
-+
-+ { KE_KEY, 0x800f845b, { KEY_RED } },
-+ { KE_KEY, 0x800f845c, { KEY_GREEN } },
-+ { KE_KEY, 0x800f845d, { KEY_YELLOW } },
-+ { KE_KEY, 0x800f845e, { KEY_BLUE } },
-+
-+ { KE_KEY, 0x800f840f, { KEY_INFO } },
-+ { KE_KEY, 0x800f8426, { KEY_EPG } }, /* Guide */
-+ { KE_KEY, 0x800f845a, { KEY_SUBTITLE } }, /* Caption/Teletext */
-+ { KE_KEY, 0x800f844d, { KEY_TITLE } },
-+
-+ { KE_KEY, 0x800f840c, { KEY_POWER } },
-+ { KE_KEY, 0x800f840d, { KEY_PROG1 } }, /* Windows MCE button */
++ { KE_KEY, 0x800ff40c, { KEY_POWER } },
++ { KE_KEY, 0x800ff40d, { KEY_PROG1 } }, /* Windows MCE button */
+ { KE_END, 0 }
+
+};
@@ -15203,6 +15317,10 @@ index 0000000..d2e5d51
+ { 0x000100000000ffee, KEY_VOLUMEUP },
+ { 0x010000000000ffee, KEY_VOLUMEDOWN },
+ { 0x000000000100ffee, KEY_MUTE },
++ /* iMON Knob values */
++ { 0x000100ffffffffee, KEY_VOLUMEUP },
++ { 0x010000ffffffffee, KEY_VOLUMEDOWN },
++ { 0x000008ffffffffee, KEY_MUTE },
+};
+
+/* to prevent races between open() and disconnect(), probing, etc */
@@ -15860,6 +15978,33 @@ index 0000000..d2e5d51
+}
+
+/**
++ * mce/rc6 keypresses have no distinct release code, use timer
++ */
++static void imon_mce_timeout(unsigned long data)
++{
++ struct imon_context *ictx = (struct imon_context *)data;
++
++ input_report_key(ictx->idev, ictx->last_keycode, 0);
++ input_sync(ictx->idev);
++}
++
++/**
++ * report touchscreen input
++ */
++static void imon_touch_display_timeout(unsigned long data)
++{
++ struct imon_context *ictx = (struct imon_context *)data;
++
++ if (!ictx->display_type == IMON_DISPLAY_TYPE_VGA)
++ return;
++
++ input_report_abs(ictx->touch, ABS_X, ictx->touch_x);
++ input_report_abs(ictx->touch, ABS_Y, ictx->touch_y);
++ input_report_key(ictx->touch, BTN_TOUCH, 0x00);
++ input_sync(ictx->touch);
++}
++
++/**
+ * iMON IR receivers support two different signal sets -- those used by
+ * the iMON remotes, and those used by the Windows MCE remotes (which is
+ * really just RC-6), but only one or the other at a time, as the signals
@@ -15878,6 +16023,9 @@ index 0000000..d2e5d51
+ ir_proto_packet[0] = 0x01;
+ ictx->ir_protocol = IMON_IR_PROTOCOL_MCE;
+ ictx->pad_mouse = 0;
++ init_timer(&ictx->itimer);
++ ictx->itimer.data = (unsigned long)ictx;
++ ictx->itimer.function = imon_mce_timeout;
+ break;
+ case IMON_IR_PROTOCOL_IMON:
+ dev_dbg(dev, "Configuring IR receiver for iMON protocol\n");
@@ -16032,17 +16180,23 @@ index 0000000..d2e5d51
+ int i;
+ u32 code = be32_to_cpu(hw_code);
+
-+#define TOGGLE_BIT 0x8000
++#define MCE_KEY_MASK 0x7000
++#define MCE_TOGGLE_BIT 0x8000
+
-+ if (((code >> 24) & 0x02) || (code & TOGGLE_BIT)) {
-+ for (i = 0; i < ARRAY_SIZE(imon_mce_key_table); i++)
-+ if (imon_mce_key_table[i].code == code)
-+ return i;
-+ } else {
-+ for (i = 0; i < ARRAY_SIZE(imon_mce_key_table); i++)
-+ if (imon_mce_key_table[i].code == (code | TOGGLE_BIT))
-+ return i;
-+ }
++ /*
++ * On some receivers, mce keys decode to 0x8000f04xx and 0x8000f84xx
++ * (the toggle bit flipping between alternating key presses), while
++ * on other receivers, we see 0x8000f74xx and 0x8000ff4xx. To keep
++ * the table trim, we always or in the bits to look up 0x8000ff4xx,
++ * but we can't or them into all codes, as some keys are decoded in
++ * a different way w/o the same use of the toggle bit...
++ */
++ if ((code >> 24) & 0x80)
++ code = code | MCE_KEY_MASK | MCE_TOGGLE_BIT;
++
++ for (i = 0; i < ARRAY_SIZE(imon_mce_key_table); i++)
++ if (imon_mce_key_table[i].code == code)
++ return i;
+
+ return -1;
+}
@@ -16256,6 +16410,11 @@ index 0000000..d2e5d51
+ buf[2] == 0x81 && buf[3] == 0xb7)
+ ictx->kc = ictx->last_keycode;
+
++ /* mouse button release on (some other) 0xffdc devices */
++ else if (ictx->ki == -1 && buf[0] == 0x01 && buf[1] == 0x00 &&
++ buf[2] == 0x81 && buf[3] == 0xb7)
++ ictx->kc = ictx->last_keycode;
++
+ /* mce-specific button handling */
+ else if (ksrc == IMON_BUTTON_MCE) {
+ /* initial press */
@@ -16303,7 +16462,7 @@ index 0000000..d2e5d51
+ int offset = IMON_KEY_RELEASE_OFFSET;
+ u64 temp_key;
+ u64 panel_key = 0;
-+ u32 remote_key;
++ u32 remote_key = 0;
+ struct input_dev *idev = NULL;
+ int press_type = 0;
+ int msec;
@@ -16421,7 +16580,7 @@ index 0000000..d2e5d51
+ return;
+
+unknown_key:
-+ dev_info(dev, "%s: unknown keypress, code 0x%x\n", __func__,
++ dev_info(dev, "%s: unknown keypress, code 0x%llx\n", __func__,
+ (panel_key ? be64_to_cpu(panel_key) :
+ be32_to_cpu(remote_key)));
+ return;
@@ -16448,40 +16607,11 @@ index 0000000..d2e5d51
+}
+
+/**
-+ * mce/rc6 keypresses have no distinct release code, use timer
-+ */
-+static void imon_mce_timeout(unsigned long data)
-+{
-+ struct imon_context *ictx = (struct imon_context *)data;
-+
-+ input_report_key(ictx->idev, ictx->last_keycode, 0);
-+ input_sync(ictx->idev);
-+}
-+
-+/**
-+ * report touchscreen input
-+ */
-+static void imon_touch_display_timeout(unsigned long data)
-+{
-+ struct imon_context *ictx = (struct imon_context *)data;
-+
-+ if (!ictx->display_type == IMON_DISPLAY_TYPE_VGA)
-+ return;
-+
-+ input_report_abs(ictx->touch, ABS_X, ictx->touch_x);
-+ input_report_abs(ictx->touch, ABS_Y, ictx->touch_y);
-+ input_report_key(ictx->touch, BTN_TOUCH, 0x00);
-+ input_sync(ictx->touch);
-+}
-+
-+/**
+ * Callback function for USB core API: receive data
+ */
+static void usb_rx_callback_intf0(struct urb *urb)
+{
+ struct imon_context *ictx;
-+ unsigned char *buf;
-+ int len;
+ int intfnum = 0;
+
+ if (!urb)
@@ -16491,9 +16621,6 @@ index 0000000..d2e5d51
+ if (!ictx)
+ return;
+
-+ buf = urb->transfer_buffer;
-+ len = urb->actual_length;
-+
+ switch (urb->status) {
+ case -ENOENT: /* usbcore unlink successful! */
+ return;
@@ -16517,8 +16644,6 @@ index 0000000..d2e5d51
+static void usb_rx_callback_intf1(struct urb *urb)
+{
+ struct imon_context *ictx;
-+ unsigned char *buf;
-+ int len;
+ int intfnum = 1;
+
+ if (!urb)
@@ -16528,9 +16653,6 @@ index 0000000..d2e5d51
+ if (!ictx)
+ return;
+
-+ buf = urb->transfer_buffer;
-+ len = urb->actual_length;
-+
+ switch (urb->status) {
+ case -ENOENT: /* usbcore unlink successful! */
+ return;
@@ -16784,12 +16906,6 @@ index 0000000..d2e5d51
+
+ mutex_lock(&ictx->lock);
+
-+ if (ir_protocol == IMON_IR_PROTOCOL_MCE) {
-+ init_timer(&ictx->itimer);
-+ ictx->itimer.data = (unsigned long)ictx;
-+ ictx->itimer.function = imon_mce_timeout;
-+ }
-+
+ ictx->dev = dev;
+ ictx->usbdev_intf0 = usb_get_dev(interface_to_usbdev(intf));
+ ictx->dev_present_intf0 = 1;
@@ -17006,7 +17122,6 @@ index 0000000..d2e5d51
+ first_if = usb_ifnum_to_if(usbdev, 0);
+ first_if_ctx = (struct imon_context *)usb_get_intfdata(first_if);
+
-+
+ if (ifnum == 0) {
+ ictx = imon_init_intf0(interface);
+ if (!ictx) {
@@ -17521,7 +17636,7 @@ index 0000000..52db620
+#endif /* _SPARSE_KEYMAP_H */
diff --git a/include/linux/lirc.h b/include/linux/lirc.h
new file mode 100644
-index 0000000..8ae64fa
+index 0000000..917ffca
--- /dev/null
+++ b/include/linux/lirc.h
@@ -0,0 +1,94 @@
@@ -17584,27 +17699,27 @@ index 0000000..8ae64fa
+
+/*** IOCTL commands for lirc driver ***/
+
-+#define LIRC_GET_FEATURES _IOR('i', 0x00000000, uint64_t)
++#define LIRC_GET_FEATURES _IOR('i', 0x00000000, unsigned long)
+
-+#define LIRC_GET_SEND_MODE _IOR('i', 0x00000001, uint64_t)
-+#define LIRC_GET_REC_MODE _IOR('i', 0x00000002, uint64_t)
-+#define LIRC_GET_SEND_CARRIER _IOR('i', 0x00000003, uint32_t)
-+#define LIRC_GET_REC_CARRIER _IOR('i', 0x00000004, uint32_t)
-+#define LIRC_GET_SEND_DUTY_CYCLE _IOR('i', 0x00000005, uint32_t)
-+#define LIRC_GET_REC_DUTY_CYCLE _IOR('i', 0x00000006, uint32_t)
-+#define LIRC_GET_REC_RESOLUTION _IOR('i', 0x00000007, uint32_t)
++#define LIRC_GET_SEND_MODE _IOR('i', 0x00000001, unsigned long)
++#define LIRC_GET_REC_MODE _IOR('i', 0x00000002, unsigned long)
++#define LIRC_GET_SEND_CARRIER _IOR('i', 0x00000003, unsigned int)
++#define LIRC_GET_REC_CARRIER _IOR('i', 0x00000004, unsigned int)
++#define LIRC_GET_SEND_DUTY_CYCLE _IOR('i', 0x00000005, unsigned int)
++#define LIRC_GET_REC_DUTY_CYCLE _IOR('i', 0x00000006, unsigned int)
++#define LIRC_GET_REC_RESOLUTION _IOR('i', 0x00000007, unsigned int)
+
+/* code length in bits, currently only for LIRC_MODE_LIRCCODE */
-+#define LIRC_GET_LENGTH _IOR('i', 0x0000000f, uint64_t)
++#define LIRC_GET_LENGTH _IOR('i', 0x0000000f, unsigned long)
+
-+#define LIRC_SET_SEND_MODE _IOW('i', 0x00000011, uint64_t)
-+#define LIRC_SET_REC_MODE _IOW('i', 0x00000012, uint64_t)
++#define LIRC_SET_SEND_MODE _IOW('i', 0x00000011, unsigned long)
++#define LIRC_SET_REC_MODE _IOW('i', 0x00000012, unsigned long)
+/* Note: these can reset the according pulse_width */
-+#define LIRC_SET_SEND_CARRIER _IOW('i', 0x00000013, uint32_t)
-+#define LIRC_SET_REC_CARRIER _IOW('i', 0x00000014, uint32_t)
-+#define LIRC_SET_SEND_DUTY_CYCLE _IOW('i', 0x00000015, uint32_t)
-+#define LIRC_SET_REC_DUTY_CYCLE _IOW('i', 0x00000016, uint32_t)
-+#define LIRC_SET_TRANSMITTER_MASK _IOW('i', 0x00000017, uint32_t)
++#define LIRC_SET_SEND_CARRIER _IOW('i', 0x00000013, unsigned int)
++#define LIRC_SET_REC_CARRIER _IOW('i', 0x00000014, unsigned int)
++#define LIRC_SET_SEND_DUTY_CYCLE _IOW('i', 0x00000015, unsigned int)
++#define LIRC_SET_REC_DUTY_CYCLE _IOW('i', 0x00000016, unsigned int)
++#define LIRC_SET_TRANSMITTER_MASK _IOW('i', 0x00000017, unsigned int)
+
+/*
+ * to set a range use
@@ -17613,8 +17728,8 @@ index 0000000..8ae64fa
+ * LIRC_SET_REC_DUTY_CYCLE/LIRC_SET_REC_CARRIER with the upper bound
+ */
+
-+#define LIRC_SET_REC_DUTY_CYCLE_RANGE _IOW('i', 0x0000001e, uint32_t)
-+#define LIRC_SET_REC_CARRIER_RANGE _IOW('i', 0x0000001f, uint32_t)
++#define LIRC_SET_REC_DUTY_CYCLE_RANGE _IOW('i', 0x0000001e, unsigned int)
++#define LIRC_SET_REC_CARRIER_RANGE _IOW('i', 0x0000001f, unsigned int)
+
+#define LIRC_NOTIFY_DECODE _IO('i', 0x00000020)
+
More information about the scm-commits
mailing list