[oe-commits] org.oe.dev linux-rp-2.6.20: update sharpsl-rc patch to allow corgi to compile

justinp commit openembedded-commits at lists.openembedded.org
Sun Apr 15 05:17:06 UTC 2007


linux-rp-2.6.20: update sharpsl-rc patch to allow corgi to compile

Author: justinp at openembedded.org
Branch: org.openembedded.dev
Revision: b7f3a8f0890c95234e200a65ff7aede89bd90504
ViewMTN: http://monotone.openembedded.org/revision.psp?id=b7f3a8f0890c95234e200a65ff7aede89bd90504
Files:
1
packages/linux/linux-rp-2.6.20/sharpsl-rc-r0.patch
packages/linux/linux-rp-2.6.20/sharpsl-rc-r1.patch
packages/linux/linux-rp-2.6.20/defconfig-c7x0
packages/linux/linux-rp_2.6.20.bb
Diffs:

#
# mt diff -r323a61386c38870d2e0b5b050d014c6ff276be1a -rb7f3a8f0890c95234e200a65ff7aede89bd90504
#
# 
# 
# rename "packages/linux/linux-rp-2.6.20/sharpsl-rc-r0.patch"
#     to "packages/linux/linux-rp-2.6.20/sharpsl-rc-r1.patch"
# 
# patch "packages/linux/linux-rp-2.6.20/defconfig-c7x0"
#  from [43aba01333e10bae54a9980b9743805a5101dcaf]
#    to [e532c370994e69552f74b7e6c226fa6be278db92]
# 
# patch "packages/linux/linux-rp-2.6.20/sharpsl-rc-r1.patch"
#  from [296208930866c00a6d7bdf106bb020376c786c74]
#    to [83792e28a200bea10cc3a54d3957d2e6e3939cb0]
# 
# patch "packages/linux/linux-rp_2.6.20.bb"
#  from [b308c7e3f7521b3ff75381a6fa29c282c91b80bd]
#    to [958fb76c51fe31fdf075ab6b66625741cc0e9105]
# 
============================================================
--- packages/linux/linux-rp-2.6.20/defconfig-c7x0	43aba01333e10bae54a9980b9743805a5101dcaf
+++ packages/linux/linux-rp-2.6.20/defconfig-c7x0	e532c370994e69552f74b7e6c226fa6be278db92
@@ -1606,4 +1606,4 @@ CONFIG_ZLIB_DEFLATE=y
 CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZLIB_DEFLATE=y
+CONFIG_SHARPSL_RC=m
-CONFIG_SHARPSL_RC=n
============================================================
--- packages/linux/linux-rp-2.6.20/sharpsl-rc-r0.patch	296208930866c00a6d7bdf106bb020376c786c74
+++ packages/linux/linux-rp-2.6.20/sharpsl-rc-r1.patch	83792e28a200bea10cc3a54d3957d2e6e3939cb0
@@ -62,7 +62,7 @@ Index: linux-2.6.20/drivers/input/keyboa
 ===================================================================
 --- /dev/null
 +++ linux-2.6.20/drivers/input/keyboard/sharpsl_rc.c
