Index: linux-2.6.14/arch/arm/mach-pxa/spitz.c
===================================================================
--- linux-2.6.14.orig/arch/arm/mach-pxa/spitz.c	2005-11-02 23:57:52.000000000 +0000
+++ linux-2.6.14/arch/arm/mach-pxa/spitz.c	2005-11-02 23:59:10.000000000 +0000
@@ -36,6 +36,7 @@
 #include <asm/arch/irq.h>
 #include <asm/arch/irda.h>
 #include <asm/arch/mmc.h>
+#include <asm/arch/ohci.h>
 #include <asm/arch/udc.h>
 #include <asm/arch/pxafb.h>
 #include <asm/arch/akita.h>
@@ -76,6 +77,7 @@
 	.resource	= spitz_scoop_resources,
 };
 
+
 /*
  * Spitz SCOOP Device #2
  */
@@ -236,6 +238,18 @@
 
 
 /*
+ * Spitz Battery Device
+ */
+static struct platform_device spitzpm_device = {
+	.name		= "sharpsl-pm",
+	.dev		= {
+ 		.platform_data	= &spitz_pm_machinfo,
+	},
+	.id		= -1,
+};
+
+
+/*
  * Spitz Keyboard Device
  */
 static struct platform_device spitzkbd_device = {
@@ -340,6 +354,35 @@
 
 
 /*
+ * USB Host (OHCI)
+ */
+static int spitz_ohci_init(struct device *dev)
+{
+	/* Only Port 2 is connected */
+	pxa_gpio_mode(SPITZ_GPIO_USB_CONNECT | GPIO_IN);
+	pxa_gpio_mode(SPITZ_GPIO_USB_HOST | GPIO_OUT);
+	pxa_gpio_mode(SPITZ_GPIO_USB_DEVICE | GPIO_IN);
+
+	/* Setup USB Port 2 Output Control Register */
+	UP2OCR = UP2OCR_HXS | UP2OCR_HXOE | UP2OCR_DPPDE | UP2OCR_DMPDE;
+
+	GPSR(SPITZ_GPIO_USB_HOST) = GPIO_bit(SPITZ_GPIO_USB_HOST);
+
+	UHCHR = (UHCHR) &
+		~(UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSEP3 | UHCHR_SSE);
+
+	UHCRHDA |= UHCRHDA_NOCP;
+
+	return 0;
+}
+
+static struct pxaohci_platform_data spitz_ohci_platform_data = {
+	.port_mode	= PMM_NPS_MODE,
+	.init		= spitz_ohci_init,
+};
+
+
+/*
  * Irda
  */
 static void spitz_irda_transceiver_mode(struct device *dev, int mode)
@@ -350,6 +393,16 @@
 		reset_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_IR_ON);
 }
 
+#ifdef CONFIG_MACH_AKITA
+static void akita_irda_transceiver_mode(struct device *dev, int mode)
+{
+	if (mode & IR_OFF)
+		akita_set_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_IR_ON);
+	else
+		akita_reset_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_IR_ON);
+}
+#endif
+
 static struct pxaficp_platform_data spitz_ficp_platform_data = {
 	.transceiver_cap  = IR_SIRMODE | IR_OFF,
 	.transceiver_mode = spitz_irda_transceiver_mode,
@@ -383,6 +436,7 @@
 	&spitzkbd_device,
 	&spitzts_device,
 	&spitzbl_device,
+	&spitzpm_device,
 };
 
 static void __init common_init(void)
@@ -406,6 +460,7 @@
 
 	platform_add_devices(devices, ARRAY_SIZE(devices));
 	pxa_set_mci_info(&spitz_mci_platform_data);
+	pxa_set_ohci_info(&spitz_ohci_platform_data);
 	pxa_set_ficp_info(&spitz_ficp_platform_data);
 	set_pxa_fb_parent(&spitzssp_device.dev);
 	set_pxa_fb_info(&spitz_pxafb_info);
