diff -urN kernel26/arch/arm/common/ipaq/Kconfig kernel26_h/arch/arm/common/ipaq/Kconfig
--- kernel26/arch/arm/common/ipaq/Kconfig	2004-09-11 14:49:30.000000000 -0600
+++ kernel26_h/arch/arm/common/ipaq/Kconfig	2004-09-17 18:59:45.472746704 -0600
@@ -50,10 +50,6 @@
 	tristate "HP iPAQ h3900 LCD"
 	depends on IPAQ_HANDHELD && ARCH_H3900 && IPAQ_ASIC2 && IPAQ_ASIC3 && LCD_DEVICE && FB_PXA
 
-config IPAQ_H4000_LCD
-        tristate "HP iPAQ h4000 LCD"
-        depends on IPAQ_HANDHELD && MACH_H4000 && IPAQ_ASIC3 && LCD_DEVICE && FB_PXA
-
 config IPAQ_SAMCOP
 	tristate "HP iPAQ SAMCOP drivers"
 	depends on IPAQ_HANDHELD
diff -urN kernel26/arch/arm/common/ipaq/Makefile kernel26_h/arch/arm/common/ipaq/Makefile
--- kernel26/arch/arm/common/ipaq/Makefile	2004-09-17 18:28:10.000000000 -0600
+++ kernel26_h/arch/arm/common/ipaq/Makefile	2004-09-17 18:59:57.693888808 -0600
@@ -31,6 +31,5 @@
 
 obj-$(CONFIG_IPAQ_H1900_LCD) += h1900_lcd.o
 obj-$(CONFIG_IPAQ_H3900_LCD) += h3900_lcd.o
-obj-$(CONFIG_IPAQ_H4000_LCD) += h4000_lcd.o
 obj-$(CONFIG_IPAQ_H5400_LCD) += h5400_lcd.o
 obj-$(CONFIG_IPAQ_H5400_WIFI) += h5400_wifi.o
