summaryrefslogtreecommitdiff
path: root/packages/linux
diff options
context:
space:
mode:
authorHenning Heinold <heinold@inf.fu-berlin.de>2007-07-06 16:44:23 +0000
committerHenning Heinold <heinold@inf.fu-berlin.de>2007-07-06 16:44:23 +0000
commitd30b363d49b7f9a3c9b734dcae4f7562c3a99357 (patch)
tree9e49ce34bc04dc6fddd3ba956da8b8791cd59b8b /packages/linux
parent4b37859e36525c4902b0f8f22c6cdc6339958171 (diff)
Simpad updates taken from
http://slackpad.svn.sourceforge.net/viewvc/slackpad/trunk/SIMpad-Kernel-2.6/2.6.21/patches/ amd tweaking the defconfig a little bit
Diffstat (limited to 'packages/linux')
-rw-r--r--packages/linux/linux/simpad/defconfig98
-rw-r--r--packages/linux/linux/simpad/linux-2.6.21-SIMpad-cs3-simpad.patch333
-rw-r--r--packages/linux/linux/simpad/linux-2.6.21-SIMpad-serial-and-gpio_keys.patch194
-rw-r--r--packages/linux/linux/simpad/linux-2.6.21-SIMpad-ucb1x00-switches.patch222
-rw-r--r--packages/linux/linux/simpad/linux-2.6.21-pcmcia-device-to-platform-driver.patch54
-rw-r--r--packages/linux/linux_2.6.21.bb11
6 files changed, 379 insertions, 533 deletions
diff --git a/packages/linux/linux/simpad/defconfig b/packages/linux/linux/simpad/defconfig
index 36d5e942b4..279847c763 100644
--- a/packages/linux/linux/simpad/defconfig
+++ b/packages/linux/linux/simpad/defconfig
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.21
-# Sun May 6 14:01:42 2007
+# Tue Jul 3 21:29:59 2007
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -38,15 +38,16 @@ CONFIG_LOCALVERSION="oe1"
CONFIG_LOCALVERSION_AUTO=y
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
-# CONFIG_IPC_NS is not set
+CONFIG_IPC_NS=y
CONFIG_SYSVIPC_SYSCTL=y
-# CONFIG_POSIX_MQUEUE is not set
-# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_POSIX_MQUEUE=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
# CONFIG_TASKSTATS is not set
# CONFIG_UTS_NS is not set
# CONFIG_AUDIT is not set
# CONFIG_IKCONFIG is not set
-CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_SYSFS_DEPRECATED is not set
# CONFIG_RELAY is not set
# CONFIG_BLK_DEV_INITRD is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
@@ -76,8 +77,9 @@ CONFIG_BASE_SMALL=0
# Loadable module support
#
CONFIG_MODULES=y
-# CONFIG_MODULE_UNLOAD is not set
-# CONFIG_MODVERSIONS is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_MODVERSIONS=y
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_KMOD=y
@@ -186,7 +188,7 @@ CONFIG_PCCARD=y
# CONFIG_PCMCIA_DEBUG is not set
CONFIG_PCMCIA=y
CONFIG_PCMCIA_LOAD_CIS=y
-CONFIG_PCMCIA_IOCTL=y
+# CONFIG_PCMCIA_IOCTL is not set
#
# PC-card bridges
@@ -225,7 +227,7 @@ CONFIG_ALIGNMENT_TRAP=y
#
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
-CONFIG_CMDLINE="mtdparts=sa1100:512k(boot),1m(kernel),-(root) console=ttySA0 root=1f02 noinitrd mem=64M jffs2_orphaned_inodes=delete rootfstype=jffs2"
+CONFIG_CMDLINE=""
# CONFIG_XIP_KERNEL is not set
# CONFIG_KEXEC is not set
@@ -257,10 +259,10 @@ CONFIG_BINFMT_MISC=m
# Power management options
#
CONFIG_PM=y
-# CONFIG_PM_LEGACY is not set
+CONFIG_PM_LEGACY=y
# CONFIG_PM_DEBUG is not set
# CONFIG_PM_SYSFS_DEPRECATED is not set
-# CONFIG_APM_EMULATION is not set
+CONFIG_APM_EMULATION=y
#
# Networking
@@ -587,10 +589,10 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
# Network device support
#
CONFIG_NETDEVICES=y
-CONFIG_DUMMY=y
+CONFIG_DUMMY=m
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
-# CONFIG_TUN is not set
+CONFIG_TUN=m
#
# ARCnet devices
@@ -674,12 +676,12 @@ CONFIG_NET_WIRELESS=y
CONFIG_NET_PCMCIA=y
CONFIG_PCMCIA_3C589=m
CONFIG_PCMCIA_3C574=m
-# CONFIG_PCMCIA_FMVJ18X is not set
+CONFIG_PCMCIA_FMVJ18X=m
CONFIG_PCMCIA_PCNET=m
-# CONFIG_PCMCIA_NMCLAN is not set
+CONFIG_PCMCIA_NMCLAN=m
CONFIG_PCMCIA_SMC91C92=m
CONFIG_PCMCIA_XIRC2PS=m
-# CONFIG_PCMCIA_AXNET is not set
+CONFIG_PCMCIA_AXNET=m
#
# Wan interfaces
@@ -692,7 +694,7 @@ CONFIG_PPP_ASYNC=m
CONFIG_PPP_SYNC_TTY=m
CONFIG_PPP_DEFLATE=m
CONFIG_PPP_BSDCOMP=m
-# CONFIG_PPP_MPPE is not set
+CONFIG_PPP_MPPE=m
CONFIG_PPPOE=m
# CONFIG_SLIP is not set
CONFIG_SLHC=m
@@ -734,13 +736,14 @@ CONFIG_INPUT_KEYBOARD=y
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_LKKBD is not set
# CONFIG_KEYBOARD_XTKBD is not set
-# CONFIG_KEYBOARD_NEWTON is not set
-# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_KEYBOARD_NEWTON=m
+CONFIG_KEYBOARD_STOWAWAY=m
CONFIG_KEYBOARD_GPIO=y
# CONFIG_INPUT_MOUSE is not set
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
-# CONFIG_INPUT_MISC is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_UINPUT=m
#
# Hardware I/O ports
@@ -960,6 +963,7 @@ CONFIG_USB_ARCH_HAS_HCD=y
#
# MMC/SD Card support
#
+# CONFIG_MMC_SPI_BLOCK is not set
# CONFIG_MMC is not set
#
@@ -987,7 +991,7 @@ CONFIG_REISERFS_FS=m
CONFIG_REISERFS_PROC_INFO=y
# CONFIG_REISERFS_FS_XATTR is not set
# CONFIG_JFS_FS is not set
-# CONFIG_FS_POSIX_ACL is not set
+CONFIG_FS_POSIX_ACL=y
# CONFIG_XFS_FS is not set
# CONFIG_GFS2_FS is not set
# CONFIG_OCFS2_FS is not set
@@ -1000,6 +1004,7 @@ CONFIG_DNOTIFY=y
# CONFIG_AUTOFS_FS is not set
# CONFIG_AUTOFS4_FS is not set
# CONFIG_FUSE_FS is not set
+CONFIG_GENERIC_ACL=y
#
# CD-ROM/DVD Filesystems
@@ -1023,7 +1028,8 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
CONFIG_PROC_FS=y
CONFIG_PROC_SYSCTL=y
CONFIG_SYSFS=y
-# CONFIG_TMPFS is not set
+CONFIG_TMPFS=y
+CONFIG_TMPFS_POSIX_ACL=y
# CONFIG_HUGETLB_PAGE is not set
CONFIG_RAMFS=y
# CONFIG_CONFIGFS_FS is not set
@@ -1072,7 +1078,12 @@ CONFIG_SUNRPC=y
# CONFIG_RPCSEC_GSS_SPKM3 is not set
CONFIG_SMB_FS=m
# CONFIG_SMB_NLS_DEFAULT is not set
-# CONFIG_CIFS is not set
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set
@@ -1184,7 +1195,46 @@ CONFIG_DEBUG_LL=y
#
# Cryptographic options
#
-# CONFIG_CRYPTO is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_MANAGER=m
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+CONFIG_CRYPTO_SHA1=m
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
#
# Library routines
diff --git a/packages/linux/linux/simpad/linux-2.6.21-SIMpad-cs3-simpad.patch b/packages/linux/linux/simpad/linux-2.6.21-SIMpad-cs3-simpad.patch
index 6d6c373271..cfb9aad906 100644
--- a/packages/linux/linux/simpad/linux-2.6.21-SIMpad-cs3-simpad.patch
+++ b/packages/linux/linux/simpad/linux-2.6.21-SIMpad-cs3-simpad.patch
@@ -1,6 +1,6 @@
diff -uNr linux-2.6.21.vanilla/arch/arm/mach-sa1100/Makefile linux-2.6.21/arch/arm/mach-sa1100/Makefile
---- linux-2.6.21.vanilla/arch/arm/mach-sa1100/Makefile 2007-05-01 16:40:44.000000000 +0200
-+++ linux-2.6.21/arch/arm/mach-sa1100/Makefile 2007-05-01 16:52:10.000000000 +0200
+--- linux-2.6.21.vanilla/arch/arm/mach-sa1100/Makefile 2007-05-29 21:34:59.000000000 +0200
++++ linux-2.6.21/arch/arm/mach-sa1100/Makefile 2007-05-30 17:44:04.000000000 +0200
@@ -40,6 +40,7 @@
obj-$(CONFIG_SA1100_SHANNON) += shannon.o
@@ -11,10 +11,10 @@ diff -uNr linux-2.6.21.vanilla/arch/arm/mach-sa1100/Makefile linux-2.6.21/arch/a
# LEDs support
diff -uNr linux-2.6.21.vanilla/arch/arm/mach-sa1100/cs3-simpad.c linux-2.6.21/arch/arm/mach-sa1100/cs3-simpad.c
--- linux-2.6.21.vanilla/arch/arm/mach-sa1100/cs3-simpad.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21/arch/arm/mach-sa1100/cs3-simpad.c 2007-05-01 16:52:10.000000000 +0200
-@@ -0,0 +1,300 @@
++++ linux-2.6.21/arch/arm/mach-sa1100/cs3-simpad.c 2007-05-30 17:45:51.000000000 +0200
+@@ -0,0 +1,169 @@
+/*
-+ * cs3-simpad.c
++ * simpad-cs3.c
+ *
+ * This driver shows the GPIO states of the cs3 latch. You can also
+ * switch some GPIOS.
@@ -25,6 +25,9 @@ diff -uNr linux-2.6.21.vanilla/arch/arm/mach-sa1100/cs3-simpad.c linux-2.6.21/ar
+ *
+ * Some parts are based on battery.c
+ *
++ * mrdata: -added cs3_ro support
++ * -added preprocessor stuff
++ *
+ */
+
+#include <linux/module.h>
@@ -34,245 +37,97 @@ diff -uNr linux-2.6.21.vanilla/arch/arm/mach-sa1100/cs3-simpad.c linux-2.6.21/ar
+
+#include <asm/arch/simpad.h>
+
++extern long get_cs3_ro(void);
+extern long get_cs3_shadow(void);
+extern void set_cs3_bit(int value);
+extern void clear_cs3_bit(int value);
+
+struct cs3 {
-+ struct class_device class_dev;
-+ const char *name;
-+ char *id;
-+ int type;
++ struct class_device class_dev;
++ const char *name;
++ char *id;
++ int type;
+};
+
+struct cs3 cs3 ={
+ .name = "latch_cs3",
+};
+
-+static ssize_t get_VCC_5V_EN (struct class_device *class_dev, char *buf) {
-+ if (get_cs3_shadow() & VCC_5V_EN )
-+ return sprintf(buf, "1\n");
-+ else
-+ return sprintf(buf, "0\n");
-+}
-+
-+static ssize_t get_VCC_3V_EN (struct class_device *class_dev, char *buf) {
-+ if (get_cs3_shadow() & VCC_3V_EN)
-+ return sprintf(buf, "1\n");
-+ else
-+ return sprintf(buf, "0\n");
-+}
-+
-+static ssize_t get_EN1 (struct class_device *class_dev, char *buf) {
-+ if (get_cs3_shadow() & EN1)
-+ return sprintf(buf, "1\n");
-+ else
-+ return sprintf(buf, "0\n");
-+}
-+
-+static ssize_t get_EN0 (struct class_device *class_dev, char *buf) {
-+ if (get_cs3_shadow() & EN0)
-+ return sprintf(buf, "1\n");
-+ else
-+ return sprintf(buf, "0\n");
-+}
-+
-+static ssize_t get_DISPLAY_ON (struct class_device *class_dev, char *buf) {
-+ if (get_cs3_shadow() & DISPLAY_ON)
-+ return sprintf(buf, "1\n");
-+ else
-+ return sprintf(buf, "0\n");
-+}
-+
-+static ssize_t get_PCMCIA_BUFF_DIS (struct class_device *class_dev, char *buf) {
-+ if (get_cs3_shadow() & PCMCIA_BUFF_DIS)
-+ return sprintf(buf, "1\n");
-+ else
-+ return sprintf(buf, "0\n");
-+}
-+
-+static ssize_t get_MQ_RESET (struct class_device *class_dev, char *buf) {
-+ if (get_cs3_shadow() & MQ_RESET)
-+ return sprintf(buf, "1\n");
-+ else
-+ return sprintf(buf, "0\n");
-+}
-+
-+static ssize_t get_PCMCIA_RESET (struct class_device *class_dev, char *buf) {
-+ if (get_cs3_shadow() & PCMCIA_RESET)
-+ return sprintf(buf, "1\n");
-+ else
-+ return sprintf(buf, "0\n");
-+}
-+
-+static ssize_t get_DECT_POWER_ON (struct class_device *class_dev, char *buf) {
-+ if (get_cs3_shadow() & DECT_POWER_ON)
-+ return sprintf(buf, "1\n");
-+ else
-+ return sprintf(buf, "0\n");
-+}
-+
-+static ssize_t get_IRDA_SD (struct class_device *class_dev, char *buf) {
-+ if (get_cs3_shadow() & IRDA_SD)
-+ return sprintf(buf, "1\n");
-+ else
-+ return sprintf(buf, "0\n");
-+}
-+
-+static ssize_t get_RS232_ON (struct class_device *class_dev, char *buf) {
-+ if (get_cs3_shadow() & RS232_ON)
-+ return sprintf(buf, "1\n");
-+ else
-+ return sprintf(buf, "0\n");
-+}
-+
-+static ssize_t get_SD_MEDIAQ (struct class_device *class_dev, char *buf) {
-+ if (get_cs3_shadow() & SD_MEDIAQ)
-+ return sprintf(buf, "1\n");
-+ else
-+ return sprintf(buf, "0\n");
-+}
-+
-+static ssize_t get_LED2_ON (struct class_device *class_dev, char *buf) {
-+ if (get_cs3_shadow() & LED2_ON)
-+ return sprintf(buf, "1\n");
-+ else
-+ return sprintf(buf, "0\n");
-+}
-+
-+static ssize_t get_IRDA_MODE (struct class_device *class_dev, char *buf) {
-+ if (get_cs3_shadow() & IRDA_MODE)
-+ return sprintf(buf, "1\n");
-+ else
-+ return sprintf(buf, "0\n");
-+}
-+
-+static ssize_t get_ENABLE_5V (struct class_device *class_dev, char *buf) {
-+ if (get_cs3_shadow() & ENABLE_5V)
-+ return sprintf(buf, "1\n");
-+ else
-+ return sprintf(buf, "0\n");
-+}
-+
-+static ssize_t get_RESET_SIMCARD (struct class_device *class_dev, char *buf) {
-+ if (get_cs3_shadow() & RESET_SIMCARD)
-+ return sprintf(buf, "1\n");
-+ else
-+ return sprintf(buf, "0\n");
-+}
-+
-+
-+static ssize_t write_DISPLAY_ON (struct class_device *cdev, const char * buf, size_t count){
-+ char val;
-+ if (sscanf(buf, "%c",&val) !=1)
-+ return -EINVAL;
-+ if (val=='1')
-+ set_cs3_bit(DISPLAY_ON);
-+ else if (val=='0')
-+ clear_cs3_bit(DISPLAY_ON);
-+ return strlen(buf);
-+}
-+
-+static ssize_t write_DECT_POWER_ON (struct class_device *cdev, const char * buf, size_t count){
-+ char val;
-+ if (sscanf(buf, "%c",&val) !=1)
-+ return -EINVAL;
-+ if (val=='1')
-+ set_cs3_bit(DECT_POWER_ON);
-+ else if (val=='0')
-+ clear_cs3_bit(DECT_POWER_ON);
-+ return strlen(buf);
-+}
-+
-+static ssize_t write_IRDA_SD (struct class_device *cdev, const char * buf, size_t count){
-+ char val;
-+ if (sscanf(buf, "%c",&val) !=1)
-+ return -EINVAL;
-+ if (val=='1')
-+ set_cs3_bit(IRDA_SD);
-+ else if (val=='0')
-+ clear_cs3_bit(IRDA_SD);
-+ return strlen(buf);
-+}
-+
-+static ssize_t write_SD_MEDIAQ (struct class_device *cdev, const char * buf, size_t count){
-+ char val;
-+ if (sscanf(buf, "%c",&val) !=1)
-+ return -EINVAL;
-+ if (val=='1')
-+ set_cs3_bit(SD_MEDIAQ);
-+ else if (val=='0')
-+ clear_cs3_bit(SD_MEDIAQ);
-+ return strlen(buf);
-+}
-+
-+static ssize_t write_LED2_ON (struct class_device *cdev, const char * buf, size_t count){
-+ char val;
-+ if (sscanf(buf, "%c",&val) !=1)
-+ return -EINVAL;
-+ if (val=='1')
-+ set_cs3_bit(LED2_ON);
-+ else if (val=='0')
-+ clear_cs3_bit(LED2_ON);
-+ return strlen(buf);
-+}
-+
-+static ssize_t write_IRDA_MODE (struct class_device *cdev, const char * buf, size_t count){
-+ char val;
-+ if (sscanf(buf, "%c",&val) !=1)
-+ return -EINVAL;
-+ if (val=='1')
-+ set_cs3_bit(IRDA_MODE);
-+ else if (val=='0')
-+ clear_cs3_bit(IRDA_MODE);
-+ return strlen(buf);
-+}
+
-+static ssize_t write_RESET_SIMCARD (struct class_device *cdev, const char * buf, size_t count){
-+ char val;
-+ if (sscanf(buf, "%c",&val) !=1)
-+ return -EINVAL;
-+ if (val=='1')
-+ set_cs3_bit(RESET_SIMCARD);
-+ else if (val=='0')
-+ clear_cs3_bit(RESET_SIMCARD);
-+ return strlen(buf);
++#define CS3_STORE_ATTR(namek,nameg) \
++static ssize_t namek##_store (struct class_device *cdev, const char * buf, size_t count) \
++{ \
++ char val; \
++ if (sscanf(buf, "%c",&val) != 1) \
++ return -EINVAL; \
++ if (val == '1') \
++ set_cs3_bit(nameg); \
++ else if (val == '0') \
++ clear_cs3_bit(nameg); \
++ return strlen(buf); \
+}
+
-+static CLASS_DEVICE_ATTR(vcc_5v_en, 0444, get_VCC_5V_EN, NULL);
-+static CLASS_DEVICE_ATTR(vcc_3v_en, 0444, get_VCC_3V_EN, NULL);
-+static CLASS_DEVICE_ATTR(en1, 0444, get_EN1, NULL);
-+static CLASS_DEVICE_ATTR(en0, 0444, get_EN0, NULL);
-+static CLASS_DEVICE_ATTR(display_on, 0664, get_DISPLAY_ON, write_DISPLAY_ON);
-+static CLASS_DEVICE_ATTR(pcmcia_buff_dis, 0444, get_PCMCIA_BUFF_DIS, NULL);
-+static CLASS_DEVICE_ATTR(mq_reset, 0444, get_MQ_RESET, NULL);
-+static CLASS_DEVICE_ATTR(pcmcia_reset, 0444, get_PCMCIA_RESET, NULL);
-+static CLASS_DEVICE_ATTR(dect_power_on, 0664, get_DECT_POWER_ON, write_DECT_POWER_ON);
-+static CLASS_DEVICE_ATTR(irda_sd, 0664, get_IRDA_SD, write_IRDA_SD);
-+static CLASS_DEVICE_ATTR(rs232_on, 0444, get_RS232_ON, NULL);
-+static CLASS_DEVICE_ATTR(sd_mediaq, 0664, get_SD_MEDIAQ, write_SD_MEDIAQ);
-+static CLASS_DEVICE_ATTR(led2_on, 0664, get_LED2_ON, write_LED2_ON);
-+static CLASS_DEVICE_ATTR(irda_mode, 0664, get_IRDA_MODE, write_IRDA_MODE);
-+static CLASS_DEVICE_ATTR(enable_5v, 0444, get_ENABLE_5V, NULL);
-+static CLASS_DEVICE_ATTR(reset_simcard, 0664, get_RESET_SIMCARD, write_RESET_SIMCARD);
++CS3_STORE_ATTR(display_on, DISPLAY_ON);
++CS3_STORE_ATTR(dect_power_on, DECT_POWER_ON);
++CS3_STORE_ATTR(irda_sd, IRDA_SD);
++CS3_STORE_ATTR(sd_mediaq, SD_MEDIAQ);
++CS3_STORE_ATTR(led2_on, LED2_ON);
++CS3_STORE_ATTR(irda_mode, IRDA_MODE);
++CS3_STORE_ATTR(reset_simcard, RESET_SIMCARD);
++
++
++#define CS3_ATTR(shadro,namek,nameg,mode,store) \
++static ssize_t namek##_show(struct class_device *class_dev, char *buf) \
++{ \
++ if (get_cs3_##shadro() & nameg ) \
++ return sprintf(buf, "1\n"); \
++ else \
++ return sprintf(buf, "0\n"); \
++} \
++static CLASS_DEVICE_ATTR(namek, mode, namek##_show, store)
++
++CS3_ATTR(shadow, vcc_5v_en, VCC_5V_EN, 0444, NULL);
++CS3_ATTR(shadow, vcc_3v_en, VCC_3V_EN, 0444, NULL);
++CS3_ATTR(shadow, en1, EN1, 0444, NULL);
++CS3_ATTR(shadow, en0, EN0, 0444, NULL);
++CS3_ATTR(shadow, display_on, DISPLAY_ON, 0664, display_on_store);
++CS3_ATTR(shadow, pcmcia_buff_dis, PCMCIA_BUFF_DIS, 0444, NULL);
++CS3_ATTR(shadow, mq_reset, MQ_RESET, 0444, NULL);
++CS3_ATTR(shadow, pcmcia_reset, PCMCIA_RESET, 0444, NULL);
++CS3_ATTR(shadow, dect_power_on, DECT_POWER_ON, 0664, dect_power_on_store);
++CS3_ATTR(shadow, irda_sd, IRDA_SD, 0664, irda_sd_store);
++CS3_ATTR(shadow, rs232_on, RS232_ON, 0444, NULL);
++CS3_ATTR(shadow, sd_mediaq, SD_MEDIAQ, 0664, sd_mediaq_store);
++CS3_ATTR(shadow, led2_on, LED2_ON, 0664, led2_on_store);
++CS3_ATTR(shadow, irda_mode, IRDA_MODE, 0664, irda_mode_store);
++CS3_ATTR(shadow, enable_5v, ENABLE_5V, 0444, NULL);
++CS3_ATTR(shadow, reset_simcard, RESET_SIMCARD, 0664, reset_simcard_store);
++CS3_ATTR(ro, pcmcia_bvd1, PCMCIA_BVD1, 0444, NULL);
++CS3_ATTR(ro, pcmcia_bvd2, PCMCIA_BVD2, 0444, NULL);
++CS3_ATTR(ro, pcmcia_vs1, PCMCIA_VS1, 0444, NULL);
++CS3_ATTR(ro, pcmcia_vs2, PCMCIA_VS2, 0444, NULL);
++CS3_ATTR(ro, lock_ind, LOCK_IND, 0444, NULL);
++CS3_ATTR(ro, charging_state, CHARGING_STATE, 0444, NULL);
++CS3_ATTR(ro, pcmcia_short, PCMCIA_SHORT, 0444, NULL);
+
+static struct class simpad_gpios_class = {
-+ .name = "simpad"
++ .name = "simpad",
+};
+
-+#define create_entry_conditional(name) \
-+ rc = class_device_create_file(&cs3->class_dev, &class_device_attr_##name); \
-+ if (rc) goto out; \
++#define create_entry_conditional(namek) \
++ rc = class_device_create_file(&cs3->class_dev, &class_device_attr_##namek); \
++ if (rc) goto out; \
+
-+static int register_cs3_latch(struct cs3 *cs3){
++static int register_cs3_latch(struct cs3 *cs3)
++{
+ int rc = 0;
-+ cs3->class_dev.class = &simpad_gpios_class;
-+ strcpy(cs3->class_dev.class_id, cs3->name);
-+ rc = class_device_register(&cs3->class_dev);
-+ if(rc)
-+ goto out;
++ cs3->class_dev.class = &simpad_gpios_class;
++ strcpy(cs3->class_dev.class_id, cs3->name);
++ rc = class_device_register(&cs3->class_dev);
++ if(rc)
++ goto out;
+
-+ create_entry_conditional(vcc_5v_en);
++ create_entry_conditional(vcc_5v_en);
+ create_entry_conditional(vcc_3v_en);
+ create_entry_conditional(en1);
+ create_entry_conditional(en0);
@@ -288,28 +143,42 @@ diff -uNr linux-2.6.21.vanilla/arch/arm/mach-sa1100/cs3-simpad.c linux-2.6.21/ar
+ create_entry_conditional(irda_mode);
+ create_entry_conditional(enable_5v);
+ create_entry_conditional(reset_simcard);
-+
++ create_entry_conditional(pcmcia_bvd1);
++ create_entry_conditional(pcmcia_bvd2);
++ create_entry_conditional(pcmcia_vs1);
++ create_entry_conditional(pcmcia_vs2);
++ create_entry_conditional(lock_ind);
++ create_entry_conditional(charging_state);
++ create_entry_conditional(pcmcia_short);
++
+out:
+ return rc;
+}
+
+static int __init simpad_gpios_class_init(void)
+{
-+ if (class_register(&simpad_gpios_class) != 0)
-+ printk(KERN_ERR "cs3 latch class failed "
-+ "to register properly\n");
-+ register_cs3_latch(&cs3);
-+ return 0;
++ int rc = 0;
++
++ rc = class_register(&simpad_gpios_class);
++
++ if(rc != 0)
++ {
++ printk(KERN_ERR "cs3 latch class failed to register properly\n");
++ return rc;
++ }
++
++ rc = register_cs3_latch(&cs3);
++ return rc;
+}
+
+static void __exit simpad_gpios_class_exit(void)
+{
-+ class_unregister(&simpad_gpios_class);
++ class_unregister(&simpad_gpios_class);
+}
+
+module_init(simpad_gpios_class_init);
+module_exit(simpad_gpios_class_exit);
-+
-+MODULE_DESCRIPTION("CS3_latch driver");
++
+MODULE_AUTHOR("Bernhard Guillon");
++MODULE_DESCRIPTION("CS3_latch driver");
+MODULE_LICENSE("GPL");
diff --git a/packages/linux/linux/simpad/linux-2.6.21-SIMpad-serial-and-gpio_keys.patch b/packages/linux/linux/simpad/linux-2.6.21-SIMpad-serial-and-gpio_keys.patch
deleted file mode 100644
index 90ce4cb009..0000000000
--- a/packages/linux/linux/simpad/linux-2.6.21-SIMpad-serial-and-gpio_keys.patch
+++ /dev/null
@@ -1,194 +0,0 @@
-diff -uNr linux-2.6.21.vanilla/arch/arm/mach-sa1100/simpad.c linux-2.6.21/arch/arm/mach-sa1100/simpad.c
---- linux-2.6.21.vanilla/arch/arm/mach-sa1100/simpad.c 2007-05-01 16:40:44.000000000 +0200
-+++ linux-2.6.21/arch/arm/mach-sa1100/simpad.c 2007-05-01 19:23:29.000000000 +0200
-@@ -1,5 +1,14 @@
- /*
- * linux/arch/arm/mach-sa1100/simpad.c
-+ *
-+ * 2007/04/11 mrdata:
-+ * - insert simpad_uart_set_mctrl()
-+ * simpad_uart_get_mctrl()
-+ * - internal RS232/DECT/Bluetooth
-+ * works again (based on 2.4 simpad-serial.patch)
-+ *
-+ * 2007/04/12 Bernhard Guillon:
-+ * -added gpio_keys (based on h3000.c from hh.org)
- */
-
- #include <linux/module.h>
-@@ -27,6 +36,8 @@
-
- #include <linux/serial_core.h>
- #include <linux/ioport.h>
-+#include <linux/input.h>
-+#include <linux/gpio_keys.h>
- #include <asm/io.h>
-
- #include "generic.h"
-@@ -55,6 +66,7 @@
- *(CS3BUSTYPE *)(CS3_BASE) = cs3_shadow;
- }
-
-+EXPORT_SYMBOL(get_cs3_shadow);
- EXPORT_SYMBOL(set_cs3_bit);
- EXPORT_SYMBOL(clear_cs3_bit);
-
-@@ -73,23 +85,71 @@
- };
-
-
-+static void simpad_uart_set_mctrl(struct uart_port *port, u_int mctrl)
-+{
-+ if (port->mapbase == _Ser1UTCR0) {
-+ /* internal serial port (ttySA1, DECT/Bluetooth) */
-+ if (mctrl & TIOCM_RTS) GPCR = GPIO_UART1_RTS;
-+ else GPSR = GPIO_UART1_RTS;
-+
-+ if (mctrl & TIOCM_DTR) GPCR = GPIO_UART1_DTR;
-+ else GPSR = GPIO_UART1_DTR;
-+ }
-+
-+ else if (port->mapbase == _Ser3UTCR0) {
-+ /* external serial port (ttySA0, RS232) */
-+ if (mctrl & TIOCM_RTS) GPCR = GPIO_UART3_RTS;
-+ else GPSR = GPIO_UART3_RTS;
-+
-+ if (mctrl & TIOCM_DTR) GPCR = GPIO_UART3_DTR;
-+ else GPSR = GPIO_UART3_DTR;
-+ }
-+}
-+
-+
-+static u_int simpad_uart_get_mctrl(struct uart_port *port)
-+{
-+ u_int ret = TIOCM_CD | TIOCM_CTS | TIOCM_DSR;
-+
-+ if (port->mapbase == _Ser1UTCR0) {
-+ /* internal serial port (ttySA1, DECT/Bluetooth) */
-+ int gplr = GPLR;
-+ if (gplr & GPIO_UART1_DCD) ret &= ~TIOCM_CD;
-+ if (gplr & GPIO_UART1_CTS) ret &= ~TIOCM_CTS;
-+ if (gplr & GPIO_UART1_DSR) ret &= ~TIOCM_DSR;
-+ }
-+
-+ else if (port->mapbase == _Ser3UTCR0) {
-+ /* external serial port (ttySA0, RS232) */
-+ int gplr = GPLR;
-+ if (gplr & GPIO_UART3_DCD) ret &= ~TIOCM_CD;
-+ if (gplr & GPIO_UART3_CTS) ret &= ~TIOCM_CTS;
-+ if (gplr & GPIO_UART3_DSR) ret &= ~TIOCM_DSR;
-+ }
-+ return ret;
-+}
-+
-+
- static void simpad_uart_pm(struct uart_port *port, u_int state, u_int oldstate)
- {
-- if (port->mapbase == (u_int)&Ser1UTCR0) {
-- if (state)
-- {
-- clear_cs3_bit(RS232_ON);
-- clear_cs3_bit(DECT_POWER_ON);
-- }else
-- {
-- set_cs3_bit(RS232_ON);
-- set_cs3_bit(DECT_POWER_ON);
-- }
-- }
-+ if (port->mapbase == (u_int)&Ser3UTCR0) {
-+ if (state)
-+ {
-+ clear_cs3_bit(RS232_ON);
-+ /* clear_cs3_bit(DECT_POWER_ON); */
-+ }else
-+ {
-+ set_cs3_bit(RS232_ON);
-+ /* set_cs3_bit(DECT_POWER_ON); */
-+ }
-+ }
- }
-
-+
- static struct sa1100_port_fns simpad_port_fns __initdata = {
-- .pm = simpad_uart_pm,
-+ .set_mctrl = simpad_uart_set_mctrl,
-+ .get_mctrl = simpad_uart_get_mctrl,
-+ .pm = simpad_uart_pm,
- };
-
-
-@@ -150,7 +210,7 @@
- sa1100_register_uart(0, 3); /* serial interface */
- sa1100_register_uart(1, 1); /* DECT */
-
-- // Reassign UART 1 pins
-+ /* Reassign UART 1 pins */
- GAFR |= GPIO_UART_TXD | GPIO_UART_RXD;
- GPDR |= GPIO_UART_TXD | GPIO_LDD13 | GPIO_LDD15;
- GPDR &= ~GPIO_UART_RXD;
-@@ -173,7 +233,7 @@
-
- static void simpad_power_off(void)
- {
-- local_irq_disable(); // was cli
-+ local_irq_disable(); /* was cli */
- set_cs3(0x800); /* only SD_MEDIAQ */
-
- /* disable internal oscillator, float CS lines */
-@@ -197,19 +257,42 @@
-
-
- /*
-+ * gpio_keys
-+*/
-+
-+static struct gpio_keys_button simpad_button_table[] = {
-+ { KEY_POWER, IRQ_GPIO_POWER_BUTTON, 0, "power button" },
-+};
-+
-+static struct gpio_keys_platform_data simpad_keys_data = {
-+ .buttons = simpad_button_table,
-+ .nbuttons = ARRAY_SIZE(simpad_button_table),
-+};
-+
-+static struct platform_device simpad_keys = {
-+ .name = "gpio-keys",
-+ .dev = {
-+ .platform_data = &simpad_keys_data,
-+ },
-+};
-+
-+
-+/*
- * MediaQ Video Device
- */
-+
- static struct platform_device simpad_mq200fb = {
- .name = "simpad-mq200",
- .id = 0,
- };
-
-+
- static struct platform_device *devices[] __initdata = {
-- &simpad_mq200fb
-+ &simpad_keys,
-+ &simpad_mq200fb,
- };
-
-
--
- static int __init simpad_init(void)
- {
- int ret;
-diff -uNr linux-2.6.21.vanilla/include/asm-arm/arch-sa1100/simpad.h linux-2.6.21/include/asm-arm/arch-sa1100/simpad.h
---- linux-2.6.21.vanilla/include/asm-arm/arch-sa1100/simpad.h 2007-05-01 16:40:51.000000000 +0200
-+++ linux-2.6.21/include/asm-arm/arch-sa1100/simpad.h 2007-05-01 19:22:45.000000000 +0200
-@@ -12,7 +12,7 @@
- #define __ASM_ARCH_SIMPAD_H
-
-
--#define GPIO_UART1_RTS GPIO_GPIO14
-+#define GPIO_UART1_RTS GPIO_GPIO9
- #define GPIO_UART1_DTR GPIO_GPIO7
- #define GPIO_UART1_CTS GPIO_GPIO8
- #define GPIO_UART1_DCD GPIO_GPIO23
diff --git a/packages/linux/linux/simpad/linux-2.6.21-SIMpad-ucb1x00-switches.patch b/packages/linux/linux/simpad/linux-2.6.21-SIMpad-ucb1x00-switches.patch
index ff2f50566c..552bb8b223 100644
--- a/packages/linux/linux/simpad/linux-2.6.21-SIMpad-ucb1x00-switches.patch
+++ b/packages/linux/linux/simpad/linux-2.6.21-SIMpad-ucb1x00-switches.patch
@@ -1,6 +1,6 @@
diff -uNr linux-2.6.21.vanilla/drivers/mfd/Kconfig linux-2.6.21/drivers/mfd/Kconfig
---- linux-2.6.21.vanilla/drivers/mfd/Kconfig 2007-05-01 16:40:45.000000000 +0200
-+++ linux-2.6.21/drivers/mfd/Kconfig 2007-05-01 16:55:38.000000000 +0200
+--- linux-2.6.21.vanilla/drivers/mfd/Kconfig 2007-04-26 05:08:32.000000000 +0200
++++ linux-2.6.21/drivers/mfd/Kconfig 2007-05-29 12:56:32.000000000 +0200
@@ -37,4 +37,7 @@
tristate "Touchscreen interface support"
depends on MCP_UCB1200 && INPUT
@@ -10,8 +10,8 @@ diff -uNr linux-2.6.21.vanilla/drivers/mfd/Kconfig linux-2.6.21/drivers/mfd/Kcon
+ depends on MCP_UCB1200 && INPUT
endmenu
diff -uNr linux-2.6.21.vanilla/drivers/mfd/Makefile linux-2.6.21/drivers/mfd/Makefile
---- linux-2.6.21.vanilla/drivers/mfd/Makefile 2007-05-01 16:40:45.000000000 +0200
-+++ linux-2.6.21/drivers/mfd/Makefile 2007-05-01 16:55:38.000000000 +0200
+--- linux-2.6.21.vanilla/drivers/mfd/Makefile 2007-04-26 05:08:32.000000000 +0200
++++ linux-2.6.21/drivers/mfd/Makefile 2007-05-29 12:56:32.000000000 +0200
@@ -8,7 +8,7 @@
obj-$(CONFIG_MCP_SA11X0) += mcp-sa11x0.o
obj-$(CONFIG_MCP_UCB1200) += ucb1x00-core.o
@@ -21,10 +21,10 @@ diff -uNr linux-2.6.21.vanilla/drivers/mfd/Makefile linux-2.6.21/drivers/mfd/Mak
ifeq ($(CONFIG_SA1100_ASSABET),y)
obj-$(CONFIG_MCP_UCB1200) += ucb1x00-assabet.o
endif
-diff -uNr linux-2.6.21.vanilla/drivers/mfd/ucb1x00-switches.c linux-2.6.21/drivers/mfd/ucb1x00-switches.c
---- linux-2.6.21.vanilla/drivers/mfd/ucb1x00-switches.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.21/drivers/mfd/ucb1x00-switches.c 2007-05-01 16:55:38.000000000 +0200
-@@ -0,0 +1,162 @@
+diff -Naur linux-2.6.21/drivers/mfd.old/ucb1x00-switches.c linux-2.6.21/drivers/mfd/ucb1x00-switches.c
+--- linux-2.6.21/drivers/mfd/ucb1x00-switches.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.21/drivers/mfd/ucb1x00-switches.c 2007-07-04 23:59:39.000000000 +0200
+@@ -0,0 +1,332 @@
+/*
+ * linux/drivers/mfd/ucb1x00-switches.c
+ *
@@ -42,48 +42,166 @@ diff -uNr linux-2.6.21.vanilla/drivers/mfd/ucb1x00-switches.c linux-2.6.21/drive
+ * This driver is based on the 2.4 ucb1x00-switches, the 2.6 ucb1x00-assabet
+ * and the ucb1x00-ts driver.
+ *
++ * 2007/06/21 mrdata:
++ * - create new thread kswd() to handle irq_events for ucb1300-gpio's
++ * - found out, that not every key-press or key-release
++ * generate a irq_event
++ * -> establish key_state handling
++ * key_state, key_state_last <-> KEY_PRESS, KEY_RELEASE
++ * -> after irq_event polling the ucb1300-gpio's till all keys
++ * in key_state = KEY_RELEASE
++ *
+ */
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/input.h>
+#include <linux/device.h>
++#include <linux/sched.h>
++#include <linux/freezer.h>
++#include <linux/kthread.h>
+
+#include <asm/dma.h>
+
+#include "ucb1x00.h"
+
++#define KEY_PRESS 1
++#define KEY_RELEASE 0
++
+static int key [6] = { KEY_PROG1,KEY_PROG2,KEY_UP,KEY_DOWN,KEY_LEFT,KEY_RIGHT };
+
++static unsigned short int key_state [6] = { 0, 0, 0, 0, 0, 0};
++static unsigned short int key_state_last [6] = { 1, 1, 1, 1, 1, 1};
++
+struct ucb1x00_switches {
+ struct input_dev *idev;
+ struct ucb1x00 *ucb;
++
++ wait_queue_head_t irq_wait;
++ struct task_struct *rtask;
++
++ int idx;
++
++ unsigned int valid:1;
+};
+
-+static void ucb1x00_dev_irq(int idx, void *id)
++static int ucb1x00_thread(void *_switches_id)
+{
-+ static unsigned short int last;
-+ unsigned short int this;
-+ struct ucb1x00_switches *switches = id;
++ unsigned short int this;
++ int idx_tmp;
++ int i;
++ struct ucb1x00_switches *switches = _switches_id;
+ struct input_dev *idev = switches->idev;
++ struct task_struct *tsk = current;
++ DECLARE_WAITQUEUE(wait, tsk);
+
-+ ucb1x00_enable(switches->ucb);
++ add_wait_queue(&switches->irq_wait, &wait);
+
-+ this=~ucb1x00_io_read(switches->ucb);
-+ if (this==last) {
-+ return;
-+ }
++ while (!kthread_should_stop())
++ {
++ signed long timeout;
++
++ if ((switches->idx >= 0) && (switches->idx <= 5) && (switches->valid == 1))
++ {
++ switches->valid = 0;
++
++ idx_tmp = switches->idx;
++
++ ucb1x00_enable(switches->ucb);
++
++ this = ~ucb1x00_io_read(switches->ucb);
+
-+ last=this;
++ ucb1x00_disable(switches->ucb);
++
++ if (key_state[idx_tmp] == KEY_RELEASE)
++ {
++ key_state_last[idx_tmp] = KEY_RELEASE;
++ key_state[idx_tmp] = KEY_PRESS;
+
-+ if ((idx >=0) && (idx <=5)) {
-+ if ((this & (1<<idx)) != 0) input_report_key(idev, key[idx], 1);
-+ else input_report_key(idev, key[idx], 0);
++ input_report_key(idev, key[idx_tmp], KEY_PRESS);
++ input_sync(idev);
++ }
++
++ for (i = 0; i < 6; i++)
++ {
++ if ((key_state[i] == KEY_RELEASE) && (((this & (1 << i)) ? 1 : 0) == KEY_PRESS))
++ {
++ key_state_last[i] = KEY_RELEASE;
++ key_state[i] = KEY_PRESS;
++
++ input_report_key(idev, key[i], KEY_PRESS);
++ input_sync(idev);
++ }
++ }
++
++ for(;;)
++ {
++ ucb1x00_enable(switches->ucb);
++ this = ~ucb1x00_io_read(switches->ucb);
++ ucb1x00_disable(switches->ucb);
++
++ for (i = 0; i < 6; i++)
++ {
++ if ((key_state[i] == KEY_PRESS) && (((this & (1 << i)) ? 1 : 0) == KEY_RELEASE))
++ {
++ key_state_last[i] = KEY_PRESS;
++ key_state[i] = KEY_RELEASE;
++
++ input_report_key(idev, key[i], KEY_RELEASE);
++ input_sync(idev);
++ }
++
++ if ((key_state[i] == KEY_RELEASE) && (((this & (1 << i)) ? 1 : 0) == KEY_PRESS))
++ {
++ key_state_last[i] = KEY_RELEASE;
++ key_state[i] = KEY_PRESS;
++
++ input_report_key(idev, key[i], KEY_PRESS);
++ input_sync(idev);
++ }
++
++ }
++
++ // left loop, if no key press detect
++ if ((this | 0xff80) == 0xff80)
++ {
++ break;
++ }
++
++ set_task_state(tsk, TASK_INTERRUPTIBLE);
++
++ try_to_freeze();
++
++ timeout = HZ / 100;
++
++ schedule_timeout(timeout);
++ }
++ }
++
++ set_task_state(tsk, TASK_INTERRUPTIBLE);
++
++ try_to_freeze();
++
++ timeout = MAX_SCHEDULE_TIMEOUT;
++
++ schedule_timeout(timeout);
+ }
-+ else {
-+ printk(KERN_DEBUG "switches-ucb1x00 is BUGGY!!! \n");
-+ return;
-+ }
+
++ remove_wait_queue(&switches->irq_wait, &wait);
++
++ switches->rtask = NULL;
++
++ return 0;
++}
++
++
++static void ucb1x00_dev_irq(int idx, void *id)
++{
++ struct ucb1x00_switches *switches = id;
++
++ switches->idx = idx;
++ switches->valid = 1;
++
++ wake_up(&switches->irq_wait);
+}
+
+static int ucb1x00_switches_add(struct ucb1x00_dev *dev)
@@ -121,6 +239,10 @@ diff -uNr linux-2.6.21.vanilla/drivers/mfd/ucb1x00-switches.c linux-2.6.21/drive
+ switches->idev = idev;
+ dev->priv = switches;
+
++ BUG_ON(switches->rtask);
++
++ init_waitqueue_head(&switches->irq_wait);
++
+ ucb1x00_enable(switches->ucb);
+
+ ucb1x00_io_set_dir(switches->ucb,
@@ -132,14 +254,37 @@ diff -uNr linux-2.6.21.vanilla/drivers/mfd/ucb1x00-switches.c linux-2.6.21/drive
+
+ for (i = 0; i < 6; ++i) {
+ ucb1x00_enable_irq(switches->ucb, i, UCB_RISING | UCB_FALLING);
++
+ if (ucb1x00_hook_irq(switches->ucb, i, ucb1x00_dev_irq, switches) < 0) {
+ printk(KERN_ERR "unable to hook IRQ for "
+ "UCB1300 SWITCH_%d\n", i);
+ return -EBUSY;
+ }
+ }
++
++ switches->rtask = kthread_run(ucb1x00_thread, switches, "kswd");
++ if (!IS_ERR(switches->rtask))
++ {
++ return 0;
++ }
++ else
++ {
++ input_unregister_device(switches->idev);
+
-+ return 0;
++ 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);
++ }
++ switches->rtask = NULL;
++ ucb1x00_disable(switches->ucb);
++ kfree(switches);
++
++ return -EFAULT;
++ }
+
+fail:
+ input_free_device(idev);
@@ -152,6 +297,12 @@ diff -uNr linux-2.6.21.vanilla/drivers/mfd/ucb1x00-switches.c linux-2.6.21/drive
+{
+ int i;
+ struct ucb1x00_switches *switches = dev->priv;
++
++ if (switches->rtask)
++ kthread_stop(switches->rtask);
++
++ switches->rtask = NULL;
++
+ input_unregister_device(switches->idev);
+
+ for (i = 5; i >= 0; --i) {
@@ -166,9 +317,28 @@ diff -uNr linux-2.6.21.vanilla/drivers/mfd/ucb1x00-switches.c linux-2.6.21/drive
+ kfree(switches);
+}
+
++#ifdef CONFIG_PM
++static int ucb1x00_switches_resume(struct ucb1x00_dev *dev)
++{
++ struct ucb1x00_switches *switches = dev->priv;
++
++ if (switches->rtask != NULL)
++ {
++ switches->valid = 0;
++ wake_up(&switches->irq_wait);
++
++ printk(KERN_DEBUG "ucb1x00-switches.c -> _switches_resume() kswd - restart *DONE*\n");
++ }
++ return 0;
++}
++#else
++#define ucb1x00_switches_resume NULL
++#endif
++
+static struct ucb1x00_driver ucb1x00_switches_driver = {
+ .add = ucb1x00_switches_add,
+ .remove = ucb1x00_switches_remove,
++ .resume = ucb1x00_switches_resume,
+};
+
+static int __init ucb1x00_switches_init(void)
diff --git a/packages/linux/linux/simpad/linux-2.6.21-pcmcia-device-to-platform-driver.patch b/packages/linux/linux/simpad/linux-2.6.21-pcmcia-device-to-platform-driver.patch
deleted file mode 100644
index e6233cbe30..0000000000
--- a/packages/linux/linux/simpad/linux-2.6.21-pcmcia-device-to-platform-driver.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-diff -uNr linux-2.6.21.vanilla/drivers/pcmcia/sa1100_generic.c linux-2.6.21/drivers/pcmcia/sa1100_generic.c
---- linux-2.6.21.vanilla/drivers/pcmcia/sa1100_generic.c 2007-05-01 16:40:46.000000000 +0200
-+++ linux-2.6.21/drivers/pcmcia/sa1100_generic.c 2007-05-01 19:38:05.000000000 +0200
-@@ -28,6 +28,9 @@
- the provisions above, a recipient may use your version of this
- file under either the MPL or the GPL.
-
-+ 2007 mrnice: added thesings changes from device_driver
-+ to platform_driver - many thx to thesing
-+
- ======================================================================*/
-
- #include <linux/module.h>
-@@ -81,13 +84,15 @@
- return ret;
- }
-
--static struct device_driver sa11x0_pcmcia_driver = {
-- .probe = sa11x0_drv_pcmcia_probe,
-- .remove = soc_common_drv_pcmcia_remove,
-- .name = "sa11x0-pcmcia",
-- .bus = &platform_bus_type,
-- .suspend = pcmcia_socket_dev_suspend,
-- .resume = pcmcia_socket_dev_resume,
-+static struct platform_driver sa11x0_pcmcia_driver = {
-+ .driver = {
-+ .name = "sa11x0-pcmcia",
-+ .probe = sa11x0_drv_pcmcia_probe,
-+ .remove = soc_common_drv_pcmcia_remove,
-+ .suspend= pcmcia_socket_dev_suspend,
-+ .resume = pcmcia_socket_dev_resume,
-+ //.bus = &platform_bus_type,
-+ },
- };
-
- /* sa11x0_pcmcia_init()
-@@ -100,7 +105,7 @@
- */
- static int __init sa11x0_pcmcia_init(void)
- {
-- return driver_register(&sa11x0_pcmcia_driver);
-+ return platform_driver_register(&sa11x0_pcmcia_driver);
- }
-
- /* sa11x0_pcmcia_exit()
-@@ -110,7 +115,7 @@
- */
- static void __exit sa11x0_pcmcia_exit(void)
- {
-- driver_unregister(&sa11x0_pcmcia_driver);
-+ platform_driver_unregister(&sa11x0_pcmcia_driver);
- }
-
- MODULE_AUTHOR("John Dorsey <john+@cs.cmu.edu>");
diff --git a/packages/linux/linux_2.6.21.bb b/packages/linux/linux_2.6.21.bb
index fda06caaf1..37c8f9cce5 100644
--- a/packages/linux/linux_2.6.21.bb
+++ b/packages/linux/linux_2.6.21.bb
@@ -2,7 +2,7 @@ require linux.inc
DEFAULT_PREFERENCE_at91sam9263ek = "-1"
-PR = "r4"
+PR = "r5"
SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2 \
file://defconfig \
@@ -11,9 +11,14 @@ SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2 \
SRC_URI_append_simpad = "\
file://linux-2.6.21-SIMpad-cs3-simpad.patch;patch=1 \
file://linux-2.6.21-SIMpad-mq200.patch;patch=1 \
- file://linux-2.6.21-SIMpad-serial-and-gpio_keys.patch;patch=1 \
+ file://linux-2.6.21-SIMpad-serial-gpio_keys-and-cs3-ro.patch;patch=1 \
file://linux-2.6.21-SIMpad-ucb1x00-switches.patch;patch=1 \
- file://linux-2.6.21-pcmcia-device-to-platform-driver.patch;patch=1 \
+ file://linux-2.6.21-SIMpad-pcmcia.patch;patch=1 \
+ file://linux-2.6.21-SIMpad-net-shared-irq.patch;patch=1 \
+ file://linux-2.6.21-SIMpad-ucb1x00-ts-supend-and-accuracy.patch;patch=1 \
+ file://linux-2.6.21-SIMpad-GPIO-MMC-mod.patch;patch=1 \
+ file://linux-2.6.21-SIMpad-battery-old-way-but-also-with-sysfs.patch;patch=1 \
+ file://linux-2.6.21-SIMpad-usb-gadget.patch;patch=1 \
"
SRC_URI_append_kb9202 = " http://maxim.org.za/AT91RM9200/2.6/2.6.21-at91.patch.gz;patch=1 "
SRC_URI_append_at91sam9263ek = " http://maxim.org.za/AT91RM9200/2.6/2.6.21-at91.patch.gz;patch=1 "