? arch/arm/mach-pxa/looxc550/Kconfig
Index: arch/arm/mach-pxa/Kconfig
===================================================================
RCS file: /cvs/linux/kernel26/arch/arm/mach-pxa/Kconfig,v
retrieving revision 1.83
diff -u -r1.83 Kconfig
--- arch/arm/mach-pxa/Kconfig	10 Sep 2007 16:25:55 -0000	1.83
+++ arch/arm/mach-pxa/Kconfig	13 Dec 2007 21:30:15 -0000
@@ -46,6 +46,7 @@
 source "arch/arm/mach-pxa/palmld/Kconfig"
 source "arch/arm/mach-pxa/palmt3/Kconfig"
 source "arch/arm/mach-pxa/plat-recon/Kconfig"
+source "arch/arm/mach-pxa/looxc550/Kconfig"
 
 config MACH_GHI270HG
 	bool "Grayhill Duramax HG"
@@ -55,10 +56,6 @@
 	select PXA27x
 	select MACH_GHI270HG
 
-config MACH_LOOXC550
-	bool "FSC LOOX C550"
-	select PXA27x
-
 config PXA_SHARPSL
 	bool "SHARP Zaurus SL-5600, SL-C7xx and SL-Cxx00 Models"
 	select SHARP_SCOOP
Index: arch/arm/mach-pxa/Makefile
===================================================================
RCS file: /cvs/linux/kernel26/arch/arm/mach-pxa/Makefile,v
retrieving revision 1.82
diff -u -r1.82 Makefile
--- arch/arm/mach-pxa/Makefile	10 Sep 2007 16:36:43 -0000	1.82
+++ arch/arm/mach-pxa/Makefile	13 Dec 2007 21:30:15 -0000
@@ -50,6 +50,7 @@
 obj-$(CONFIG_MACH_XSCALE_PALMLD)	+= palmld/
 obj-$(CONFIG_MACH_RECON)        += plat-recon/
 obj-$(CONFIG_MACH_LOOXC550)	+= looxc550/
+obj-$(CONFIG_MACH_LOOXN560)	+= looxc550/
 
 # Support for blinky lights
 led-y := leds.o
Index: arch/arm/mach-pxa/looxc550/Makefile
===================================================================
RCS file: /cvs/linux/kernel26/arch/arm/mach-pxa/looxc550/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- arch/arm/mach-pxa/looxc550/Makefile	11 Jul 2007 18:29:11 -0000	1.2
+++ arch/arm/mach-pxa/looxc550/Makefile	13 Dec 2007 21:30:15 -0000
@@ -1 +1,5 @@
-obj-y += looxc550.o looxc550_buttons.o
+#
+# /arch/arm/mach-pxa/looxc550/Makefile.c
+#
+
+obj-y += looxc550.o
Index: arch/arm/mach-pxa/looxc550/looxc550.c
===================================================================
RCS file: /cvs/linux/kernel26/arch/arm/mach-pxa/looxc550/looxc550.c,v
retrieving revision 1.8
diff -u -r1.8 looxc550.c
--- arch/arm/mach-pxa/looxc550/looxc550.c	17 Jul 2007 17:32:13 -0000	1.8
+++ arch/arm/mach-pxa/looxc550/looxc550.c	13 Dec 2007 21:30:15 -0000
@@ -1,18 +1,26 @@
 /*
  *  linux/arch/arm/mach-pxa/looxc550/looxc550.c
  *
- *  Hardware definitions for FSC LOOX C550
+ *  Hardware definitions for FSC LOOX C550 and N560
  *  
  *  Copyright (c) 2007 Yurii Zolot'ko
+ *  N560 support Copyright (c) 2007 Marek Vasut <marek.vasut@gmail.com>
  *
  *  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.
  */
 
+#include <linux/input.h>
+#include <linux/input_pda.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/fb.h>
+#include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/irq.h>
+#include <linux/platform_device.h>
+#include <linux/gpio_keys.h>
 
 #include <asm/types.h>
 #include <asm/setup.h>
@@ -29,41 +37,123 @@
 #include <asm/arch/pxafb.h>
 #include <asm/arch/mmc.h>
 #include <asm/arch/udc.h>
+#include <asm/arch/looxc550.h>
+#include <asm/arch/pxa27x_keyboard.h>
 
 #include <linux/ads7846.h>
 #include <linux/touchscreen-adc.h>
 #include <linux/pda_power.h>
 
-#include <asm/arch/looxc550.h>
 
 #include "../generic.h"
 
-/**************************** Framebuffer **************************/
 