diff -urN kernel26/arch/arm/common/ipaq/h4000_lcd.c kernel26_h/arch/arm/common/ipaq/h4000_lcd.c
--- kernel26/arch/arm/common/ipaq/h4000_lcd.c	2004-06-30 21:31:22.000000000 -0600
+++ kernel26_h/arch/arm/common/ipaq/h4000_lcd.c	1969-12-31 17:00:00.000000000 -0700
@@ -1,178 +0,0 @@
-/*
- * Hardware definitions for HP iPAQ Handheld Computers
- *
- * Copyright 2000-2003 Hewlett-Packard Company.
- *
- * Use consistent with the GNU GPL is permitted,
- * provided that this copyright notice is
- * preserved in its entirety in all copies and derived works.
- *
- * COMPAQ COMPUTER CORPORATION MAKES NO WARRANTIES, EXPRESSED OR IMPLIED,
- * AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS
- * FITNESS FOR ANY PARTICULAR PURPOSE.
- *
- * Author: Jamey Hicks.
- *
- * History:
- *
- * 2004-03-01	Eddi De Pieri      Adapted for h4000 using h3900_lcd.c and 
- *                                 Shawn's functions
- * 2004-??-??	Shawn Anderson     Lcd hacking on h4000
- * 2003-05-14	Joshua Wise        Adapted for the HP iPAQ H1900
- * 2002-08-23   Jamey Hicks        Adapted for use with PXA250-based iPAQs
- * 2001-10-??   Andrew Christian   Added support for iPAQ H3800
- *                                 and abstracted EGPIO interface.
- *
- */
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/kernel.h>
-#include <linux/tty.h>
-#include <linux/sched.h>
-#include <linux/delay.h>
-#include <linux/pm.h>
-#include <linux/lcd.h>
-#include <linux/backlight.h>
-#include <linux/fb.h>
-#include <asm/arch/pxafb.h>
-
-#include <asm/mach-types.h>
-#include <asm/hardware.h>
-#include <asm/setup.h>
-
-#include <asm/mach/arch.h>
-#include <asm/arch/h3900_asic.h>
-#include <asm/arch/h4000-gpio.h>
-#include <asm/arch/ipaq.h>
-
-#include "asic3_base.h"
-
-extern struct platform_device h4000_asic3;
-
-/*
-  On screen enable, we get 
-  
-     h3800_lcd_power_on(1)
-     LCD controller starts
-     h3800_lcd_enable(1)
-
-  On screen disable, we get
-  
-     h3800_lcd_enable(0)
-     LCD controller stops
-     h3800_lcd_power_on(0)
-*/
-
-static int h4000_lcd_set_power( struct lcd_device *lm, int level )
-{
-        printk("%s: \n", __FUNCTION__);
-	return 0;
-}
-
-static int h4000_lcd_get_power( struct lcd_device *lm )
-{
-        printk("%s: \n", __FUNCTION__);
-	return 0;
-}
-
-static int h4000_backlight_set_power (struct backlight_device *bl, int level)
-{
-        printk("%s: backlight o%s\n", __FUNCTION__, level ? "ff" : "n");
-	if (level < 1) {
-            // also CKEN[0] = 1 turns on PWM clock, mabey do that here too.
-	    GAFR0_U |= 0x2;
-    	    printk("%s: GAFR0_U |= 0x2, GAFR0_U=0x%x\n", __FUNCTION__, GAFR0_U);
-            printk("%s: CKEN=0x%x\n", __FUNCTION__, CKEN);
-	}
-        else
-	    GAFR0_U &= ~(0x2);
-
-        return 0;
-}
-
-static int h4000_backlight_get_power (struct backlight_device *bl)
-{
-	printk("%s: \n", __FUNCTION__);
-	if (GAFR0_U & 0x2)
-    	    return 0;
-	else
-    	    return 4;
-}
-
-/*
- * LCCR0: 0x003008f9 -- ENB=0x1,  CMS=0x0, SDS=0x0, LDM=0x1,
- *                      SFM=0x1,  IUM=0x1, EFM=0x1, PAS=0x1,
- *                      res=0x0,  DPD=0x0, DIS=0x0, QDM=0x1,
- *                      PDD=0x0,  BM=0x1,  OUM=0x1, res=0x0
- * LCCR1: 0x13070cef -- BLW=0x13, ELW=0x7, HSW=0x3, PPL=0xef
- * LCCR2: 0x0708013f -- BFW=0x7,  EFW=0x8, VSW=0x0, LPP=0x13f
- * LCCR3: 0x04700008 -- res=0x0,  DPC=0x0, BPP=0x4, OEP=0x0, PCP=0x1
- *                      HSP=0x1,  VSP=0x1, API=0x0, ACD=0x0, PCD=0x8
- */
-
-static struct pxafb_mach_info h4000_fb_info = {
-        .pixclock     = 0,
-        .bpp          = 16,         // BPP (0x4 == 16bits)
-        .xres         = 240,        // PPL + 1
-        .yres         = 320,        // LPP + 1
-        .hsync_len    = 4,          // HSW + 1
-        .vsync_len    = 1,          // VSW + 1
-        .left_margin  = 20,         // BLW + 1
-	.upper_margin = 8,          // BFW + 1
-        .right_margin = 8,          // ELW + 1
-        .lower_margin = 9,          // EFW + 1
-	.sync         = 0,
-        .lccr0 = (LCCR0_LDM | LCCR0_SFM | LCCR0_IUM | LCCR0_EFM |
-                  LCCR0_PAS | LCCR0_QDM | LCCR0_BM | LCCR0_OUM),
-#if 0
-        .lccr3 = (LCCR3_HorSnchL | LCCR3_VrtSnchL | LCCR3_16BPP |
-		  LCCR3_PCP | /*PCD */ 0x8)
-#endif
-};
-
-static struct lcd_properties h4000_lcd_properties = {
-        .owner         = THIS_MODULE,
-	.set_power     = h4000_lcd_set_power,
-	.get_power     = h4000_lcd_get_power,
-};
-
-static struct backlight_properties h4000_backlight_properties = {
-	.owner         = THIS_MODULE,
-	.set_power     = h4000_backlight_set_power,
-	.get_power     = h4000_backlight_get_power,
-};
-
-static struct lcd_device *pxafb_lcd_device;
-static struct backlight_device *pxafb_backlight_device;
-
-static int
-h4000_lcd_init (void)
-{
-	int rc = 0;
-	
-	if (! machine_is_h4000 ())
-		return -ENODEV;
-
-        rc = lcd_device_register("pxafb", (void*)&h4000_fb_info, &h4000_lcd_properties,
-				 &pxafb_lcd_device);
-	if (rc)
-	        return rc;
-	rc = backlight_device_register("pxafb", NULL, &h4000_backlight_properties,
-				       &pxafb_backlight_device);
-	
-	return rc;
-}
-
-static void
-h4000_lcd_exit (void)
-{
-        lcd_device_unregister(pxafb_lcd_device);
-	backlight_device_unregister(pxafb_backlight_device);
-}
-
-module_init (h4000_lcd_init);
-module_exit (h4000_lcd_exit);
-
-MODULE_AUTHOR(" ");
-MODULE_DESCRIPTION("Framebuffer driver for iPAQ H4000");
-MODULE_LICENSE("GPL");
diff -urN kernel26/arch/arm/mach-pxa/h4000/Kconfig kernel26_h/arch/arm/mach-pxa/h4000/Kconfig
--- kernel26/arch/arm/mach-pxa/h4000/Kconfig	2004-08-19 15:58:53.000000000 -0600
+++ kernel26_h/arch/arm/mach-pxa/h4000/Kconfig	2004-09-17 18:19:25.000000000 -0600
@@ -3,3 +3,7 @@
         depends on ARCH_PXA
         select PXA25x
 