@@ -422,6 +477,32 @@
 	platform_device_register(&spitzscoop2_device);
 }
 
+#ifdef CONFIG_MACH_AKITA
+/*
+ * Akita IO Expander
+ */
+struct platform_device akitaioexp_device = {
+	.name		= "akita-ioexp",
+	.id		= -1,
+};
+
+static void __init akita_init(void)
+{
+	spitz_ficp_platform_data.transceiver_mode = akita_irda_transceiver_mode;
+
+	/* We just pretend the second element of the array doesn't exist */
+	spitz_pcmcia_config.num_devs = 1;
+	platform_scoop_config = &spitz_pcmcia_config;
+	spitz_bl_machinfo.set_bl_intensity = akita_bl_set_intensity;
+
+	platform_device_register(&akitaioexp_device);
+
+	spitzscoop_device.dev.parent=&akitaioexp_device.dev;
+	common_init();
+}
+#endif
+
+
 static void __init fixup_spitz(struct machine_desc *desc,
 		struct tag *tags, char **cmdline, struct meminfo *mi)
 {
@@ -457,3 +538,16 @@
 	.timer		= &pxa_timer,
 MACHINE_END
 #endif
+
+#ifdef CONFIG_MACH_AKITA
+MACHINE_START(AKITA, "SHARP Akita")
+	.phys_ram	= 0xa0000000,
+	.phys_io	= 0x40000000,
+	.io_pg_offst	= (io_p2v(0x40000000) >> 18) & 0xfffc,
+	.fixup		= fixup_spitz,
+	.map_io		= pxa_map_io,
+	.init_irq	= pxa_init_irq,
+	.init_machine	= akita_init,
+	.timer		= &pxa_timer,
+MACHINE_END
+#endif
Index: linux-2.6.14/arch/arm/mach-pxa/Makefile
===================================================================
--- linux-2.6.14.orig/arch/arm/mach-pxa/Makefile	2005-11-02 23:57:14.000000000 +0000
+++ linux-2.6.14/arch/arm/mach-pxa/Makefile	2005-11-02 23:57:57.000000000 +0000
@@ -13,6 +13,7 @@
 obj-$(CONFIG_ARCH_PXA_IDP) += idp.o
 obj-$(CONFIG_PXA_SHARP_C7xx)	+= corgi.o corgi_ssp.o corgi_lcd.o ssp.o sharpsl_pm.o corgi_pm.o
 obj-$(CONFIG_PXA_SHARP_Cxx00)	+= spitz.o corgi_ssp.o corgi_lcd.o ssp.o
+obj-$(CONFIG_MACH_AKITA)	+= akita-ioexp.o
 obj-$(CONFIG_MACH_POODLE)	+= poodle.o
 
 # Support for blinky lights
Index: linux-2.6.14/arch/arm/mach-pxa/Kconfig
===================================================================
--- linux-2.6.14.orig/arch/arm/mach-pxa/Kconfig	2005-11-02 23:57:14.000000000 +0000
+++ linux-2.6.14/arch/arm/mach-pxa/Kconfig	2005-11-02 23:57:57.000000000 +0000
@@ -70,6 +70,11 @@
 	depends PXA_SHARPSL_25x
 	select PXA_SHARP_C7xx
 
+config MACH_AKITA
+	bool "Enable Sharp SL-1000 (Akita) Support"
+	depends PXA_SHARPSL_27x
+	select PXA_SHARP_Cxx00
+
 config MACH_SPITZ
 	bool "Enable Sharp Zaurus SL-3000 (Spitz) Support"
 	depends PXA_SHARPSL_27x
Index: linux-2.6.14/arch/arm/mach-pxa/akita-ioexp.c
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.14/arch/arm/mach-pxa/akita-ioexp.c	2005-11-02 23:57:57.000000000 +0000
@@ -0,0 +1,113 @@
+/*
+ * Support for the IO Expander on the Sharp SL-C1000 (Akita)
+ *
+ * Copyright 2005 Openedhand Ltd.
+ *
+ * Author: Richard Purdie <richard@openedhand.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/kernel.h>
+#include <linux/init.h>
+#include <linux/device.h>
+#include <linux/i2c.h>
+#include <linux/workqueue.h>
+#include <asm/arch/akita.h>
+
+int max7310_config(struct device *dev, int iomode, int polarity);
+int max7310_set_ouputs(struct device *dev, int outputs);
+
+static void akita_ioexp_work(void *private_);
+
+static struct device *akita_ioexp_device;
+static unsigned char ioexp_output_value = AKITA_IOEXP_IO_OUT;
+DECLARE_WORK(akita_ioexp, akita_ioexp_work, NULL);
+
+void akita_set_ioexp(struct device *dev, unsigned char bit)
+{
+	ioexp_output_value |= bit;
+
+	if (akita_ioexp_device)
+		schedule_work(&akita_ioexp);
+	return;
+}
+
+void akita_reset_ioexp(struct device *dev, unsigned char bit)
+{
+	ioexp_output_value &= ~bit;
+
+	if (akita_ioexp_device)
+		schedule_work(&akita_ioexp);
+	return;
+}
+
+EXPORT_SYMBOL(akita_set_ioexp);
+EXPORT_SYMBOL(akita_reset_ioexp);
+
+static int is_akita_ioexp_device(struct device *dev, void *data)
+{
+	struct i2c_client *client = to_i2c_client(dev);
+	return (strncmp(client->name, "max7310", 7) == 0);
+}
+
+static void akita_ioexp_work(void *private_)
+{
+	if (!akita_ioexp_device) {
+		akita_ioexp_device = bus_find_device(&i2c_bus_type, NULL, NULL, is_akita_ioexp_device);
+
+		if (!akita_ioexp_device) {
+			/* if we can't find the device, wait and retry */
+			schedule_delayed_work(&akita_ioexp, msecs_to_jiffies(500));
+			return;
+		}
+		
+		max7310_config(akita_ioexp_device, AKITA_IOEXP_IO_DIR, 0);
+	}
+
+	max7310_set_ouputs(akita_ioexp_device, ioexp_output_value);
+}
+
+
+#ifdef CONFIG_PM
+static int akita_ioexp_suspend(struct device *dev, pm_message_t state)
+{
+	flush_scheduled_work();
+	return 0;
+}	
+		
+static int akita_ioexp_resume(struct device *dev)
+{
+	schedule_work(&akita_ioexp);
+	return 0;
+}
+#else
+#define akita_ioexp_suspend NULL
+#define akita_ioexp_resume NULL
+#endif
+
+
+static int __init akita_ioexp_probe(struct device *dev)
+{
+	schedule_work(&akita_ioexp);
+	return 0;
+}
+
+static struct device_driver akita_ioexp_driver = {
+	.name		= "akita-ioexp",
+	.bus		= &platform_bus_type,
+	.probe		= akita_ioexp_probe,
+	.suspend	= akita_ioexp_suspend,
+	.resume		= akita_ioexp_resume,
+};
+
+static int __devinit akita_ioexp_init(void)
+{
+	return driver_register(&akita_ioexp_driver);
+}
+
+module_init(akita_ioexp_init);
+
Index: linux-2.6.14/include/asm-arm/arch-pxa/akita.h
===================================================================
--- linux-2.6.14.orig/include/asm-arm/arch-pxa/akita.h	2005-11-02 23:57:14.000000000 +0000
+++ linux-2.6.14/include/asm-arm/arch-pxa/akita.h	2005-11-02 23:57:57.000000000 +0000
@@ -25,6 +25,8 @@
 /* Default Values */
 #define AKITA_IOEXP_IO_OUT	(AKITA_IOEXP_IR_ON | AKITA_IOEXP_AKIN_PULLUP)
 
+extern struct platform_device akitaioexp_device;
+
 void akita_set_ioexp(struct device *dev, unsigned char bitmask);
 void akita_reset_ioexp(struct device *dev, unsigned char bitmask);
 