-static struct pxafb_mode_info looxc550_pxafb_mode_info = {
-	.pixclock		= 57692,
+/*
+ * Keyboard
+ */
+
+static struct pxa27x_keyboard_platform_data looxc550_buttons = {
+    .nr_rows	= 5,
+    .nr_cols	= 2,
+    .keycodes	= {
+	{
+		_KEY_RECORD,
+		KEY_UP
+	},
+	{
+		_KEY_CALENDAR,
+		KEY_DOWN
+        },
+	{
+		KEY_RIGHT,
+		_KEY_MAIL
+	},
+	{
+		_KEY_CONTACTS,
+		KEY_LEFT
+        },
+	{
+		_KEY_HOMEPAGE,
+		KEY_ENTER
+        },
+    },
+    .gpio_modes	= {
+	GPIO_NR_LOOXC550_KP_MKIN0_MD,
+	GPIO_NR_LOOXC550_KP_MKIN1_MD,
+	GPIO_NR_LOOXC550_KP_MKIN2_MD,
+	GPIO_NR_LOOXC550_KP_MKIN3_MD,
+	GPIO_NR_LOOXC550_KP_MKIN4_MD,
+	GPIO_NR_LOOXC550_KP_MKOUT0_MD,
+	GPIO_NR_LOOXC550_KP_MKOUT1_MD,
+    }
+};
+
+static struct platform_device looxc550_pxa_keyboard = {
+	.name	= "pxa27x-keyboard",
+	.id	= -1,
+	.dev	= {
+		.platform_data	= &looxc550_buttons
+	}
+};
+
+/*
+ * GPIO keys
+ * GPIO 0 - power button
+ */
+
+static struct gpio_keys_button looxc550_gpio_buttons[] = {
+	{ KEY_POWER, GPIO_NR_LOOXC550_KEYPWR, 0, "Power button"}
+};
+
+static struct gpio_keys_platform_data looxc550_gpio_keys_data = {
+	.buttons	= looxc550_gpio_buttons,
+	.nbuttons	= ARRAY_SIZE(looxc550_gpio_buttons)
+};
+
+static struct platform_device looxc550_gpio_keys = {
+	.name	= "gpio-keys",
+	.dev	= {
+		.platform_data	= &looxc550_gpio_keys_data
+	}
+};
+
+/*
+ * Framebuffer
+ */
+
+static struct pxafb_mode_info looxc550_pxafb_modes[] = {
+    {
+	.pixclock		= 0,
 	.xres			= 480,
 	.yres			= 640,
 	.bpp			= 16,
+
 	.hsync_len		= 8,
+	.vsync_len		= 2,
+
 	.left_margin		= 8,
 	.right_margin		= 124,
-	.vsync_len		= 2,
 	.upper_margin		= 3,
 	.lower_margin		= 25,
+
 	.sync			= 0,
+    },
 };
 
 static struct pxafb_mach_info looxc550_pxafb_info = {
-	.modes			= &looxc550_pxafb_mode_info,
-	.num_modes      	= 1,
+	.modes			= looxc550_pxafb_modes,
+	.num_modes      	= ARRAY_SIZE(looxc550_pxafb_modes),
 	.lccr0			= LCCR0_Act | LCCR0_Sngl | LCCR0_Color,
 	.lccr3			= LCCR3_OutEnH | LCCR3_PixRsEdg,
 };
 
-/**************************** MCI **********************************/
+/*
+ * SD/MMC
+ */
 
-static int looxc550_mci_init(struct device *dev, irq_handler_t looxc550_detect_int, void *data)
+static int looxc550_mci_init(struct device *dev,
+			     irq_handler_t looxc550_detect_int,
+			     void *data)
 {
 	int err;
 
@@ -84,7 +174,8 @@
 			, looxc550_detect_int, IRQF_DISABLED
 			, "MMC card detect", data);
 	if (err) {
-		printk(KERN_ERR "looxc550_mci_init: MMC/SD: can't request MMC card detect IRQ\n");
+		printk(KERN_ERR "looxc550_mci_init: MMC/SD: "
+				"can't request MMC card detect IRQ\n");
 		return -1;
 	}
 
@@ -116,13 +207,17 @@
 	.get_ro		= looxc550_mci_get_ro
 };
 
-/****************************     UDC     **************************/
+/*
+ * UDC
+ */
 
 static struct pxa2xx_udc_mach_info looxc550_udc_info __initdata = {
 	.gpio_pullup	= GPIO_NR_LOOXC550_USB_PULLUP
 };
 