+config H4000_LCD
+        tristate "LCD support"
+        depends on MACH_H4000
+
diff -urN kernel26/arch/arm/mach-pxa/h4000/Makefile kernel26_h/arch/arm/mach-pxa/h4000/Makefile
--- kernel26/arch/arm/mach-pxa/h4000/Makefile	2004-08-19 16:10:39.000000000 -0600
+++ kernel26_h/arch/arm/mach-pxa/h4000/Makefile	2004-09-17 17:58:15.000000000 -0600
@@ -3,4 +3,5 @@
 #
 
 obj-$(CONFIG_MACH_H4000)        += h4000.o
+obj-$(CONFIG_H4000_LCD)         += h4000_lcd.o
 
diff -urN kernel26/arch/arm/mach-pxa/h4000/h4000.c kernel26_h/arch/arm/mach-pxa/h4000/h4000.c
--- kernel26/arch/arm/mach-pxa/h4000/h4000.c	2004-08-19 15:58:53.000000000 -0600
+++ kernel26_h/arch/arm/mach-pxa/h4000/h4000.c	2004-09-17 18:04:33.000000000 -0600
@@ -24,11 +24,6 @@
 #include <linux/sched.h>
 #include <linux/device.h>
 
-#include <linux/lcd.h>
-#include <linux/backlight.h>
-#include <linux/fb.h>
-#include <../drivers/video/pxafb.h>
-
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 #include <asm/hardware.h>
@@ -170,44 +165,10 @@
         .dev = { .platform_data = &h4000_asic3_platform_data, },
 };
 
-static struct resource pxafb_resources[] = {
-        [0] = {
-                .start  = 0x44000000,
-                .end    = 0x4400ffff,
-                .flags  = IORESOURCE_MEM,
-        },
-        [1] = {
-                .start  = IRQ_LCD,
-                .end    = IRQ_LCD,
-                .flags  = IORESOURCE_IRQ,
-        },
-};
-
-static u64 fb_dma_mask = ~(u64)0;
-
-static struct platform_device pxafb_device = {
-        .name           = "pxafb",
-        .id             = 0,
-        .dev            = {
-                .dma_mask       = &fb_dma_mask,
-                .coherent_dma_mask = 0xffffffff,
-        },
-        .num_resources  = ARRAY_SIZE(pxafb_resources),
-        .resource       = pxafb_resources,
-};
-
 static struct platform_device *devices[] __initdata = {
         &h4000_asic3_device,
-	&pxafb_device
 };
 
