summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/linux/linux/simpad/linux-2.6.20.SIMpad.ucb1x00-switches.patch60
-rw-r--r--packages/linux/linux_2.6.20.bb3
2 files changed, 34 insertions, 29 deletions
diff --git a/packages/linux/linux/simpad/linux-2.6.20.SIMpad.ucb1x00-switches.patch b/packages/linux/linux/simpad/linux-2.6.20.SIMpad.ucb1x00-switches.patch
index cbc2272eb2..3f28d9eace 100644
--- a/packages/linux/linux/simpad/linux-2.6.20.SIMpad.ucb1x00-switches.patch
+++ b/packages/linux/linux/simpad/linux-2.6.20.SIMpad.ucb1x00-switches.patch
@@ -1,6 +1,6 @@
diff -uNr linux-2.6.20.vanilla/drivers/mfd/Kconfig linux-2.6.20/drivers/mfd/Kconfig
---- linux-2.6.20.vanilla/drivers/mfd/Kconfig 2007-02-09 18:27:41.000000000 +0100
-+++ linux-2.6.20/drivers/mfd/Kconfig 2007-02-09 19:29:23.000000000 +0100
+--- linux-2.6.20.vanilla/drivers/mfd/Kconfig 2007-02-10 19:01:56.000000000 +0100
++++ linux-2.6.20/drivers/mfd/Kconfig 2007-02-14 16:30:15.000000000 +0100
@@ -23,4 +23,7 @@
tristate "Touchscreen interface support"
depends on MCP_UCB1200 && INPUT
@@ -10,8 +10,8 @@ diff -uNr linux-2.6.20.vanilla/drivers/mfd/Kconfig linux-2.6.20/drivers/mfd/Kcon
+ depends on MCP_UCB1200 && INPUT
endmenu
diff -uNr linux-2.6.20.vanilla/drivers/mfd/Makefile linux-2.6.20/drivers/mfd/Makefile
---- linux-2.6.20.vanilla/drivers/mfd/Makefile 2007-02-09 18:27:41.000000000 +0100
-+++ linux-2.6.20/drivers/mfd/Makefile 2007-02-09 19:29:23.000000000 +0100
+--- linux-2.6.20.vanilla/drivers/mfd/Makefile 2007-02-10 19:01:56.000000000 +0100
++++ linux-2.6.20/drivers/mfd/Makefile 2007-02-14 16:30:15.000000000 +0100
@@ -6,7 +6,7 @@
obj-$(CONFIG_MCP_SA11X0) += mcp-sa11x0.o
obj-$(CONFIG_MCP_UCB1200) += ucb1x00-core.o
@@ -23,8 +23,8 @@ diff -uNr linux-2.6.20.vanilla/drivers/mfd/Makefile linux-2.6.20/drivers/mfd/Mak
endif
diff -uNr linux-2.6.20.vanilla/drivers/mfd/ucb1x00-switches.c linux-2.6.20/drivers/mfd/ucb1x00-switches.c
--- linux-2.6.20.vanilla/drivers/mfd/ucb1x00-switches.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.20/drivers/mfd/ucb1x00-switches.c 2007-02-09 19:30:34.000000000 +0100
-@@ -0,0 +1,200 @@
++++ linux-2.6.20/drivers/mfd/ucb1x00-switches.c 2007-02-14 16:32:57.000000000 +0100
+@@ -0,0 +1,204 @@
+/*
+ * linux/drivers/mfd/ucb1x00-switches.c
+ *
@@ -65,7 +65,6 @@ diff -uNr linux-2.6.20.vanilla/drivers/mfd/ucb1x00-switches.c linux-2.6.20/drive
+ struct input_dev *idev = switches->idev;
+ ucb1x00_enable(switches->ucb);
+
-+ //check if it really is a event this is not real neccessary because input dev checkes it itself a second.
+ this=~ucb1x00_io_read(switches->ucb);
+ if (this==last) {
+ return;
@@ -76,48 +75,57 @@ diff -uNr linux-2.6.20.vanilla/drivers/mfd/ucb1x00-switches.c linux-2.6.20/drive
+
+ case 0:
+
-+ if ((this & (1<<0)) != 0) input_report_key(idev, KEY_PROG1, 1);
-+ else input_report_key(idev, KEY_PROG1, 0);
++ if
++ ((this & (1<<0)) != 0) input_report_key(idev, KEY_PROG1, 1);
++ else
++ input_report_key(idev, KEY_PROG1, 0);
+ break;
+
+ case 1:
+
-+ if ((this & (1<<1)) != 0) input_report_key(idev, KEY_PROG2, 1);
-+ else input_report_key(idev, KEY_PROG2, 0);
++ if
++ ((this & (1<<1)) != 0) input_report_key(idev, KEY_PROG2, 1);
++ else
++ input_report_key(idev, KEY_PROG2, 0);
+ break;
+
+ case 2:
+
-+ if ((this & (1<<2)) != 0) input_report_key(idev, KEY_UP, 1);
-+ else input_report_key(idev, KEY_UP, 0);
++ if
++ ((this & (1<<2)) != 0) input_report_key(idev, KEY_UP, 1);
++ else
++ input_report_key(idev, KEY_UP, 0);
+ break;
+
+ case 3:
+
-+ if ((this & (1<<3)) != 0) input_report_key(idev, KEY_DOWN, 1);
-+ else input_report_key(idev, KEY_DOWN, 0);
++ if
++ ((this & (1<<3)) != 0) input_report_key(idev, KEY_DOWN, 1);
++ else
++ input_report_key(idev, KEY_DOWN, 0);
+ break;
+
+ case 4:
+
-+ if ((this & (1<<4)) != 0) input_report_key(idev, KEY_LEFT, 1);
-+ else input_report_key(idev, KEY_LEFT, 0);
++ if
++ ((this & (1<<4)) != 0) input_report_key(idev, KEY_LEFT, 1);
++ else
++ input_report_key(idev, KEY_LEFT, 0);
+ break;
+
+ case 5:
+
-+ if ((this & (1<<5)) != 0) input_report_key(idev, KEY_RIGHT, 1);
-+ else input_report_key(idev, KEY_RIGHT, 0);
++ if
++ ((this & (1<<5)) != 0) input_report_key(idev, KEY_RIGHT, 1);
++ else
++ input_report_key(idev, KEY_RIGHT, 0);
+ break;
+
+ default:
+
+ printk(KERN_DEBUG "switches-ucb1x00 is BUGGY!!! \n");
-+
-+ }
-+
-+ ucb1x00_disable_irq(switches->ucb, UCB_IRQ_TSPX, UCB_FALLING);
-+
++
++ }
+}
+
+static int ucb1x00_switches_add(struct ucb1x00_dev *dev)
@@ -129,7 +137,6 @@ diff -uNr linux-2.6.20.vanilla/drivers/mfd/ucb1x00-switches.c linux-2.6.20/drive
+ switches = kzalloc(sizeof(struct ucb1x00_switches), GFP_KERNEL);
+ idev = input_allocate_device();
+
-+
+ if (!switches || !idev) {
+ err = -ENOMEM;
+ goto fail;
@@ -137,7 +144,6 @@ diff -uNr linux-2.6.20.vanilla/drivers/mfd/ucb1x00-switches.c linux-2.6.20/drive
+
+ switches->ucb = dev->ucb;
+
-+
+ idev->private = switches;
+ idev->name = "SIMpad Switches";
+ idev->id.product = switches->ucb->id;
@@ -191,14 +197,12 @@ diff -uNr linux-2.6.20.vanilla/drivers/mfd/ucb1x00-switches.c linux-2.6.20/drive
+ input_unregister_device(switches->idev);
+
+ for (i = 5; i >= 0; --i) {
-+
+ ucb1x00_disable_irq(switches->ucb, i, UCB_RISING | UCB_FALLING);
+
+ /* Only error conditions are ENOENT and EINVAL; silently
+ * ignore:
+ */
+ ucb1x00_free_irq(switches->ucb, i, NULL);
-+
+ }
+ ucb1x00_disable(switches->ucb);
+ kfree(switches);
diff --git a/packages/linux/linux_2.6.20.bb b/packages/linux/linux_2.6.20.bb
index f4372186e6..893856a16a 100644
--- a/packages/linux/linux_2.6.20.bb
+++ b/packages/linux/linux_2.6.20.bb
@@ -1,6 +1,7 @@
DESCRIPTION = "Linux Kernel"
SECTION = "kernel"
LICENSE = "GPL"
+PR = "r2"
SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2 \
file://defconfig"
@@ -16,7 +17,7 @@ SRC_URI_append_simpad = "\
inherit kernel
KERNEL_IMAGETYPE = "bzImage"
-KERNEL_IMAGETYPE_simpad = "bzImage"
+KERNEL_IMAGETYPE_simpad = "zImage"
do_configure_prepend() {
install -m 0644 ${WORKDIR}/defconfig ${S}/.config