-/*************************** Power driver **************************/
+/*
+ * Power management
+ */
 
 static int looxc550_is_ac_online(void)
 {
@@ -144,82 +239,84 @@
 };
 
 static struct pda_power_pdata looxc550_power_data = {
-	.is_ac_online = looxc550_is_ac_online,
-	.is_usb_online = looxc550_is_usb_online,
-	.set_charge = looxc550_set_charge
+	.is_ac_online	= looxc550_is_ac_online,
+	.is_usb_online	= looxc550_is_usb_online,
+	.set_charge	= looxc550_set_charge
 };
 
 static struct resource looxc550_power_resources[] = {
 	[0] = {
-		.name = "ac",
-		.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE |
-		         IORESOURCE_IRQ_LOWEDGE,
+		.name	= "ac",
+		.flags	= IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE |
+			  IORESOURCE_IRQ_LOWEDGE,
 	},
 	[1] = {
-		.name = "usb",
-		.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE |
-		         IORESOURCE_IRQ_LOWEDGE,
+		.name	= "usb",
+		.flags	= IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE |
+			  IORESOURCE_IRQ_LOWEDGE,
 	},
 };
 
 static struct platform_device looxc550_power = {
-	.name = "pda-power",
-	.id = -1,
-	.resource = looxc550_power_resources,
-	.num_resources = ARRAY_SIZE(looxc550_power_resources),
-	.dev = {
-		.platform_data = &looxc550_power_data
+	.name		= "pda-power",
+	.id		= -1,
+	.resource	= looxc550_power_resources,
+	.num_resources	= ARRAY_SIZE(looxc550_power_resources),
+	.dev		= {
+		.platform_data	= &looxc550_power_data
 	},
 };
 
-/**************************** Entry point **************************/
+/*
+ * SSP - Touchscreen
+ */
 struct ads7846_ssp_platform_data looxc550_ssp_params = {
-	.port = 1,
-	.pd_bits = 1,
-	.freq = 720000,
+	.port		= 1,
+	.pd_bits	= 1,
+	.freq		= 720000,
 };
+
 static struct platform_device ads7846_ssp = { 
-	.name = "ads7846-ssp", 
-	.id = -1,
-	.dev = {
-		.platform_data = &looxc550_ssp_params,
+	.name	= "ads7846-ssp", 
+	.id	= -1,
+	.dev	= {
+		.platform_data	= &looxc550_ssp_params,
 	}
 };
 
 struct tsadc_platform_data looxc550_ts_params = {
-	.pen_gpio = GPIO_NR_LOOXC550_TOUCHPANEL_IRQ_N,
-	.x_pin = "ads7846-ssp:x",
-	.y_pin = "ads7846-ssp:y",
-	.z1_pin = "ads7846-ssp:z1",
-	.z2_pin = "ads7846-ssp:z2",
-	.pressure_factor = 100000,
-	.min_pressure = 2,
-	.max_jitter = 8,
+	.pen_gpio	= GPIO_NR_LOOXC550_TOUCHPANEL_IRQ_N,
+	.x_pin		= "ads7846-ssp:x",
+	.y_pin		= "ads7846-ssp:y",
+	.z1_pin		= "ads7846-ssp:z1",
+	.z2_pin		= "ads7846-ssp:z2",
+	.pressure_factor= 100000,
+	.min_pressure	= 2,
+	.max_jitter	= 8,
 };
+
 static struct resource looxc550_pen_irq = {
-	.start = gpio_to_irq(GPIO_NR_LOOXC550_TOUCHPANEL_IRQ_N),
-	.end = gpio_to_irq(GPIO_NR_LOOXC550_TOUCHPANEL_IRQ_N),
-	.flags = IORESOURCE_IRQ,
-};
-static struct platform_device ads7846_ts = {
-	.name = "ts-adc",
-	.id = -1,
-	.resource = &looxc550_pen_irq,
-	.num_resources = 1,
-	.dev = {
-		.platform_data = &looxc550_ts_params,
-	}
+	.start	= gpio_to_irq(GPIO_NR_LOOXC550_TOUCHPANEL_IRQ_N),
+	.end	= gpio_to_irq(GPIO_NR_LOOXC550_TOUCHPANEL_IRQ_N),
+	.flags	= IORESOURCE_IRQ,
 };
 
-static struct platform_device looxc550_keyboard = {
-	.name = "looxc550-buttons"
+static struct platform_device ads7846_ts = {
+	.name		= "ts-adc",
+	.id		= -1,
+	.resource	= &looxc550_pen_irq,
+	.num_resources	= 1,
+	.dev		= {
+		.platform_data	= &looxc550_ts_params,
+	},
 };
 
 static struct platform_device *devices[] __initdata = {
 	&ads7846_ssp,
 	&ads7846_ts,
 	&looxc550_power,
-	&looxc550_keyboard
+	&looxc550_pxa_keyboard,
+	&looxc550_gpio_keys,
 };
 
 static void __init looxc550_init(void)
@@ -239,3 +336,13 @@
 	.timer		= &pxa_timer,
 	.init_machine	= looxc550_init,
 MACHINE_END
+
+MACHINE_START(LOOXN560, "FSC Loox N560")
+	.phys_io	= 0x40000000,
+	.boot_params	= 0xa0000100,
+	.io_pg_offst	= (io_p2v(0x40000000) >> 18) & 0xfffc,
+	.map_io		= pxa_map_io,
+	.init_irq	= pxa_init_irq,
+	.timer		= &pxa_timer,
+	.init_machine	= looxc550_init,
+MACHINE_END
Index: arch/arm/mach-pxa/looxc550/looxc550_buttons.c
===================================================================
RCS file: /cvs/linux/kernel26/arch/arm/mach-pxa/looxc550/looxc550_buttons.c,v
retrieving revision 1.1
diff -u -r1.1 looxc550_buttons.c
--- arch/arm/mach-pxa/looxc550/looxc550_buttons.c	11 Jul 2007 18:29:11 -0000	1.1
+++ arch/arm/mach-pxa/looxc550/looxc550_buttons.c	13 Dec 2007 21:30:15 -0000
@@ -1,7 +1,7 @@
 /*
  *  linux/arch/arm/mach-pxa/looxc550/looxc550_buttons.c
  *
- *  Keyboard definitions for FSC LOOX C550
+ *  Keyboard definitions for FSC LOOX C550 and N560
  *
  *  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
@@ -22,29 +22,36 @@
 #include <asm/arch/looxc550.h>
 
 
-/**************************** Keyboard **************************/
+/*
+ * Keyboard
+ */
 
 static struct pxa27x_keyboard_platform_data looxc550_buttons = {
-    .nr_rows = 5,
-    .nr_cols = 2,
-    .keycodes = {
-	{	_KEY_RECORD,
+    .nr_rows	= 5,
+    .nr_cols	= 2,
+    .keycodes	= {
+	{
+		_KEY_RECORD,
 		KEY_UP
 	},
-	{	_KEY_CALENDAR,
+	{
+		_KEY_CALENDAR,
 		KEY_DOWN
         },
-	{	KEY_RIGHT,
+	{
+		KEY_RIGHT,
 		_KEY_MAIL
 	},
-	{	_KEY_CONTACTS,
+	{
+		_KEY_CONTACTS,
 		KEY_LEFT
         },
-	{	_KEY_HOMEPAGE,
+	{
+		_KEY_HOMEPAGE,
 		KEY_ENTER
         },
     },
-    .gpio_modes = {
+    .gpio_modes	= {
 	GPIO_NR_LOOXC550_KP_MKIN0_MD,
 	GPIO_NR_LOOXC550_KP_MKIN1_MD,
 	GPIO_NR_LOOXC550_KP_MKIN2_MD,
@@ -59,7 +66,7 @@
 	.name	= "pxa27x-keyboard",
 	.id	= -1,
 	.dev	= {
-		.platform_data = &looxc550_buttons
+		.platform_data	= &looxc550_buttons
 	}
 };
 
@@ -72,14 +79,14 @@
 };
 
 static struct gpio_keys_platform_data looxc550_gpio_keys_data = {
-	.buttons = looxc550_gpio_buttons,
-	.nbuttons = ARRAY_SIZE(looxc550_gpio_buttons)
+	.buttons	= looxc550_gpio_buttons,
+	.nbuttons	= ARRAY_SIZE(looxc550_gpio_buttons)
 };
 
 static struct platform_device looxc550_gpio_keys = {
-	.name = "gpio-keys",
-	.dev = {
-		.platform_data = &looxc550_gpio_keys_data
+	.name	= "gpio-keys",
+	.dev	= {
+		.platform_data	= &looxc550_gpio_keys_data
 	}
 };
 
@@ -94,7 +101,7 @@
 
 static struct platform_driver looxc550_buttons_driver = {
 	.driver	= {
-	    .name= "looxc550-buttons",
+	    .name	= "looxc550-buttons",
 	},
 	.probe	= looxc550_buttons_probe
 };