-static struct ipaq_model_ops h4000_model_ops __initdata = {
-        .generic_name = "h4000",
-/*        .control = h4000_control_egpio, */
-/*        .read = h4000_read_egpio, */
-/*        .irq_number = h4000_egpio_irq_number, */
-/*        .set_led = ipaq_asic3_set_led,*/
-};
 
 /*
 CS3#    0x0C000000, 1 ;HTC Asic3 chip select
@@ -251,7 +212,6 @@
         //IPAQ_ASIC3_INTR_IntCPS(H4000_ASIC3_VIRT) = 0x001e;
         //IPAQ_ASIC3_INTR_IntTBS(H4000_ASIC3_VIRT) = 0x000a;
 
-        ipaq_model_ops = h4000_model_ops;
 }
 
                         
@@ -270,3 +230,6 @@
 	INITTIME(pxa_init_time)
         INIT_MACHINE(h4000_init)
 MACHINE_END
+
+/* vim: set ts=8 tw=80 shiftwidth=8 noet: */
+
diff -urN kernel26/arch/arm/mach-pxa/h4000/h4000_lcd.c kernel26_h/arch/arm/mach-pxa/h4000/h4000_lcd.c
--- kernel26/arch/arm/mach-pxa/h4000/h4000_lcd.c	1969-12-31 17:00:00.000000000 -0700
+++ kernel26_h/arch/arm/mach-pxa/h4000/h4000_lcd.c	2004-09-17 18:41:33.000000000 -0600
@@ -0,0 +1,228 @@
+/*
+ * Use consistent with the GNU GPL is permitted,
+ * provided that this copyright notice is
+ * preserved in its entirety in all copies and derived works.
+ *
+ * History:
+ *
+ * 2004-03-01   Eddi De Pieri      Adapted for h4000 using h3900_lcd.c 
+ * 2004         Shawn Anderson     Lcd hacking on h4000
+ * see h3900_lcd.c for more history.
+ *
+ */
+
+#include <linux/types.h>
+#include <asm/arch/hardware.h>  /* for pxa-regs.h (__REG) */
+#include <asm/arch/pxa-regs.h>  /* LCCR[0,1,2,3]* */
+#include <asm/arch/bitfield.h>  /* for pxa-regs.h (Fld, etc) */
+#include <asm/arch/pxafb.h>     /* pxafb_mach_info, set_pxa_fb_info */
+#include <asm/mach-types.h>     /* machine_is_h4000 */
+#include <linux/lcd.h>          /* lcd_device */
+#include <linux/backlight.h>    /* backlight_device */
+
+#include <asm/arch/h4000-gpio.h>
+#include <asm/arch/h4000-asic.h>
+#include <asm/hardware/ipaq-asic3.h>
+
+static int h4000_lcd_get_power(struct lcd_device *lm)
+{
+	/* Get the LCD panel power status (0: full on, 1..3: controller
+	 * power on, flat panel power off, 4: full off) */
+	
+	if (IPAQ_ASIC3_GPIO_C_OUT(H4000_ASIC3_VIRT) & GPIOC_LCD_5V_EN)
+		return 0;
+	else
+		return 4;
+}
+
+static int h4000_lcd_set_power(struct lcd_device *lm, int power)
+{
+	 /* Enable or disable power to the LCD (0: on; 4: off) */
+	
+	if (power == 0) {
+		//IPAQ_ASIC3_GPIO_B_OUT(H4000_ASIC3_VIRT) |= GPIOB_LCD_ON;
+		//IPAQ_ASIC3_GPIO_B_OUT(H4000_ASIC3_VIRT) |= GPIOB_LCD_PCI;
+		//IPAQ_ASIC3_GPIO_C_OUT(H4000_ASIC3_VIRT) |= GPIOC_LCD_N3V_EN;
+		IPAQ_ASIC3_GPIO_C_OUT(H4000_ASIC3_VIRT) |= GPIOC_LCD_5V_EN;
+		//IPAQ_ASIC3_GPIO_C_OUT(H4000_ASIC3_VIRT) |= GPIOC_LCD_3V3_ON;
+	} else {
+		//IPAQ_ASIC3_GPIO_B_OUT(H4000_ASIC3_VIRT) &= ~GPIOB_LCD_ON;
+		//IPAQ_ASIC3_GPIO_B_OUT(H4000_ASIC3_VIRT) &= ~GPIOB_LCD_PCI;
+		//IPAQ_ASIC3_GPIO_C_OUT(H4000_ASIC3_VIRT) &= ~GPIOC_LCD_N3V_EN;
+		IPAQ_ASIC3_GPIO_C_OUT(H4000_ASIC3_VIRT) &= ~GPIOC_LCD_5V_EN;
+		//IPAQ_ASIC3_GPIO_C_OUT(H4000_ASIC3_VIRT) &= ~GPIOC_LCD_3V3_ON;
+	}
+	
+	return 0;
+}
+
+static int h4000_lcd_get_contrast(struct lcd_device *ld)
+{
+	/* Get the current contrast setting (0-max_contrast) */
+//DBG*/	printk("%s: not implemented yet\n", __FUNCTION__);
+	return 0;
+}
+
+static int h4000_lcd_set_contrast(struct lcd_device *ld, int contrast)
+{
+	/* Set LCD panel contrast */
+//DBG*/	printk("%s: not implemented yet\n", __FUNCTION__);
+	return 0;
+}
+
+static int h4000_bl_get_power(struct backlight_device *bl)
+{
+	/* Get the power status (0: on, 1..3: power saving modes; 4: off) */
+	// GPIO_NR_H4000_LCD_PWM, CKEN0_PWM0, GPIOB_BACKLIGHT_POWER_ON
+	if (GAFR0_U & 0x2)
+		return 0;
+	else
+		return 4;
+}
+
+static int h4000_bl_set_power(struct backlight_device *bl, int power)
+{
+	/* Enable or disable power to the LCD (0: on; 4: off) */
+
+	if (power < 1) {
+		IPAQ_ASIC3_GPIO_B_OUT(H4000_ASIC3_VIRT) |= 
+			GPIOB_BACKLIGHT_POWER_ON;
+		pxa_gpio_mode(GPIO16_PWM0_MD);
+		pxa_set_cken(CKEN0_PWM0, 1);
+	} else {
+		IPAQ_ASIC3_GPIO_B_OUT(H4000_ASIC3_VIRT) & 
+			~GPIOB_BACKLIGHT_POWER_ON;
+		pxa_set_cken(CKEN0_PWM0, 0);
+	}
+	return 0;
+}
+
+static int h4000_bl_get_brightness(struct backlight_device *bd)
+{
+	/* Get current backlight brightness */
+	u32 x, y;
+
+	x = PWM_PWDUTY0 & 0x3ff;
+	y = PWM_PERVAL0 & 0x3ff;
+	// To avoid division, we'll approximate y to nearest 2^n-1.
+	// PocketPC is using 0xfe as PERVAL0 and we're using 0x3ff.
+	x <<= (10 - fls (y));
+	return x;
+}
+
+static int h4000_bl_set_brightness(struct backlight_device *bd, int brightness)
+{
+	/* Set backlight brightness (0..max_brightness) */
+	if (brightness > 0x3ff)
+		brightness = 0x3ff;
+
+	/* LCD brightness is driven by PWM0.
+	 * We'll set the pre-scaler to 8, and the period to 1024, this
+	 * means the backlight refresh rate will be 3686400/(8*1024) =
+	 * 450 Hz which is quite enough.
+	 */
+	PWM_CTRL0 = 7;            /* pre-scaler */
+	PWM_PWDUTY0 = brightness; /* duty cycle */
+	PWM_PERVAL0 = 0x3ff;      /* period */
+	if (brightness)
+		pxa_set_cken(CKEN0_PWM0, 1);
+	else
+		pxa_set_cken(CKEN0_PWM0, 0);
+	return 0;
+}
+
+/*
+ * LCCR0: 0x003008f9 -- ENB=0x1,  CMS=0x0, SDS=0x0, LDM=0x1,
+ *                      SFM=0x1,  IUM=0x1, EFM=0x1, PAS=0x1,
+ *                      res=0x0,  DPD=0x0, DIS=0x0, QDM=0x1,
+ *                      PDD=0x0,  BM=0x1,  OUM=0x1, res=0x0
+ * LCCR1: 0x13070cef -- BLW=0x13, ELW=0x7, HSW=0x3, PPL=0xef
+ * LCCR2: 0x0708013f -- BFW=0x7,  EFW=0x8, VSW=0x0, LPP=0x13f
+ * LCCR3: 0x04700008 -- res=0x0,  DPC=0x0, BPP=0x4, OEP=0x0, PCP=0x1
+ *                      HSP=0x1,  VSP=0x1, API=0x0, ACD=0x0, PCD=0x8
+ */
+
+static struct pxafb_mach_info      sony_acx502bmu __initdata= {
+        .pixclock     = 171521,     // (160756 > 180849)
+        .bpp          = 16,         // BPP (0x4 == 16bits)
+        .xres         = 240,        // PPL + 1
+        .yres         = 320,        // LPP + 1
+        .hsync_len    = 4,          // HSW + 1
+        .vsync_len    = 1,          // VSW + 1
+        .left_margin  = 20,         // BLW + 1
+        .upper_margin = 8,          // BFW + 1
+        .right_margin = 8,          // ELW + 1
+        .lower_margin = 9,          // EFW + 1
+        .sync         = 0,
+        .lccr0        = LCCR0_Act | LCCR0_Sngl | LCCR0_Color,
+        .lccr3        = LCCR3_OutEnH | LCCR3_PixFlEdg | LCCR3_Acb(0),
+
+        //.pxafb_backlight_power = ,
+        //.pxafb_lcd_power =       ,
+};
+
+struct lcd_properties h4000_lcd_properties =
+{
+	.owner          = THIS_MODULE,
+	.get_power      = h4000_lcd_get_power,
+	.set_power      = h4000_lcd_set_power,
+	.max_contrast   = 7,
+	.get_contrast   = h4000_lcd_get_contrast,
+	.set_contrast   = h4000_lcd_set_contrast,
+};
+
+static struct backlight_properties h4000_bl_properties =
+{
+	.owner          = THIS_MODULE,
+	.get_power      = h4000_bl_get_power,
+	.set_power      = h4000_bl_set_power,
+	.max_brightness = 0x3ff,
+	.get_brightness = h4000_bl_get_brightness,
+	.set_brightness = h4000_bl_set_brightness,
+};
+
+static struct lcd_device *pxafb_lcd_device;
+static struct backlight_device *pxafb_backlight_device;
+
+static int h4000_lcd_init(void)
+{
+	int rc = 0;
+
+	if (!machine_is_h4000())
+		return -ENODEV;
+
+	//should we have to run both set_pxa_fb_info and lcd_device_register?
+	set_pxa_fb_info(&sony_acx502bmu);	
+
+	rc = lcd_device_register("pxafb", (void*)&sony_acx502bmu,
+			&h4000_lcd_properties, &pxafb_lcd_device);
+	if (rc) {
+		printk("%s: lcd_device_register failed (%d)\n",__FUNCTION__,rc);
+		return rc;
+	}
+
+	rc = backlight_device_register("pxafb", NULL,
+			&h4000_bl_properties, &pxafb_backlight_device);
+	if (rc) {
+		printk("%s: backlight_device_register failed (%d)\n",
+				__FUNCTION__,rc);
+		return rc;
+	}
+	return rc;
+}
+
+static void h4000_lcd_exit(void)
+{
+	lcd_device_unregister(pxafb_lcd_device);
+	backlight_device_unregister(pxafb_backlight_device);
+}
+
+module_init(h4000_lcd_init);
+module_exit(h4000_lcd_exit);
+
+MODULE_AUTHOR("h4000 port team h4100-port@handhelds.org");
+MODULE_DESCRIPTION("Framebuffer driver for iPAQ H4000");
+MODULE_LICENSE("GPL");
+
+/* vim: set ts=8 tw=80 shiftwidth=8 noet: */
+
diff -urN kernel26/drivers/video/pxafb.c kernel26_h/drivers/video/pxafb.c
--- kernel26/drivers/video/pxafb.c	2004-09-11 17:24:10.000000000 -0600
+++ kernel26_h/drivers/video/pxafb.c	2004-09-17 18:42:23.000000000 -0600
@@ -1309,9 +1309,9 @@
 
 int __init pxafb_probe(struct device *dev)
 {
-	struct pxafb_info *fbi;
-	struct pxafb_mach_info *inf;
-	int ret;
+	struct pxafb_info *fbi = NULL;
+	struct pxafb_mach_info *inf = NULL;
+	int ret = 0;
 #ifdef CONFIG_LCD_DEVICE
 	struct lcd_device* ld = NULL;
 #endif