-@@ -0,0 +1,263 @@
+@@ -0,0 +1,291 @@
 +/*
 + *  Keyboard driver for Sharp Clamshell Models (SL-Cxx00)
 + *
@@ -86,7 +86,13 @@ Index: linux-2.6.20/drivers/input/keyboa
 +#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>
@@ -101,7 +107,12 @@ Index: linux-2.6.20/drivers/input/keyboa
 +	unsigned char key;
 +};
 +
-+static struct remote_control_key spitz_remote_keys[] = {
++#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},
@@ -110,6 +121,23 @@ Index: linux-2.6.20/drivers/input/keyboa
 +	{ 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
@@ -137,11 +165,11 @@ Index: linux-2.6.20/drivers/input/keyboa
 +	int i, val;
 +
 +	val = sharpsl_pm_pxa_read_max1111(MAX1111_REMCOM);
-+	for (i = 0; i < ARRAY_SIZE(spitz_remote_keys); ++i) {
-+		if (val >= spitz_remote_keys[i].min
-+			&& val <= spitz_remote_keys[i].max) {
-+			printk("get_remocon_raw: VAL=%i, KEY=%i\n", val, spitz_remote_keys[i].key);
-+			return spitz_remote_keys[i].key;
++	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;
@@ -158,7 +186,7 @@ Index: linux-2.6.20/drivers/input/keyboa
 +		data->state = 0;
 +		data->last_key = 0;
 +
-+		reset_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_AKIN_PULLUP);
++		reset_scoop_gpio(&REMOTE_SCOOP_DEVICE.dev, REMOTE_AKIN_PULLUP);
 +
 +		mod_timer(&data->rctimer, jiffies + msecs_to_jiffies(RC_POLL_MS));
 +	}
@@ -219,7 +247,7 @@ Index: linux-2.6.20/drivers/input/keyboa
 +	if (timer) {
 +		mod_timer(&data->rctimer, jiffies + msecs_to_jiffies(RC_POLL_MS));
 +	} else {
-+		set_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_AKIN_PULLUP);
++		set_scoop_gpio(&REMOTE_SCOOP_DEVICE.dev, REMOTE_AKIN_PULLUP);
 +		data->handling_press = 0;
 +	}
 +}
@@ -251,7 +279,7 @@ Index: linux-2.6.20/drivers/input/keyboa
 +	sharpsl_rc->rctimer.function = sharpsl_rc_timer_callback;
 +	sharpsl_rc->rctimer.data = (unsigned long) sharpsl_rc;
 +
-+	input_dev->name = "Spitz Remote Control";
++	input_dev->name = "Sharp Remote Control CE-RHX";
 +	input_dev->phys = "sharpsl_rc/input0";
 +	input_dev->id.bustype = BUS_HOST;
 +	input_dev->id.vendor = 0x0001;
@@ -262,13 +290,13 @@ Index: linux-2.6.20/drivers/input/keyboa
 +
 +	input_dev->evbit[0] = BIT(EV_KEY);
 +
-+	for (i = 0; i <= ARRAY_SIZE(spitz_remote_keys); i++)
-+	  set_bit(spitz_remote_keys[i].key, input_dev->keybit);
++	for (i = 0; i <= ARRAY_SIZE(remote_keys); i++)
++	  set_bit(remote_keys[i].key, input_dev->keybit);
 +
 +	input_register_device(sharpsl_rc->input);
 +
-+	pxa_gpio_mode(SPITZ_GPIO_AK_INT | GPIO_IN);
-+	ret = request_irq(SPITZ_IRQ_GPIO_AK_INT,
++	pxa_gpio_mode(REMOTE_GPIO_INT | GPIO_IN);
++	ret = request_irq(REMOTE_IRQ_INT,
 +					  sharpsl_rc_interrupt,
 +					  IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_SHARED,
 +					  "sharpsl_rc",
@@ -289,7 +317,7 @@ Index: linux-2.6.20/drivers/input/keyboa
 +
 +	dev_dbg(&pdev->dev, "sharpsl_rc_remove\n");
 +
-+	free_irq(SPITZ_IRQ_GPIO_AK_INT, sharpsl_rc);
++	free_irq(REMOTE_IRQ_INT, sharpsl_rc);
 +	del_timer_sync(&sharpsl_rc->rctimer);
 +	input_unregister_device(sharpsl_rc->input);
 +	kfree(sharpsl_rc);
============================================================
--- packages/linux/linux-rp_2.6.20.bb	b308c7e3f7521b3ff75381a6fa29c282c91b80bd
+++ packages/linux/linux-rp_2.6.20.bb	958fb76c51fe31fdf075ab6b66625741cc0e9105
@@ -1,6 +1,6 @@ require linux-rp.inc
 require linux-rp.inc
 
-PR = "r12"
+PR = "r13"
 
 # Handy URLs
 # git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git;protocol=git;tag=ef7d1b244fa6c94fb76d5f787b8629df64ea4046
@@ -54,7 +54,7 @@ SRC_URI = "http://www.kernel.org/pub/lin
            file://connectplus-remove-ide-HACK.patch;patch=1;status=hack \
            file://squashfs3.0-2.6.15.patch;patch=1;status=external \
            file://vesafb-tng-1.0-rc2-2.6.20-rc2.patch;patch=1;status=external \
-           file://sharpsl-rc-r0.patch;patch=1 \
+           file://sharpsl-rc-r1.patch;patch=1 \
            file://defconfig-c7x0 \
            file://defconfig-hx2000 \
            file://defconfig-collie \






More information about the Openembedded-commits mailing list