[oe-commits] org.oe.dev linux-ezx: add patches for a1200 flip switch and keys
koen commit
openembedded-commits at lists.openembedded.org
Mon Sep 24 12:13:31 UTC 2007
linux-ezx: add patches for a1200 flip switch and keys
Author: koen at openembedded.org
Branch: org.openembedded.dev
Revision: 489882b57f4904cc20dd33cf8852288fb4785ead
ViewMTN: http://monotone.openembedded.org/revision/info/489882b57f4904cc20dd33cf8852288fb4785ead
Files:
1
packages/linux/linux-ezx-2.6.21/patches/a1200-flip.patch
packages/linux/linux-ezx-2.6.21/patches/a1200-kbd.patch
packages/linux/linux-ezx_2.6.21.bb
Diffs:
#
# mt diff -rb262a09802ce1f245f4720fac390544c74eb5d51 -r489882b57f4904cc20dd33cf8852288fb4785ead
#
#
#
# add_file "packages/linux/linux-ezx-2.6.21/patches/a1200-flip.patch"
# content [8ccf6439d54d53fbffa4fc7d13ada938f1c9bbfc]
#
# add_file "packages/linux/linux-ezx-2.6.21/patches/a1200-kbd.patch"
# content [dc00c58df5f70ebeb53fd7a8983874cfd1802187]
#
# patch "packages/linux/linux-ezx_2.6.21.bb"
# from [0bcc7e4483c58e1b1b9d9ad233c7c60004a18dad]
# to [5cd726a272b15df1119bf3c7f55ea7b2cdf6403c]
#
============================================================
--- packages/linux/linux-ezx-2.6.21/patches/a1200-flip.patch 8ccf6439d54d53fbffa4fc7d13ada938f1c9bbfc
+++ packages/linux/linux-ezx-2.6.21/patches/a1200-flip.patch 8ccf6439d54d53fbffa4fc7d13ada938f1c9bbfc
@@ -0,0 +1,47 @@
+Index: linux-2.6.21/arch/arm/mach-pxa/ezx-a1200.c
+===================================================================
+--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-a1200.c 2007-09-23 13:28:02.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/ezx-a1200.c 2007-09-23 13:31:40.000000000 -0300
+@@ -16,6 +16,7 @@
+ #include <linux/mmc/host.h>
+ #include <linux/irq.h>
+ #include <linux/input.h>
++#include <linux/gpio_keys.h>
+
+ #include <asm/mach-types.h>
+ #include <asm/mach/arch.h>
+@@ -343,11 +344,34 @@
+ .num_resources = ARRAY_SIZE(pcap_ts_resources),
+ .resource = pcap_ts_resources,
+ };
++/* Flip */
++#undef GPIO_FLIP_PIN
++#define GPIO_FLIP_PIN 15 /* FIXME */
++static struct gpio_keys_button a1200flip_buttons[] = {
++ [0] = {
++ .keycode = KEY_SLEEP,
++ .gpio = GPIO_FLIP_PIN,
++ .desc = "A1200 flip",
++ },
++};
++
++static struct gpio_keys_platform_data a1200flip_platform_data = {
++ .buttons = a1200flip_buttons,
++ .nbuttons = 1,
++};
++static struct platform_device a1200flip_device = {
++ .name = "gpio-keys",
++ .id = -1,
++ .dev = {
++ .platform_data = &a1200flip_platform_data,
++ },
++};
+
+ static struct platform_device *devices[] __initdata = {
+ &a1200_pcap_device,
+ &a1200_eoc_device,
+ &pcap_ts_device,
++ &a1200flip_device,
+ };
+
+ static void __init a1200_init(void)
============================================================
--- packages/linux/linux-ezx-2.6.21/patches/a1200-kbd.patch dc00c58df5f70ebeb53fd7a8983874cfd1802187
+++ packages/linux/linux-ezx-2.6.21/patches/a1200-kbd.patch dc00c58df5f70ebeb53fd7a8983874cfd1802187
@@ -0,0 +1,99 @@
+Index: linux-2.6.21/arch/arm/mach-pxa/ezx-a1200.c
+===================================================================
+--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-a1200.c 2007-09-23 11:48:10.000000000 -0300
++++ linux-2.6.21/arch/arm/mach-pxa/ezx-a1200.c 2007-09-23 13:24:58.000000000 -0300
+@@ -15,6 +15,7 @@
+ #include <linux/fb.h>
+ #include <linux/mmc/host.h>
+ #include <linux/irq.h>
++#include <linux/input.h>
+
+ #include <asm/mach-types.h>
+ #include <asm/mach/arch.h>
+@@ -23,12 +24,14 @@
+ #include <asm/arch/ezx.h>
+ #include <asm/arch/ezx-pcap.h>
+ #include <asm/arch/mmc.h>
++#include <asm/arch/kbd.h>
+
+ #include "generic.h"
+ #include "ezx-eoc.h"
+
+ extern void ezx_lcd_power(int, struct fb_var_screeninfo *);
+ extern void ezx_backlight_power(int);
++extern void __init pxa_set_kbd_info(struct pxakbd_platform_data *);
+
+ #ifdef CONFIG_EZX_PCAP
+ extern int ezx_pcap_mmcsd_power(int);
+@@ -284,6 +287,63 @@
+ .resource = pcap_ts_resources,
+ };
+
++/* Keypad */
++static unsigned char a1200_keycode[] = {
++ /* row 0 */
++ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
++ /* row 1 */
++ KEY_RIGHT, KEY_DOWN, KEY_KPENTER, KEY_UP, KEY_LEFT,
++ /* row 2 */
++ KEY_PAGEDOWN, KEY_CAMERA, KEY_RECORD, KEY_HOME, KEY_PAGEUP,
++ /* row 3 */
++ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
++ /* row 4 */
++ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
++ /* row 5 */
++ KEY_RESERVED, KEY_RESERVED, KEY_MENU, KEY_RESERVED, KEY_RESERVED,
++};
++/*
++static unsigned char a1200_direct_keycode[] = {
++ KEY_CAMERA,
++};
++*/
++
++static int a1200_kbd_init(void)
++{
++ pxa_gpio_mode(100 | GPIO_ALT_FN_1_IN); /* KP_MKIN<0> */
++ pxa_gpio_mode(101 | GPIO_ALT_FN_1_IN); /* KP_MKIN<1> */
++ pxa_gpio_mode(102 | GPIO_ALT_FN_1_IN); /* KP_MKIN<2> */
++ pxa_gpio_mode(97 | GPIO_ALT_FN_3_IN); /* KP_MKIN<3> */
++ pxa_gpio_mode(98 | GPIO_ALT_FN_3_IN); /* KP_MKIN<4> */
++ pxa_gpio_mode(103 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<0> */
++ pxa_gpio_mode(104 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<1> */
++ pxa_gpio_mode(105 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<2> */
++ pxa_gpio_mode(106 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<3> */
++ pxa_gpio_mode(107 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<4> */
++ pxa_gpio_mode(108 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<5> */
++
++ PKWR = 0xEC000;
++ PGSR3 |= 0x1F80;
++ return 0;
++}
++
++static struct pxakbd_platform_data a1200_kbd_platform_data = {
++ .init = &a1200_kbd_init,
++ .scan_interval = HZ/40,
++ .matrix = {
++ .keycode = a1200_keycode,
++ .cols = 6,
++ .rows = 5,
++ },
++/*
++ .direct = {
++ .keycode = a1200_direct_keycode,
++ .num = 1,
++ },
++*/
++};
++
++
+ static struct platform_device *devices[] __initdata = {
+ &a1200_pcap_device,
+ &a1200_eoc_device,
+@@ -294,6 +354,7 @@
+ {
+ set_pxa_fb_info(&a1200_fb_info);
+ pxa_set_mci_info(&a1200_mci_platform_data);
++ pxa_set_kbd_info(&a1200_kbd_platform_data);
+
+ platform_add_devices(devices, ARRAY_SIZE(devices));
+ }
============================================================
--- packages/linux/linux-ezx_2.6.21.bb 0bcc7e4483c58e1b1b9d9ad233c7c60004a18dad
+++ packages/linux/linux-ezx_2.6.21.bb 5cd726a272b15df1119bf3c7f55ea7b2cdf6403c
@@ -1,8 +1,8 @@ EZX = "ezxdev"
DESCRIPTION = "2.6 Linux Development Kernel for the Motorola GSM phones A780 and E680"
AUTHOR = "The OpenEZX Team <openezx-devel at lists.openezx.org>"
HOMEPAGE = "http://www.openezx.org"
EZX = "ezxdev"
-PR = "${EZX}-r21"
+PR = "${EZX}-r22"
require linux.inc
@@ -47,6 +47,7 @@ SRC_URI = " \
file://patches/pxa-kbd.patch;patch=1 \
file://patches/a780-kbd.patch;patch=1 \
file://patches/e680-kbd.patch;patch=1 \
+ file://patches/a1200-kbd.patch;patch=1 \
file://patches/pcap-ts.patch;patch=1 \
file://patches/a780-ts.patch;patch=1 \
file://patches/e680-ts.patch;patch=1 \
@@ -54,6 +55,7 @@ SRC_URI = " \
file://patches/e6-ts.patch;patch=1 \
file://patches/a780-flip.patch;patch=1 \
file://patches/e680-locksw.patch;patch=1 \
+ file://patches/a1200-flip.patch;patch=1 \
file://patches/a780-leds.patch;patch=1 \
file://patches/e680-leds.patch;patch=1 \
file://patches/a780-vibrator.patch;patch=1 \
More information about the Openembedded-commits
mailing list