Index: linux-2.6.24/arch/arm/mach-s3c2440/mach-g500.c
===================================================================
--- linux-2.6.24.orig/arch/arm/mach-s3c2440/mach-g500.c	2008-02-15 19:31:51.000000000 +0100
+++ linux-2.6.24/arch/arm/mach-s3c2440/mach-g500.c	2008-02-21 09:10:09.000000000 +0100
@@ -47,6 +47,9 @@
 #include <linux/mmc/mmc.h>
 #include <linux/mmc/host.h>
 
+#include <linux/gpio_keys.h>
+#include <linux/input.h>
+
 static struct map_desc g500_iodesc[] __initdata = {
 	/* nothing */
 };
@@ -183,6 +186,73 @@
 	.ocr_avail  = MMC_VDD_32_33,
 };
 
+static struct gpio_keys_button g500_buttons[] = {
+	{
+		.gpio		= S3C2410_GPF1,
+		.code	= KEY_POWER,
+    .type = EV_KEY,
+		.desc		= "Power",
+		.active_low	= 1,
+	},
+	{
+		.gpio		= S3C2410_GPG2,
+		.code	= KEY_CAMERA,
+    .type = EV_KEY,
+		.desc		= "Camera",
+		.active_low	= 1,
+	},
+	{
+		.gpio		= S3C2410_GPG3,
+		.code	= KEY_LEFT,
+    .type = EV_KEY,
+		.desc		= "Left",
+		.active_low	= 1,
+	},
+	{
+		.gpio		= S3C2410_GPG5,
+		.code	= KEY_RIGHT,
+    .type = EV_KEY,
+		.desc		= "Right",
+		.active_low	= 1,
+	},
+	{
+		.gpio		= S3C2410_GPG6,
+		.code	= KEY_REPLY,
+    .type = EV_KEY,
+		.desc		= "Pick-Up",
+		.active_low	= 1,
+	},
+	{
+		.gpio		= S3C2410_GPF7,
+		.code	= KEY_RESTART,
+    .type = EV_KEY,
+		.desc		= "Reset",
+		.active_low	= 1,
+	},
+	{
+		.gpio		= S3C2410_GPF7,
+		.code	= KEY_RECORD,
+    .type = EV_KEY,
+		.desc		= "Record",
+		.active_low	= 0,
+	},
+};
+
+static struct gpio_keys_platform_data g500_button_data = {
+	.buttons	= g500_buttons,
+	.nbuttons	= ARRAY_SIZE(g500_buttons),
+};
+
+static struct platform_device g500_button_device = {
+	.name		= "gpio-keys",
+	.id		= -1,
+	.num_resources	= 0,
+	.dev		= {
+		.platform_data	= &g500_button_data,
+	}
+};
+
+
 static struct platform_device *g500_devices[] __initdata = {
 	&s3c_device_rtc,
 	&s3c_device_usb,
@@ -211,6 +281,7 @@
 	s3c24xx_fb_set_platdata(&g500_fb_info);
 	set_s3c2410ts_info(&g500_ts_cfg);
 	s3c_device_sdi.dev.platform_data = &g500_mmc_cfg;
+  platform_device_register(&g500_button_device);
 
 	s3c2410_pm_init();
 

