[oe-commits] org.oe.angstrom-2007.12-stable linux-rp: backports from .dev:

koen commit openembedded-commits at lists.openembedded.org
Fri Mar 7 09:53:57 UTC 2008


linux-rp: backports from .dev:
* make .23 default for poodle
* misc fixes for .23
* merge .24 as well, but disable it by default

Author: koen at openembedded.org
Branch: org.openembedded.angstrom-2007.12-stable
Revision: 768b9b6a8b42afe9aaae601e60ab5bea15d975c9
ViewMTN: http://monotone.openembedded.org/revision/info/768b9b6a8b42afe9aaae601e60ab5bea15d975c9
Files:
1
packages/linux/linux-rp-2.6.24
packages/linux/linux-rp-2.6.24/tosa
packages/linux/linux-rp-2.6.23/hrw-add-wcf11-to-hostap.patch
packages/linux/linux-rp-2.6.23/mtd-module.patch
packages/linux/linux-rp-2.6.23/sharpsl-rc-r1.patch
packages/linux/linux-rp-2.6.23/versatile-armv6.patch
packages/linux/linux-rp-2.6.23/wm8750-treble.patch
packages/linux/linux-rp-2.6.24/binutils-buildid-arm.patch
packages/linux/linux-rp-2.6.24/connectplus-prevent-oops-HACK.patch
packages/linux/linux-rp-2.6.24/connectplus-remove-ide-HACK.patch
packages/linux/linux-rp-2.6.24/defconfig-akita
packages/linux/linux-rp-2.6.24/defconfig-bootcdx86
packages/linux/linux-rp-2.6.24/defconfig-c7x0
packages/linux/linux-rp-2.6.24/defconfig-collie
packages/linux/linux-rp-2.6.24/defconfig-htcuniversal
packages/linux/linux-rp-2.6.24/defconfig-hx2000
packages/linux/linux-rp-2.6.24/defconfig-poodle
packages/linux/linux-rp-2.6.24/defconfig-qemuarm
packages/linux/linux-rp-2.6.24/defconfig-qemux86
packages/linux/linux-rp-2.6.24/defconfig-spitz
packages/linux/linux-rp-2.6.24/defconfig-tosa
packages/linux/linux-rp-2.6.24/defconfig-zylonite
packages/linux/linux-rp-2.6.24/hostap-monitor-mode.patch
packages/linux/linux-rp-2.6.24/htcuni-acx.patch
packages/linux/linux-rp-2.6.24/htcuni.patch
packages/linux/linux-rp-2.6.24/mtd-module.patch
packages/linux/linux-rp-2.6.24/poodle_ts.patch
packages/linux/linux-rp-2.6.24/pxa-serial-hack.patch
packages/linux/linux-rp-2.6.24/pxa27x-resume.patch
packages/linux/linux-rp-2.6.24/pxa_fb_overlay.patch
packages/linux/linux-rp-2.6.24/pxafb.patch
packages/linux/linux-rp-2.6.24/serial-add-support-for-non-standard-xtals-to-16c950-driver.patch
packages/linux/linux-rp-2.6.24/sharpsl-rc-r1.patch
packages/linux/linux-rp-2.6.24/spitz_h_rewrite.patch
packages/linux/linux-rp-2.6.24/squashfs3.3.patch
packages/linux/linux-rp-2.6.24/versatile-armv6.patch
packages/linux/linux-rp-2.6.24/wm8750-treble.patch
packages/linux/linux-rp-2.6.24/zylonite-boot.patch
packages/linux/linux-rp_2.6.24.bb
BACKPORTS.txt
packages/linux/linux-rp-2.6.23/defconfig-akita
packages/linux/linux-rp-2.6.23/defconfig-bootcdx86
packages/linux/linux-rp-2.6.23/defconfig-c7x0
packages/linux/linux-rp-2.6.23/defconfig-collie
packages/linux/linux-rp-2.6.23/defconfig-htcuniversal
packages/linux/linux-rp-2.6.23/defconfig-hx2000
packages/linux/linux-rp-2.6.23/defconfig-poodle
packages/linux/linux-rp-2.6.23/defconfig-qemuarm
packages/linux/linux-rp-2.6.23/defconfig-qemux86
packages/linux/linux-rp-2.6.23/defconfig-spitz
packages/linux/linux-rp-2.6.23/defconfig-tosa
packages/linux/linux-rp-2.6.23/defconfig-zylonite
packages/linux/linux-rp_2.6.17.bb
packages/linux/linux-rp_2.6.23.bb
Diffs:

#
# mt diff -r7b453ceb9e24a3d3a699fe7a6eab7914e5a0402b -r768b9b6a8b42afe9aaae601e60ab5bea15d975c9
#
# 
# 
# add_dir "packages/linux/linux-rp-2.6.24"
# 
# add_dir "packages/linux/linux-rp-2.6.24/tosa"
# 
# add_file "packages/linux/linux-rp-2.6.23/hrw-add-wcf11-to-hostap.patch"
#  content [1efe4a4eb08036c0edbd2f569a061877139f11df]
# 
# add_file "packages/linux/linux-rp-2.6.23/mtd-module.patch"
#  content [3336d389463dfeab12804b8b425c9451ac9ba8ea]
# 
# add_file "packages/linux/linux-rp-2.6.23/sharpsl-rc-r1.patch"
#  content [6fb750fdfb34ec9fb77ea05cf1226ffc210c8d83]
# 
# add_file "packages/linux/linux-rp-2.6.23/versatile-armv6.patch"
#  content [4741cf31febeef15c0b7646588b288c097a3d14c]
# 
# add_file "packages/linux/linux-rp-2.6.23/wm8750-treble.patch"
#  content [075d3018a7b6514bfd21550eb2cf93372b02ac02]
# 
# add_file "packages/linux/linux-rp-2.6.24/binutils-buildid-arm.patch"
#  content [0a9c96315b18cb403f1014aec2038e9477c2db07]
# 
# add_file "packages/linux/linux-rp-2.6.24/connectplus-prevent-oops-HACK.patch"
#  content [e7f07c5193600ba480642fd62dcae173b6b62189]
# 
# add_file "packages/linux/linux-rp-2.6.24/connectplus-remove-ide-HACK.patch"
#  content [8ffef06194b29e2b22abed7edb6044a5ad4316d7]
# 
# add_file "packages/linux/linux-rp-2.6.24/defconfig-akita"
#  content [d714658790b6d290f5220e92a762c59d1755f521]
# 
# add_file "packages/linux/linux-rp-2.6.24/defconfig-bootcdx86"
#  content [ff935bd0c61befdc4d68c43b5c60ef4cb05c4753]
# 
# add_file "packages/linux/linux-rp-2.6.24/defconfig-c7x0"
#  content [df65683d9a629e20e3adaf2ca96f9b5e7b77710b]
# 
# add_file "packages/linux/linux-rp-2.6.24/defconfig-collie"
#  content [9b2c70575288716c8ab9954a8ffba6ab29a2bea6]
# 
# add_file "packages/linux/linux-rp-2.6.24/defconfig-htcuniversal"
#  content [62f28ebf8d5fbcb035779e139783c732f0effa7c]
# 
# add_file "packages/linux/linux-rp-2.6.24/defconfig-hx2000"
#  content [673369cff9f4de86044b4e3e7d0a32f40f7ddb1f]
# 
# add_file "packages/linux/linux-rp-2.6.24/defconfig-poodle"
#  content [19043385a06385c41f9d8be31ee1b42171e5d4e5]
# 
# add_file "packages/linux/linux-rp-2.6.24/defconfig-qemuarm"
#  content [5cc1a20209d9bfde5ad851a89437c08c721815c5]
# 
# add_file "packages/linux/linux-rp-2.6.24/defconfig-qemux86"
#  content [abcf23ccda1d1691e725575e21a8b0334e72f671]
# 
# add_file "packages/linux/linux-rp-2.6.24/defconfig-spitz"
#  content [1c089b38d34a93c68659ef90bec902bbbcf436ae]
# 
# add_file "packages/linux/linux-rp-2.6.24/defconfig-tosa"
#  content [9309f0f56b45754f03ad35209dcb54e4cfb7df83]
# 
# add_file "packages/linux/linux-rp-2.6.24/defconfig-zylonite"
#  content [01f7a0f6b6bb0cbdd5daa28ff680349a8d8cddbb]
# 
# add_file "packages/linux/linux-rp-2.6.24/hostap-monitor-mode.patch"
#  content [7b6d1b43c24eb7c1135e018aa8ef42f28f5ded00]
# 
# add_file "packages/linux/linux-rp-2.6.24/htcuni-acx.patch"
#  content [12ac6d8ef90c4bbd6b06a294889b80e6e53aa996]
# 
# add_file "packages/linux/linux-rp-2.6.24/htcuni.patch"
#  content [20a6236382ed2305b8a1b8ca29c8a26e2572c663]
# 
# add_file "packages/linux/linux-rp-2.6.24/mtd-module.patch"
#  content [3336d389463dfeab12804b8b425c9451ac9ba8ea]
# 
# add_file "packages/linux/linux-rp-2.6.24/poodle_ts.patch"
#  content [fea8e687817c208722ca4c0feacec75ceef38f44]
# 
# add_file "packages/linux/linux-rp-2.6.24/pxa-serial-hack.patch"
#  content [af916d2b2561b14a1e40383de584a3a60110b5e4]
# 
# add_file "packages/linux/linux-rp-2.6.24/pxa27x-resume.patch"
#  content [9165b53d2b07e5d3fed32ccf6061ab1e12856c29]
# 
# add_file "packages/linux/linux-rp-2.6.24/pxa_fb_overlay.patch"
#  content [585b5ef26c37766ec384c810ab5bd055e44d1e8a]
# 
# add_file "packages/linux/linux-rp-2.6.24/pxafb.patch"
#  content [f885ab91c336e3345ebcc06ff37f90b630dca0d1]
# 
# add_file "packages/linux/linux-rp-2.6.24/serial-add-support-for-non-standard-xtals-to-16c950-driver.patch"
#  content [dd09cc9eb4d3abd338470eb2a61db0e8faf293cb]
# 
# add_file "packages/linux/linux-rp-2.6.24/sharpsl-rc-r1.patch"
#  content [73fadc16c16d9a7a8e42c53e79e6eba467cdf59b]
# 
# add_file "packages/linux/linux-rp-2.6.24/spitz_h_rewrite.patch"
#  content [74aa58d11861398f4b75b2fbd48a4705dc67ab74]
# 
# add_file "packages/linux/linux-rp-2.6.24/squashfs3.3.patch"
#  content [3c2c3d66d9c2e306b9af229c447163389280ca3f]
# 
# add_file "packages/linux/linux-rp-2.6.24/versatile-armv6.patch"
#  content [4741cf31febeef15c0b7646588b288c097a3d14c]
# 
# add_file "packages/linux/linux-rp-2.6.24/wm8750-treble.patch"
#  content [075d3018a7b6514bfd21550eb2cf93372b02ac02]
# 
# add_file "packages/linux/linux-rp-2.6.24/zylonite-boot.patch"
#  content [e47e2f442bc69d9679debc127d56ce0ad366ed6b]
# 
# add_file "packages/linux/linux-rp_2.6.24.bb"
#  content [7cf5d8e85695fe7469e04094ea107bb6dce3ebae]
# 
# patch "BACKPORTS.txt"
#  from [ee879df4debbf05337ae4910e2894a9a8121b9ca]
#    to [c94fe6fb06ee732db2ccbfa163e3b837b6ab21cf]
# 
# patch "packages/linux/linux-rp-2.6.23/defconfig-akita"
#  from [4977ccc396bbd9ae697e9cd5ec6d8c34ff04d530]
#    to [16a4bad602abd5690f33cd43e92712d80da502a1]
# 
# patch "packages/linux/linux-rp-2.6.23/defconfig-bootcdx86"
#  from [5558cdd18f447599d6ba549819dae3d99d919cbb]
#    to [8aad1b0a4a185ddc9292e346428524a65026d738]
# 
# patch "packages/linux/linux-rp-2.6.23/defconfig-c7x0"
#  from [511d465640921b0e994dbc25c4212fabf12ca150]
#    to [f68786d19f1fee76d589788b501bbf1a71799f57]
# 
# patch "packages/linux/linux-rp-2.6.23/defconfig-collie"
#  from [61e97e08b4342ff704be5b57783344f6d2834896]
#    to [e95ab6574994fe324edea401b8406b675ab56357]
# 
# patch "packages/linux/linux-rp-2.6.23/defconfig-htcuniversal"
#  from [c15ceaf3e170f40ee7b76bf8bd498450551060ad]
#    to [1340c6d9391cb6733576e09c22f804d9a619c70e]
# 
# patch "packages/linux/linux-rp-2.6.23/defconfig-hx2000"
#  from [ca400be76cfeca2feb187a33538407a633e15bc5]
#    to [7c95cdcb3e9a0338ccfa0e9fa3b11478db8db5b9]
# 
# patch "packages/linux/linux-rp-2.6.23/defconfig-poodle"
#  from [7abd6d286f0381c0944b56f36a66ca2e73efd26b]
#    to [8c6270099668f834e1afa2c5dfbc6920c8217d1a]
# 
# patch "packages/linux/linux-rp-2.6.23/defconfig-qemuarm"
#  from [677d6694b1fa93712c468b324b1cda3ba60d1787]
#    to [4125a6a73ab2e74f0b332baa32d064f0121314b4]
# 
# patch "packages/linux/linux-rp-2.6.23/defconfig-qemux86"
#  from [13ba6932d390681dfa74465511435d21ed675514]
#    to [6b644ab9bdd2e4d846f7c9a7d47d4e9f292d306b]
# 
# patch "packages/linux/linux-rp-2.6.23/defconfig-spitz"
#  from [60f2f3675a8045720aebad8b900d6c464040e0e3]
#    to [b071f674a2ac8b9b060cc5de413b281a6f19e5c6]
# 
# patch "packages/linux/linux-rp-2.6.23/defconfig-tosa"
#  from [01f4884968a401014d287420a8a8d679c3b8feb2]
#    to [8d1c6cbc73160dcaf3a3bbb8a1b4a3ff0dc5f1c5]
# 
# patch "packages/linux/linux-rp-2.6.23/defconfig-zylonite"
#  from [3a9d67a339675e9dee9874ffed84dc3ba368eb0a]
#    to [f58d5f10cee5e4ad18945fd7d595ccfc26a2b8b5]
# 
# patch "packages/linux/linux-rp_2.6.17.bb"
#  from [9d4400a2071f2d8f5c0d4e1d0ced67bb930bba43]
#    to [767766c9b671ecc588577acf0751cc5fa4fcc21f]
# 
# patch "packages/linux/linux-rp_2.6.23.bb"
#  from [8e5cdfd33bb5d3abc7bec823cdf8175436ed4728]
#    to [6965363fa2cff8dd8ad9456b52eae4a5f5f5e318]
# 
============================================================
--- packages/linux/linux-rp-2.6.23/hrw-add-wcf11-to-hostap.patch	1efe4a4eb08036c0edbd2f569a061877139f11df
+++ packages/linux/linux-rp-2.6.23/hrw-add-wcf11-to-hostap.patch	1efe4a4eb08036c0edbd2f569a061877139f11df
@@ -0,0 +1,31 @@
+From: Marcin Juszkiewicz <openembedded at haerwu.biz>
+
+Linksys WCF11 submitted by Ångström user.
+
+"The Linksys Group, Inc.", "Wireless Network CF Card", "ISL37300P", "RevA",
+0xa5f472c2, 0x9c05598d, 0xc9049a39, 0x57a66194 
+manfid: 0x0274, 0x3301
+
+Signed-off-by: Marcin Juszkiewicz <openembedded at haerwu.biz>
+Acked-by: Pavel Roskin <proski at gnu.org>
+
+---
+ drivers/net/wireless/hostap/hostap_cs.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- linux-2.6.23.orig/drivers/net/wireless/hostap/hostap_cs.c
++++ linux-2.6.23/drivers/net/wireless/hostap/hostap_cs.c
+@@ -887,10 +887,13 @@ static struct pcmcia_device_id hostap_cs
+ 		"Ver. 1.00",
+ 		0x5cd01705, 0x4271660f, 0x9d08ee12),
+ 	PCMCIA_DEVICE_PROD_ID123(
+ 		"corega", "WL PCCL-11", "ISL37300P",
+ 		0xa21501a, 0x59868926, 0xc9049a39),
++	PCMCIA_DEVICE_PROD_ID123(
++		"The Linksys Group, Inc.", "Wireless Network CF Card", "ISL37300P",
++		0xa5f472c2, 0x9c05598d, 0xc9049a39),
+ 	PCMCIA_DEVICE_NULL
+ };
+ MODULE_DEVICE_TABLE(pcmcia, hostap_cs_ids);
+ 
+ 
============================================================
--- packages/linux/linux-rp-2.6.23/mtd-module.patch	3336d389463dfeab12804b8b425c9451ac9ba8ea
+++ packages/linux/linux-rp-2.6.23/mtd-module.patch	3336d389463dfeab12804b8b425c9451ac9ba8ea
@@ -0,0 +1,13 @@
+Index: linux-2.6.23/drivers/mtd/maps/Kconfig
+===================================================================
+--- linux-2.6.23/drivers/mtd/maps/Kconfig
++++ linux-2.6.23/drivers/mtd/maps/Kconfig
+@@ -600,7 +600,7 @@
+ 	default "4"
+ 
+ config MTD_SHARP_SL
+-	bool "ROM mapped on Sharp SL Series"
++	tristate "ROM mapped on Sharp SL Series"
+ 	depends on ARCH_PXA
+ 	help
+ 	  This enables access to the flash chip on the Sharp SL Series of PDAs.
============================================================
--- packages/linux/linux-rp-2.6.23/sharpsl-rc-r1.patch	6fb750fdfb34ec9fb77ea05cf1226ffc210c8d83
+++ packages/linux/linux-rp-2.6.23/sharpsl-rc-r1.patch	6fb750fdfb34ec9fb77ea05cf1226ffc210c8d83
@@ -0,0 +1,519 @@
+Index: linux-2.6.23/arch/arm/mach-pxa/spitz.c
+===================================================================
+--- linux-2.6.23.orig/arch/arm/mach-pxa/spitz.c
++++ linux-2.6.23/arch/arm/mach-pxa/spitz.c
+@@ -245,6 +245,13 @@ static struct platform_device spitzkbd_d
+ 	.id		= -1,
+ };
+ 
++/*
++ * Spitz Remote Control Device
++ */
++static struct platform_device sharpsl_rc_device = {
++	.name		= "sharpsl-remote-control",
++	.id		= -1,
++};
+ 
+ /*
+  * Spitz LEDs
+@@ -477,6 +484,7 @@ static struct platform_device *devices[]
+ 	&spitzscoop_device,
+ 	&spitzssp_device,
+ 	&spitzkbd_device,
++	&sharpsl_rc_device,
+ 	&spitzts_device,
+ 	&spitzbl_device,
+ 	&spitzled_device,
+Index: linux-2.6.23/drivers/input/keyboard/Kconfig
+===================================================================
+--- linux-2.6.23.orig/drivers/input/keyboard/Kconfig
++++ linux-2.6.23/drivers/input/keyboard/Kconfig
+@@ -154,6 +154,17 @@ config KEYBOARD_SPITZ
+ 	  To compile this driver as a module, choose M here: the
+ 	  module will be called spitzkbd.
+ 
++config SHARPSL_RC
++	tristate "Sharp SL-Cxx00 Remote Control"
++	depends on PXA_SHARPSL
++	default y
++	help
++	  Say Y here to enable the remote on the Sharp Zaurus SL-Cxx00,
++	  SL-C1000, SL-C3000 and Sl-C3100 series of PDAs.
++
++	  To compile this driver as a module, choose M here: the
++	  module will be called sharpsl_rc.
++
+ config KEYBOARD_AMIGA
+ 	tristate "Amiga keyboard"
+ 	depends on AMIGA
+Index: linux-2.6.23/drivers/input/keyboard/Makefile
+===================================================================
+--- linux-2.6.23.orig/drivers/input/keyboard/Makefile
++++ linux-2.6.23/drivers/input/keyboard/Makefile
+@@ -15,6 +15,7 @@ obj-$(CONFIG_KEYBOARD_NEWTON)		+= newton
+ obj-$(CONFIG_KEYBOARD_STOWAWAY)		+= stowaway.o
+ obj-$(CONFIG_KEYBOARD_CORGI)		+= corgikbd.o
+ obj-$(CONFIG_KEYBOARD_SPITZ)		+= spitzkbd.o
++obj-$(CONFIG_SHARPSL_RC)			+= sharpsl_rc.o
+ obj-$(CONFIG_KEYBOARD_HIL)		+= hil_kbd.o
+ obj-$(CONFIG_KEYBOARD_HIL_OLD)		+= hilkbd.o
+ obj-$(CONFIG_KEYBOARD_OMAP)		+= omap-keypad.o
+Index: linux-2.6.23/drivers/input/keyboard/sharpsl_rc.c
+===================================================================
+--- /dev/null
++++ linux-2.6.23/drivers/input/keyboard/sharpsl_rc.c
+@@ -0,0 +1,291 @@
++/*
++ *  Keyboard driver for Sharp Clamshell Models (SL-Cxx00)
++ *
++ *  Copyright (c) 2004-2005 Richard Purdie
++ *
++ *  Based on corgikbd.c and Sharp's RC driver
++ *
++ *  This program is free software; you can redistribute it and/or modify
++ *  it under the terms of the GNU General Public License version 2 as
++ *  published by the Free Software Foundation.
++ *
++ */
++
++#define DEBUG 1
++#include <linux/delay.h>
++#include <linux/platform_device.h>
++#include <linux/init.h>
++#include <linux/input.h>
++#include <linux/interrupt.h>
++#include <linux/jiffies.h>
++#include <linux/module.h>
++#include <linux/slab.h>
++
++#ifdef CONFIG_MACH_SPITZ
++#include <asm/arch/spitz.h>
++#endif
++#ifdef CONFIG_MACH_CORGI
++#include <asm/arch/corgi.h>
++#endif
++
++#include <asm/arch/hardware.h>
++#include <asm/arch/pxa-regs.h>
++#include <asm/hardware/scoop.h>
++#include <asm/arch/sharpsl.h>
++#include <asm/hardware/sharpsl_pm.h>
++
++#define DPRINTK(fmt, args...) dev_dbg(data->dev, fmt "\n", ##args)
++
++struct remote_control_key {
++	unsigned char min;
++	unsigned char max;
++	unsigned char key;
++};
++
++#ifdef CONFIG_MACH_SPITZ
++#define REMOTE_AKIN_PULLUP SPITZ_SCP2_AKIN_PULLUP
++#define REMOTE_SCOOP_DEVICE spitzscoop2_device
++#define REMOTE_GPIO_INT SPITZ_GPIO_AK_INT
++#define REMOTE_IRQ_INT SPITZ_IRQ_GPIO_AK_INT
++static struct remote_control_key remote_keys[] = {
++	{ 25, 35, KEY_STOPCD},
++	{ 55, 65, KEY_PLAYPAUSE},
++	{ 85, 95, KEY_NEXTSONG},
++	{ 115, 125, KEY_VOLUMEUP},
++	{ 145, 155, KEY_PREVIOUSSONG},
++	{ 180, 190, KEY_MUTE},
++	{ 215, 225, KEY_VOLUMEDOWN},
++};
++#endif
++#ifdef CONFIG_MACH_CORGI
++#define REMOTE_AKIN_PULLUP CORGI_SCP_AKIN_PULLUP
++#define REMOTE_SCOOP_DEVICE corgiscoop_device
++#define REMOTE_GPIO_INT CORGI_GPIO_AK_INT
++#define REMOTE_IRQ_INT CORGI_IRQ_GPIO_AK_INT
++static struct remote_control_key remote_keys[] = {
++    //These need to be fixed for the CE-RH1's values
++	{ 25, 35, KEY_STOPCD},
++	{ 55, 65, KEY_PLAYPAUSE},
++	{ 85, 95, KEY_NEXTSONG},
++	{ 115, 125, KEY_VOLUMEUP},
++	{ 145, 155, KEY_PREVIOUSSONG},
++	{ 180, 190, KEY_MUTE},
++	{ 215, 225, KEY_VOLUMEDOWN},
++};
++#endif
++
++#define RELEASE_HI      230
++#define MAX_EARPHONE    6
++#define RC_POLL_MS      10
++#define RC_FINISH_MS    500
++#define WAIT_STATE      3
++#define NOISE_THRESHOLD 100
++
++struct sharpsl_rc {
++	struct input_dev *input;
++	struct device *dev;
++
++	spinlock_t lock;
++	struct timer_list rctimer;
++	struct timer_list rctimer_finish;
++
++	unsigned int handling_press;
++	unsigned int noise;
++	unsigned int state;
++	unsigned int last_key;
++};
++
++static int get_remocon_raw(void)
++{
++	int i, val;
++
++	val = sharpsl_pm_pxa_read_max1111(MAX1111_REMCOM);
++	for (i = 0; i < ARRAY_SIZE(remote_keys); ++i) {
++		if (val >= remote_keys[i].min
++			&& val <= remote_keys[i].max) {
++			printk("get_remocon_raw: VAL=%i, KEY=%i\n", val, remote_keys[i].key);
++			return remote_keys[i].key;
++		}
++	}
++	return 0;
++}
++
++static irqreturn_t sharpsl_rc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
++{
++	struct sharpsl_rc *data = dev_id;
++	DPRINTK("sharpsl_rc_interrupt %d\n", irq);
++	if (!data->handling_press) {
++		DPRINTK("handling interrupt");
++		data->handling_press = 1;
++		data->noise = 0;
++		data->state = 0;
++		data->last_key = 0;
++
++		reset_scoop_gpio(&REMOTE_SCOOP_DEVICE.dev, REMOTE_AKIN_PULLUP);
++
++		mod_timer(&data->rctimer, jiffies + msecs_to_jiffies(RC_POLL_MS));
++	}
++	return IRQ_HANDLED;
++}
++
++static void sharpsl_rc_timer_callback(unsigned long dataPtr)
++{
++	struct sharpsl_rc *data = (struct sharpsl_rc *) dataPtr;
++	int timer = 1;
++	int key = get_remocon_raw();
++	DPRINTK("timer callback, key: %d", key);
++
++	//wait for value to stabilize
++	if (data->state < WAIT_STATE) {
++		if (data->last_key != key) {
++			++data->noise;
++			if (data->noise > NOISE_THRESHOLD) {
++				DPRINTK("too much noise, bailing");
++				timer = 0;
++			}
++			data->state = 0;
++		} else {
++			++data->state;
++		}
++		data->last_key = key;
++
++	//stable value, send event
++	} else if (data->state == WAIT_STATE) {
++		data->noise = 0;
++		//non-key returned, skip the rest of the states and bail now
++		if (data->last_key == 0) {
++			DPRINTK("non-key detected %d, noise: %d", data->last_key, data->noise);
++			timer = 0;
++		//send button press
++		} else {
++			DPRINTK("key press detected %d, noise %d", data->last_key, data->noise);
++			input_report_key(data->input, data->last_key, 1);
++		}
++		++data->state;
++
++	//wait until key is released
++	} else if (data->state < WAIT_STATE * 2) {
++		if (key == data->last_key
++			&& data->noise < NOISE_THRESHOLD) {
++			data->state = WAIT_STATE + 1;
++			++data->noise;
++		} else {
++			++data->state;
++		}
++	//key is released, send %s
>>> DIFF TRUNCATED @ 16K






More information about the Openembedded-commits mailing list