Index: linux-2.6.17/drivers/video/backlight/Kconfig
===================================================================
--- linux-2.6.17.orig/drivers/video/backlight/Kconfig	2006-06-18 18:51:13.000000000 +0100
+++ linux-2.6.17/drivers/video/backlight/Kconfig	2006-06-18 18:51:17.000000000 +0100
@@ -66,3 +66,10 @@
 	  If you have a HP Jornada 680, say y to enable the
 	  backlight driver.
 
+config BACKLIGHT_HX2750
+	tristate "iPAQ HX2750 Backlight Driver"
+	depends on BACKLIGHT_DEVICE && MACH_HX2750
+	default y
+	help
+	  If you have an iPAQ hx2750, say y to enable the backlight driver.
+
Index: linux-2.6.17/drivers/video/backlight/Makefile
===================================================================
--- linux-2.6.17.orig/drivers/video/backlight/Makefile	2006-06-18 18:51:13.000000000 +0100
+++ linux-2.6.17/drivers/video/backlight/Makefile	2006-06-18 18:51:17.000000000 +0100
@@ -4,4 +4,5 @@
 obj-$(CONFIG_BACKLIGHT_CLASS_DEVICE) += backlight.o
 obj-$(CONFIG_BACKLIGHT_CORGI)	+= corgi_bl.o
 obj-$(CONFIG_BACKLIGHT_HP680)	+= hp680_bl.o
+obj-$(CONFIG_BACKLIGHT_HX2750)	+= hx2750_bl.o
 obj-$(CONFIG_BACKLIGHT_LOCOMO)	+= locomolcd.o
Index: linux-2.6.17/drivers/video/backlight/hx2750_bl.c
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.17/drivers/video/backlight/hx2750_bl.c	2006-06-18 19:02:03.000000000 +0100
@@ -0,0 +1,143 @@
+/*
+ * Backlight Driver for HP iPAQ hx2750
+ *
+ * Copyright 2005 Openedhand Ltd.
+ *
+ * Author: Richard Purdie <richard@o-hand.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/module.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/spinlock.h>
+#include <linux/fb.h>
+#include <linux/backlight.h>
+
+#include <asm/arch/pxa-regs.h>
+#include <asm/arch/hx2750.h>
+
+#define HX2750_MAX_INTENSITY      0x190
+#define HX2750_DEFAULT_INTENSITY  0x082
+
+static DEFINE_MUTEX(bl_mutex);
+static struct backlight_device *hx2750_backlight_device;
+
+static int hx2750bl_intensity;
+static unsigned long hx2750bl_flags;
+#define HX2750BL_SUSPENDED     0x01
+
+static int hx2750_set_intensity(struct backlight_device *bd)
+{
+	int intensity = bd->props->brightness;
+
+	if (bd->props->power != FB_BLANK_UNBLANK)
+		intensity = 0;
+	if (bd->props->fb_blank != FB_BLANK_UNBLANK)
+		intensity = 0;
+	if (hx2750bl_flags & HX2750BL_SUSPENDED)
+		intensity = 0;
+
+	mutex_lock(&bl_mutex);
+
+	PWM_CTRL0 = 2; /* pre-scaler */
+	PWM_PWDUTY0 = hx2750bl_intensity = intensity; /* duty cycle */
+	PWM_PERVAL0 = 0x1f4; /* period */
+
+	if (intensity) {
+		pxa_set_cken(CKEN0_PWM0,1);
+		hx2750_set_egpio(HX2750_EGPIO_LCD_PWR | HX2750_EGPIO_BL_PWR);
+	} else {
+		pxa_set_cken(CKEN0_PWM0,0);
+		hx2750_clear_egpio(HX2750_EGPIO_LCD_PWR | HX2750_EGPIO_BL_PWR);
+	}
+
+	mutex_unlock(&bl_mutex);
+	return 0;
+}
+
+static int hx2750_get_intensity(struct backlight_device *bd)
+{
+	return hx2750bl_intensity;
+}
+
+#ifdef CONFIG_PM
+static int hx2750_bl_suspend(struct platform_device *pdev, pm_message_t state)
+{
+	hx2750bl_flags |= HX2750BL_SUSPENDED;
+	hx2750_set_intensity(hx2750_backlight_device);
+	return 0;
+}
+
+static int hx2750_bl_resume(struct platform_device *pdev)
+{
+	hx2750bl_flags &= ~HX2750BL_SUSPENDED;
+	hx2750_set_intensity(hx2750_backlight_device);
+	return 0;
+}
+#else
+#define hx2750_bl_suspend	NULL
+#define hx2750_bl_resume	NULL
+#endif
+
+static struct backlight_properties hx2750_bl_data = {
+	.owner          = THIS_MODULE,
+	.max_brightness = HX2750_MAX_INTENSITY,
+	.update_status  = hx2750_set_intensity,
+	.get_brightness = hx2750_get_intensity,
+};
+
+static int __init hx2750_bl_probe(struct platform_device *pdev)
+{
+	hx2750_backlight_device = backlight_device_register ("hx2750-bl",
+		NULL, &hx2750_bl_data);
+	if (IS_ERR (hx2750_backlight_device))
+		return PTR_ERR (hx2750_backlight_device);
+
+	hx2750_bl_data.brightness = HX2750_DEFAULT_INTENSITY;
+	hx2750_bl_data.power = FB_BLANK_UNBLANK;
+	hx2750_set_intensity(hx2750_backlight_device);
+
+	printk("hx2750 Backlight Driver Initialized.\n");
+	return 0;
+}
+
+static int hx2750_bl_remove(struct platform_device *pdev)
+{
+	backlight_device_unregister(hx2750_backlight_device);
+
+	printk("hx2750 Backlight Driver Unloaded\n");
+	return 0;
+}
+
+static struct platform_driver hx2750_bl_driver = {
+	.probe		= hx2750_bl_probe,
+	.remove		= hx2750_bl_remove,
+	.suspend	= hx2750_bl_suspend,
+	.resume		= hx2750_bl_resume,
+	.driver		= {
+		.name		= "hx2750-bl",
+	},
+};
+
+static int __init hx2750_bl_init(void)
+{
+	return platform_driver_register(&hx2750_bl_driver);
+}
+
+static void __exit hx2750_bl_exit(void)
+{
+ 	platform_driver_unregister(&hx2750_bl_driver);
+}
+
+module_init(hx2750_bl_init);
+module_exit(hx2750_bl_exit);
+
+MODULE_AUTHOR("Richard Purdie <rpurdie@o-hand.com>");
+MODULE_DESCRIPTION("iPAQ hx2750 Backlight Driver");
+MODULE_LICENSE("GPLv2");
