summaryrefslogtreecommitdiff
path: root/meta/packages/linux/linux-rp-2.6.22/htcuni.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/linux/linux-rp-2.6.22/htcuni.patch')
-rw-r--r--meta/packages/linux/linux-rp-2.6.22/htcuni.patch944
1 files changed, 728 insertions, 216 deletions
diff --git a/meta/packages/linux/linux-rp-2.6.22/htcuni.patch b/meta/packages/linux/linux-rp-2.6.22/htcuni.patch
index 6958129ca1..a83c7afa34 100644
--- a/meta/packages/linux/linux-rp-2.6.22/htcuni.patch
+++ b/meta/packages/linux/linux-rp-2.6.22/htcuni.patch
@@ -1,10 +1,10 @@
---
- arch/arm/mach-pxa/Kconfig | 2
+ arch/arm/mach-pxa/Kconfig | 89 +
arch/arm/mach-pxa/Makefile | 1
arch/arm/mach-pxa/corgi.c | 3
- arch/arm/mach-pxa/htcuniversal/Kconfig | 80
+ arch/arm/mach-pxa/generic.c | 12
arch/arm/mach-pxa/htcuniversal/Makefile | 19
- arch/arm/mach-pxa/htcuniversal/htcuniversal.c | 470 +++++
+ arch/arm/mach-pxa/htcuniversal/htcuniversal.c | 468 +++++
arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.c | 917 +++++++++++
arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.h | 65
arch/arm/mach-pxa/htcuniversal/htcuniversal_asic3_leds.c | 143 +
@@ -29,17 +29,23 @@
drivers/leds/Kconfig | 7
drivers/leds/Makefile | 1
drivers/leds/leds-asic3.c | 189 ++
- drivers/mfd/Kconfig | 3
+ drivers/mfd/Kconfig | 10
drivers/mfd/Makefile | 2
drivers/mfd/asic3_base.c | 1208 +++++++++++++++
drivers/mfd/soc-core.c | 106 +
drivers/mfd/soc-core.h | 30
- drivers/mmc/host/Kconfig | 8
+ drivers/mmc/host/Kconfig | 6
drivers/mmc/host/Makefile | 2
drivers/mmc/host/asic3_mmc.c | 900 +++++++++++
drivers/mmc/host/asic3_mmc.h | 25
+ drivers/serial/pxa.c | 22
drivers/video/backlight/Kconfig | 2
drivers/video/backlight/corgi_bl.c | 4
+ drivers/w1/slaves/Kconfig | 11
+ drivers/w1/slaves/Makefile | 2
+ drivers/w1/slaves/w1_ds2760.c | 213 ++
+ drivers/w1/slaves/w1_ds2760.h | 50
+ drivers/w1/w1_family.h | 1
include/asm-arm/arch-pxa/clock.h | 27
include/asm-arm/arch-pxa/htcuniversal-asic.h | 213 ++
include/asm-arm/arch-pxa/htcuniversal-gpio.h | 220 ++
@@ -48,6 +54,7 @@
include/asm-arm/arch-pxa/irqs.h | 2
include/asm-arm/arch-pxa/pxa-pm_ll.h | 6
include/asm-arm/arch-pxa/pxa-regs.h | 2
+ include/asm-arm/arch-pxa/serial.h | 78
include/asm-arm/arch-pxa/sharpsl.h | 6
include/asm-arm/hardware/asic3_keys.h | 18
include/asm-arm/hardware/asic3_leds.h | 34
@@ -59,97 +66,12 @@
include/linux/pda_power.h | 31
include/linux/soc/asic3_base.h | 104 +
include/linux/soc/tmio_mmc.h | 17
- 60 files changed, 7410 insertions(+), 16 deletions(-)
+ 67 files changed, 7808 insertions(+), 17 deletions(-)
-Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/Kconfig
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/Kconfig 2007-07-27 16:10:40.000000000 +0100
-@@ -0,0 +1,80 @@
-+menuconfig MACH_HTCUNIVERSAL
-+ bool "HTC Universal"
-+ select PXA27x
-+ select BOARD_IRQ_MAP_BIG
-+ help
-+ Say Y here if you intend to run this kernel on a
-+ HTC Universal. Currently there is only basic support
-+ for this PDA.
-+
-+config HTCUNIVERSAL_CORE
-+ tristate "HTC Universal core"
-+ depends on MACH_HTCUNIVERSAL
-+ help
-+ This selection enables HTC Universal core support.
-+
-+config HTCUNIVERSAL_UDC
-+ bool "USB Device Controller support"
-+ depends on MACH_HTCUNIVERSAL && HTC_ASIC3 && USB_PXA27X
-+ help
-+ Enables HTC Universal specific USB detection
-+
-+config HTCUNIVERSAL_POWER
-+ tristate "HTC Universal power"
-+ depends on MACH_HTCUNIVERSAL && HTC_ASIC3
-+ help
-+ This selection enables HTC Universal power monitoring
-+ hardware support (through ASIC3).
-+
-+config HTCUNIVERSAL_BACKLIGHT
-+ bool "HTC Universal Backlight"
-+ depends on MACH_HTCUNIVERSAL && HTC_ASIC3 && BACKLIGHT_CLASS_DEVICE
-+ help
-+ This driver provides support for changing power and brightness
-+ on HTC Universal LCD backlight.
-+
-+config HTCUNIVERSAL_LCD
-+ tristate "HTC Universal LCD"
-+ depends on MACH_HTCUNIVERSAL && HTC_ASIC3 && LCD_CLASS_DEVICE
-+ help
-+ This driver provides support for changing power and brightness
-+ on HTC Universal LCD display.
-+
-+config HTCUNIVERSAL_TS2
-+ tristate "HTC Universal Touchscreen (old)"
-+ depends on MACH_HTCUNIVERSAL && HTC_ASIC3
-+ help
-+ Enable support for the HTC Universal Touchscreen Panel.
-+
-+config HTCUNIVERSAL_BUTTONS
-+ tristate "HTC Universal buttons support"
-+ depends on MACH_HTCUNIVERSAL && HTC_ASIC3
-+
-+config HTCUNIVERSAL_BLUETOOTH
-+ tristate "HTC Universal Bluetooth"
-+ depends on MACH_HTCUNIVERSAL && HTCUNIVERSAL_CORE && HTC_ASIC3
-+ help
-+ Enables support for the TI BRF6150 Bluetooth Module
-+ in the HTC Universal.
-+
-+config HTCUNIVERSAL_ASIC3_LEDS
-+ tristate "HTC Universal ASIC3 LED support"
-+ select LEDS_ASIC3
-+ depends on MACH_HTCUNIVERSAL && HTCUNIVERSAL_CORE && HTC_ASIC3
-+ ---help---
-+ Support for right (colors red+green+(amber)) and left (green+blue) led
-+ Off/on hook keys LED backlight
-+ Keyboard backlight
-+ Vibra
-+ Flashlight
-+
-+config HTCUNIVERSAL_PHONE
-+ tristate "HTC Universal Phone"
-+ depends on MACH_HTCUNIVERSAL && HTCUNIVERSAL_CORE && HTC_ASIC3
-+ help
-+ Enables support for the Qualcomm MSM6520 Phone Module
-+ in the HTC Universal.
-+
-+config HTCUNIVERSAL_AK4641
-+ depends on SND && I2C
-+ tristate
Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/Makefile
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/Makefile 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/Makefile 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,19 @@
+#
+# Makefile for HTC Universal
@@ -164,8 +86,8 @@ Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/Makefile
+obj-$(CONFIG_HTCUNIVERSAL_BACKLIGHT) += htcuniversal_bl.o
+obj-$(CONFIG_HTCUNIVERSAL_TS2) += htcuniversal_ts2.o
+obj-$(CONFIG_HTCUNIVERSAL_BUTTONS) += htcuniversal_buttons.o
-+#obj-$(CONFIG_HTCUNIVERSAL_BLUETOOTH) += htcuniversal_bt.o
-+#obj-$(CONFIG_HTCUNIVERSAL_PHONE) += htcuniversal_phone.o
++obj-$(CONFIG_HTCUNIVERSAL_BLUETOOTH) += htcuniversal_bt.o
++obj-$(CONFIG_HTCUNIVERSAL_PHONE) += htcuniversal_phone.o
+obj-$(CONFIG_HTCUNIVERSAL_ASIC3_LEDS) += htcuniversal_asic3_leds.o
+obj-$(CONFIG_HTCUNIVERSAL_UDC) += htcuniversal_udc.o
+
@@ -173,8 +95,8 @@ Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/Makefile
Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal.c 2007-07-27 16:10:40.000000000 +0100
-@@ -0,0 +1,470 @@
++++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal.c 2007-08-23 13:09:22.000000000 +0200
+@@ -0,0 +1,468 @@
+/*
+ * Hardware definitions for HTC Universal
+ *
@@ -203,7 +125,7 @@ Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal.c
+
+#include <asm/arch/bitfield.h>
+#include <asm/arch/pxa-regs.h>
-+//#include <asm/arch/serial.h>
++#include <asm/arch/serial.h>
+#include <asm/arch/pxa27x_keyboard.h>
+#include <asm/arch/pxafb.h>
+#include <asm/arch/irda.h>
@@ -591,13 +513,12 @@ Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal.c
+ pxa_init_irq();
+}
+
-+//FIXME
-+//static struct platform_pxa_serial_funcs htcuniversal_pxa_bt_funcs = {
-+// .configure = htcuniversal_bt_configure,
-+//};
-+//static struct platform_pxa_serial_funcs htcuniversal_pxa_phone_funcs = {
-+// .configure = htcuniversal_phone_configure,
-+//};
++static struct platform_pxa_serial_funcs htcuniversal_pxa_bt_funcs = {
++ .configure = htcuniversal_bt_configure,
++};
++static struct platform_pxa_serial_funcs htcuniversal_pxa_phone_funcs = {
++ .configure = htcuniversal_phone_configure,
++};
+
+/* USB OHCI */
+
@@ -620,9 +541,8 @@ Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal.c
+{
+ pxa_map_io();
+
-+// FIXME
-+// pxa_set_btuart_info(&htcuniversal_pxa_bt_funcs);
-+// pxa_set_ffuart_info(&htcuniversal_pxa_phone_funcs);
++ pxa_set_btuart_info(&htcuniversal_pxa_bt_funcs);
++ pxa_set_ffuart_info(&htcuniversal_pxa_phone_funcs);
+}
+
+static void __init htcuniversal_init(void)
@@ -648,7 +568,7 @@ Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal.c
Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.c 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.c 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,917 @@
+/*
+ * Audio support for codec Asahi Kasei AK4641
@@ -1570,7 +1490,7 @@ Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.c
Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.h 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.h 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,65 @@
+/*
+ * Audio support for codec Asahi Kasei AK4641
@@ -1640,7 +1560,7 @@ Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.h
Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_asic3_leds.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_asic3_leds.c 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_asic3_leds.c 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,143 @@
+/*
+ * LEDs support for the HP iPaq hx4700
@@ -1788,7 +1708,7 @@ Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_asic3_leds.c
Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_bl.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_bl.c 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_bl.c 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,61 @@
+/*
+ * Use consistent with the GNU GPL is permitted,
@@ -1854,7 +1774,7 @@ Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_bl.c
Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.c 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.c 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,135 @@
+/* Bluetooth interface driver for TI BRF6150 on HX4700
+ *
@@ -1870,7 +1790,7 @@ Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.c
+#include <linux/soc/asic3_base.h>
+
+#include <asm/hardware.h>
-+//#include <asm/arch/serial.h>
++#include <asm/arch/serial.h>
+#include <asm/hardware/ipaq-asic3.h>
+#include <asm/arch/htcuniversal-gpio.h>
+#include <asm/arch/htcuniversal-asic.h>
@@ -1994,7 +1914,7 @@ Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.c
Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.h 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.h 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,17 @@
+/*
+ * Bluetooth support file for calling bluetooth configuration functions
@@ -2016,7 +1936,7 @@ Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.h
Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_buttons.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_buttons.c 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_buttons.c 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,87 @@
+/*
+ * Buttons driver for HTC Universal
@@ -2108,7 +2028,7 @@ Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_buttons.c
Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_core.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_core.c 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_core.c 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,226 @@
+/* Core Hardware driver for Hx4700 (Serial, ASIC3, EGPIOs)
+ *
@@ -2339,7 +2259,7 @@ Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_core.c
Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_lcd.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_lcd.c 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_lcd.c 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,212 @@
+/*
+ * Use consistent with the GNU GPL is permitted,
@@ -2556,7 +2476,7 @@ Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_lcd.c
Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.c 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.c 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,167 @@
+
+/* Phone interface driver for Qualcomm MSM6250 on HTC Universal
@@ -2728,7 +2648,7 @@ Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.c
Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.h 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.h 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,16 @@
+/*
+ * Bluetooth support file for calling bluetooth configuration functions
@@ -2749,7 +2669,7 @@ Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.h
Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_pm.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_pm.c 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_pm.c 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,69 @@
+/*
+ * MyPal 716 power management support for the original HTC IPL in DoC G3
@@ -2823,7 +2743,7 @@ Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_pm.c
Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_power2.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_power2.c 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_power2.c 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,97 @@
+/*
+ * pda_power driver for HTC Universal
@@ -2925,7 +2845,7 @@ Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_power2.c
Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_ts2.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_ts2.c 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_ts2.c 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,490 @@
+/* Touch screen driver for the TI something-or-other
+ *
@@ -3420,7 +3340,7 @@ Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_ts2.c
Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_udc.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_udc.c 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_udc.c 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,71 @@
+
+/*
@@ -3496,7 +3416,7 @@ Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/htcuniversal_udc.c
Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/tsc2046_ts.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/tsc2046_ts.h 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/arch/arm/mach-pxa/htcuniversal/tsc2046_ts.h 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,20 @@
+/*
+ * temporary TSC2046 touchscreen hack
@@ -3520,22 +3440,120 @@ Index: linux-2.6.22/arch/arm/mach-pxa/htcuniversal/tsc2046_ts.h
+#endif
Index: linux-2.6.22/arch/arm/mach-pxa/Kconfig
===================================================================
---- linux-2.6.22.orig/arch/arm/mach-pxa/Kconfig 2007-07-27 16:10:20.000000000 +0100
-+++ linux-2.6.22/arch/arm/mach-pxa/Kconfig 2007-07-27 16:10:40.000000000 +0100
-@@ -46,6 +46,8 @@ config MACH_HX2750
+--- linux-2.6.22.orig/arch/arm/mach-pxa/Kconfig 2007-08-23 13:09:21.000000000 +0200
++++ linux-2.6.22/arch/arm/mach-pxa/Kconfig 2007-08-23 13:09:22.000000000 +0200
+@@ -46,6 +46,14 @@
help
This enables support for the HP iPAQ HX2750 handheld.
-+source "arch/arm/mach-pxa/htcuniversal/Kconfig"
++config MACH_HTCUNIVERSAL
++ bool "HTC Universal"
++ select PXA27x
++ help
++ Say Y here if you intend to run this kernel on a
++ HTC Universal. Currently there is only basic support
++ for this PDA.
+
endchoice
if PXA_SHARPSL
+@@ -80,6 +88,86 @@
+
+ endif
+
++if MACH_HTCUNIVERSAL
++
++menu "HTC Universal support"
++
++config HTCUNIVERSAL_CORE
++ tristate "HTC Universal core"
++ depends on MACH_HTCUNIVERSAL
++ help
++ This selection enables HTC Universal core support.
++
++config HTCUNIVERSAL_UDC
++ bool "USB Device Controller support"
++ depends on MACH_HTCUNIVERSAL && HTC_ASIC3 && USB_PXA27X
++ help
++ Enables HTC Universal specific USB detection
++
++config HTCUNIVERSAL_POWER
++ tristate "HTC Universal power"
++ depends on MACH_HTCUNIVERSAL && HTC_ASIC3
++ help
++ This selection enables HTC Universal power monitoring
++ hardware support (through ASIC3).
++
++config HTCUNIVERSAL_BACKLIGHT
++ bool "HTC Universal Backlight"
++ depends on MACH_HTCUNIVERSAL && HTC_ASIC3 && BACKLIGHT_CLASS_DEVICE
++ help
++ This driver provides support for changing power and brightness
++ on HTC Universal LCD backlight.
++
++config HTCUNIVERSAL_LCD
++ tristate "HTC Universal LCD"
++ depends on MACH_HTCUNIVERSAL && HTC_ASIC3 && LCD_CLASS_DEVICE
++ help
++ This driver provides support for changing power and brightness
++ on HTC Universal LCD display.
++
++config HTCUNIVERSAL_TS2
++ tristate "HTC Universal Touchscreen (old)"
++ depends on MACH_HTCUNIVERSAL && HTC_ASIC3
++ help
++ Enable support for the HTC Universal Touchscreen Panel.
++
++config HTCUNIVERSAL_BUTTONS
++ tristate "HTC Universal buttons support"
++ depends on MACH_HTCUNIVERSAL && HTC_ASIC3
++
++config HTCUNIVERSAL_BLUETOOTH
++ tristate "HTC Universal Bluetooth"
++ depends on MACH_HTCUNIVERSAL && HTCUNIVERSAL_CORE && HTC_ASIC3
++ help
++ Enables support for the TI BRF6150 Bluetooth Module
++ in the HTC Universal.
++
++config HTCUNIVERSAL_ASIC3_LEDS
++ tristate "HTC Universal ASIC3 LED support"
++ select LEDS_ASIC3
++ depends on MACH_HTCUNIVERSAL && HTCUNIVERSAL_CORE && HTC_ASIC3
++ ---help---
++ Support for right (colors red+green+(amber)) and left (green+blue) led
++ Off/on hook keys LED backlight
++ Keyboard backlight
++ Vibra
++ Flashlight
++
++config HTCUNIVERSAL_PHONE
++ tristate "HTC Universal Phone"
++ depends on MACH_HTCUNIVERSAL && HTCUNIVERSAL_CORE && HTC_ASIC3
++ help
++ Enables support for the Qualcomm MSM6520 Phone Module
++ in the HTC Universal.
++
++config HTCUNIVERSAL_AK4641
++ depends on SND && I2C
++ tristate "AK4641 chipset support"
++
++endmenu
++
++endif
++
+ endmenu
+
+ config MACH_POODLE
+@@ -160,4 +248,3 @@
+ depends on (PXA25x || PXA27x) && INPUT
+
+ endif
+-
Index: linux-2.6.22/arch/arm/mach-pxa/Makefile
===================================================================
---- linux-2.6.22.orig/arch/arm/mach-pxa/Makefile 2007-07-27 16:10:20.000000000 +0100
-+++ linux-2.6.22/arch/arm/mach-pxa/Makefile 2007-07-27 16:10:40.000000000 +0100
-@@ -19,6 +19,7 @@ obj-$(CONFIG_MACH_AKITA) += akita-ioexp.
+--- linux-2.6.22.orig/arch/arm/mach-pxa/Makefile 2007-08-23 13:09:21.000000000 +0200
++++ linux-2.6.22/arch/arm/mach-pxa/Makefile 2007-08-23 13:09:22.000000000 +0200
+@@ -19,6 +19,7 @@
obj-$(CONFIG_MACH_POODLE) += poodle.o corgi_ssp.o sharpsl_pm.o poodle_pm.o
obj-$(CONFIG_MACH_TOSA) += tosa.o
obj-$(CONFIG_MACH_HX2750) += hx2750.o hx2750_test.o
@@ -3545,8 +3563,8 @@ Index: linux-2.6.22/arch/arm/mach-pxa/Makefile
led-y := leds.o
Index: linux-2.6.22/arch/arm/mach-pxa/pm.c
===================================================================
---- linux-2.6.22.orig/arch/arm/mach-pxa/pm.c 2007-07-27 16:10:08.000000000 +0100
-+++ linux-2.6.22/arch/arm/mach-pxa/pm.c 2007-07-27 16:10:40.000000000 +0100
+--- linux-2.6.22.orig/arch/arm/mach-pxa/pm.c 2007-08-23 13:09:20.000000000 +0200
++++ linux-2.6.22/arch/arm/mach-pxa/pm.c 2007-08-23 13:09:22.000000000 +0200
@@ -22,6 +22,7 @@
#include <asm/system.h>
#include <asm/arch/pm.h>
@@ -3555,7 +3573,7 @@ Index: linux-2.6.22/arch/arm/mach-pxa/pm.c
#include <asm/arch/lubbock.h>
#include <asm/mach/time.h>
-@@ -75,12 +76,16 @@ enum { SLEEP_SAVE_START = 0,
+@@ -75,12 +76,16 @@
};
@@ -3572,7 +3590,7 @@ Index: linux-2.6.22/arch/arm/mach-pxa/pm.c
#ifdef CONFIG_IWMMXT
/* force any iWMMXt context to ram **/
-@@ -88,6 +93,11 @@ int pxa_pm_enter(suspend_state_t state)
+@@ -88,6 +93,11 @@
iwmmxt_task_disable(NULL);
#endif
@@ -3584,7 +3602,7 @@ Index: linux-2.6.22/arch/arm/mach-pxa/pm.c
SAVE(GPLR0); SAVE(GPLR1); SAVE(GPLR2);
SAVE(GPDR0); SAVE(GPDR1); SAVE(GPDR2);
SAVE(GRER0); SAVE(GRER1); SAVE(GRER2);
-@@ -123,6 +133,15 @@ int pxa_pm_enter(suspend_state_t state)
+@@ -123,6 +133,15 @@
/* Clear sleep reset status */
RCSR = RCSR_SMR;
@@ -3600,7 +3618,7 @@ Index: linux-2.6.22/arch/arm/mach-pxa/pm.c
/* before sleeping, calculate and save a checksum */
for (i = 0; i < SLEEP_SAVE_SIZE - 1; i++)
checksum += sleep_save[i];
-@@ -138,6 +157,9 @@ int pxa_pm_enter(suspend_state_t state)
+@@ -138,6 +157,9 @@
for (i = 0; i < SLEEP_SAVE_SIZE - 1; i++)
checksum += sleep_save[i];
@@ -3610,7 +3628,7 @@ Index: linux-2.6.22/arch/arm/mach-pxa/pm.c
/* if invalid, display message and wait for a hardware reset */
if (checksum != sleep_save[SLEEP_SAVE_CKSUM]) {
#ifdef CONFIG_ARCH_LUBBOCK
-@@ -179,6 +201,10 @@ int pxa_pm_enter(suspend_state_t state)
+@@ -179,6 +201,10 @@
RESTORE(PSTR);
@@ -3621,7 +3639,7 @@ Index: linux-2.6.22/arch/arm/mach-pxa/pm.c
#ifdef DEBUG
printk(KERN_DEBUG "*** made it back from resume\n");
#endif
-@@ -188,6 +214,13 @@ int pxa_pm_enter(suspend_state_t state)
+@@ -188,6 +214,13 @@
EXPORT_SYMBOL_GPL(pxa_pm_enter);
@@ -3635,7 +3653,7 @@ Index: linux-2.6.22/arch/arm/mach-pxa/pm.c
unsigned long sleep_phys_sp(void *sp)
{
return virt_to_phys(sp);
-@@ -219,8 +252,9 @@ static struct pm_ops pxa_pm_ops = {
+@@ -219,8 +252,9 @@
.prepare = pxa_pm_prepare,
.enter = pxa_pm_enter,
.finish = pxa_pm_finish,
@@ -3648,9 +3666,9 @@ Index: linux-2.6.22/arch/arm/mach-pxa/pm.c
Index: linux-2.6.22/drivers/input/keyboard/pxa27x_keyboard.c
===================================================================
---- linux-2.6.22.orig/drivers/input/keyboard/pxa27x_keyboard.c 2007-07-09 00:32:17.000000000 +0100
-+++ linux-2.6.22/drivers/input/keyboard/pxa27x_keyboard.c 2007-07-27 16:10:40.000000000 +0100
-@@ -140,7 +140,7 @@ static int pxakbd_resume(struct platform
+--- linux-2.6.22.orig/drivers/input/keyboard/pxa27x_keyboard.c 2007-07-09 01:32:17.000000000 +0200
++++ linux-2.6.22/drivers/input/keyboard/pxa27x_keyboard.c 2007-08-23 13:09:22.000000000 +0200
+@@ -140,7 +140,7 @@
KPREC = pdata->reg_kprec;
/* Enable unit clock */
@@ -3661,9 +3679,9 @@ Index: linux-2.6.22/drivers/input/keyboard/pxa27x_keyboard.c
mutex_unlock(&input_dev->mutex);
Index: linux-2.6.22/drivers/leds/Kconfig
===================================================================
---- linux-2.6.22.orig/drivers/leds/Kconfig 2007-07-09 00:32:17.000000000 +0100
-+++ linux-2.6.22/drivers/leds/Kconfig 2007-07-27 16:10:40.000000000 +0100
-@@ -95,6 +95,13 @@ config LEDS_COBALT
+--- linux-2.6.22.orig/drivers/leds/Kconfig 2007-07-09 01:32:17.000000000 +0200
++++ linux-2.6.22/drivers/leds/Kconfig 2007-08-23 13:09:22.000000000 +0200
+@@ -95,6 +95,13 @@
help
This option enables support for the front LED on Cobalt Server
@@ -3679,9 +3697,9 @@ Index: linux-2.6.22/drivers/leds/Kconfig
config LEDS_TRIGGERS
Index: linux-2.6.22/drivers/leds/Makefile
===================================================================
---- linux-2.6.22.orig/drivers/leds/Makefile 2007-07-09 00:32:17.000000000 +0100
-+++ linux-2.6.22/drivers/leds/Makefile 2007-07-27 16:10:40.000000000 +0100
-@@ -16,6 +16,7 @@ obj-$(CONFIG_LEDS_NET48XX) += leds-net4
+--- linux-2.6.22.orig/drivers/leds/Makefile 2007-07-09 01:32:17.000000000 +0200
++++ linux-2.6.22/drivers/leds/Makefile 2007-08-23 13:09:22.000000000 +0200
+@@ -16,6 +16,7 @@
obj-$(CONFIG_LEDS_WRAP) += leds-wrap.o
obj-$(CONFIG_LEDS_H1940) += leds-h1940.o
obj-$(CONFIG_LEDS_COBALT) += leds-cobalt.o
@@ -3692,7 +3710,7 @@ Index: linux-2.6.22/drivers/leds/Makefile
Index: linux-2.6.22/drivers/leds/leds-asic3.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/drivers/leds/leds-asic3.c 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/drivers/leds/leds-asic3.c 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,189 @@
+/*
+ * LEDs support for HTC ASIC3 devices.
@@ -3885,22 +3903,29 @@ Index: linux-2.6.22/drivers/leds/leds-asic3.c
+MODULE_LICENSE("GPL");
Index: linux-2.6.22/drivers/mfd/Kconfig
===================================================================
---- linux-2.6.22.orig/drivers/mfd/Kconfig 2007-07-27 16:10:05.000000000 +0100
-+++ linux-2.6.22/drivers/mfd/Kconfig 2007-07-27 16:10:40.000000000 +0100
-@@ -17,6 +17,9 @@ config MFD_SM501
-
- endmenu
+--- linux-2.6.22.orig/drivers/mfd/Kconfig 2007-08-23 13:09:19.000000000 +0200
++++ linux-2.6.22/drivers/mfd/Kconfig 2007-08-23 13:09:22.000000000 +0200
+@@ -15,6 +15,16 @@
+ interface. The device may be connected by PCI or local bus with
+ varying functions enabled.
+config HTC_ASIC3
+ tristate "HTC ASIC3 (iPAQ h1900/h3900/h4000/hx4700/rx3000) support"
+
- menu "Multimedia Capabilities Port drivers"
- depends on ARCH_SA1100
++config HTC_ASIC3_DS1WM
++ bool "Support HTC ASIC3 builtin DS1WM block"
++ help
++ Choose Y here if you want to include support for ASIC3's builtin
++ W1 controller. Some devices do not use it, and yet other have
++ separate DS1WM controller. For them, choose N.
++
+ endmenu
+ menu "Multimedia Capabilities Port drivers"
Index: linux-2.6.22/drivers/mfd/Makefile
===================================================================
---- linux-2.6.22.orig/drivers/mfd/Makefile 2007-07-27 16:10:05.000000000 +0100
-+++ linux-2.6.22/drivers/mfd/Makefile 2007-07-27 16:10:40.000000000 +0100
+--- linux-2.6.22.orig/drivers/mfd/Makefile 2007-08-23 13:09:19.000000000 +0200
++++ linux-2.6.22/drivers/mfd/Makefile 2007-08-23 13:09:22.000000000 +0200
@@ -2,6 +2,8 @@
# Makefile for multifunction miscellaneous devices
#
@@ -3913,7 +3938,7 @@ Index: linux-2.6.22/drivers/mfd/Makefile
Index: linux-2.6.22/drivers/mfd/asic3_base.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/drivers/mfd/asic3_base.c 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/drivers/mfd/asic3_base.c 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,1208 @@
+/*
+ * Driver interface to HTC "ASIC3"
@@ -5126,7 +5151,7 @@ Index: linux-2.6.22/drivers/mfd/asic3_base.c
Index: linux-2.6.22/drivers/mfd/soc-core.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/drivers/mfd/soc-core.c 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/drivers/mfd/soc-core.c 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,106 @@
+/*
+ * drivers/soc/soc-core.c
@@ -5237,7 +5262,7 @@ Index: linux-2.6.22/drivers/mfd/soc-core.c
Index: linux-2.6.22/drivers/mfd/soc-core.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/drivers/mfd/soc-core.h 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/drivers/mfd/soc-core.h 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,30 @@
+/*
+ * drivers/soc/soc-core.h
@@ -5272,7 +5297,7 @@ Index: linux-2.6.22/drivers/mfd/soc-core.h
Index: linux-2.6.22/include/asm-arm/arch-pxa/clock.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/include/asm-arm/arch-pxa/clock.h 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/include/asm-arm/arch-pxa/clock.h 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,27 @@
+/*
+ * linux/include/asm-arm/arch-pxa/clock.h
@@ -5304,7 +5329,7 @@ Index: linux-2.6.22/include/asm-arm/arch-pxa/clock.h
Index: linux-2.6.22/include/asm-arm/arch-pxa/htcuniversal-asic.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/include/asm-arm/arch-pxa/htcuniversal-asic.h 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/include/asm-arm/arch-pxa/htcuniversal-asic.h 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,213 @@
+/*
+ * include/asm/arm/arch-pxa/htcuniversal-asic.h
@@ -5522,7 +5547,7 @@ Index: linux-2.6.22/include/asm-arm/arch-pxa/htcuniversal-asic.h
Index: linux-2.6.22/include/asm-arm/arch-pxa/htcuniversal-gpio.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/include/asm-arm/arch-pxa/htcuniversal-gpio.h 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/include/asm-arm/arch-pxa/htcuniversal-gpio.h 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,220 @@
+/*
+ * include/asm-arm/arch-pxa/htcuniversal-gpio.h
@@ -5747,7 +5772,7 @@ Index: linux-2.6.22/include/asm-arm/arch-pxa/htcuniversal-gpio.h
Index: linux-2.6.22/include/asm-arm/arch-pxa/htcuniversal-init.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/include/asm-arm/arch-pxa/htcuniversal-init.h 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/include/asm-arm/arch-pxa/htcuniversal-init.h 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,14 @@
+/*
+ * include/asm/arm/arch-pxa/htcuniversal-init.h
@@ -5766,7 +5791,7 @@ Index: linux-2.6.22/include/asm-arm/arch-pxa/htcuniversal-init.h
Index: linux-2.6.22/include/asm-arm/arch-pxa/htcuniversal.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/include/asm-arm/arch-pxa/htcuniversal.h 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/include/asm-arm/arch-pxa/htcuniversal.h 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,3 @@
+#include <asm/arch/irqs.h>
+
@@ -5774,7 +5799,7 @@ Index: linux-2.6.22/include/asm-arm/arch-pxa/htcuniversal.h
Index: linux-2.6.22/include/asm-arm/arch-pxa/pxa-pm_ll.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/include/asm-arm/arch-pxa/pxa-pm_ll.h 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/include/asm-arm/arch-pxa/pxa-pm_ll.h 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,6 @@
+struct pxa_ll_pm_ops {
+ void (*suspend)(unsigned long);
@@ -5784,9 +5809,9 @@ Index: linux-2.6.22/include/asm-arm/arch-pxa/pxa-pm_ll.h
+extern struct pxa_ll_pm_ops *pxa_pm_set_ll_ops(struct pxa_ll_pm_ops *new_ops);
Index: linux-2.6.22/include/asm-arm/arch-pxa/sharpsl.h
===================================================================
---- linux-2.6.22.orig/include/asm-arm/arch-pxa/sharpsl.h 2007-07-09 00:32:17.000000000 +0100
-+++ linux-2.6.22/include/asm-arm/arch-pxa/sharpsl.h 2007-07-27 16:10:40.000000000 +0100
-@@ -25,12 +25,6 @@ struct corgits_machinfo {
+--- linux-2.6.22.orig/include/asm-arm/arch-pxa/sharpsl.h 2007-07-09 01:32:17.000000000 +0200
++++ linux-2.6.22/include/asm-arm/arch-pxa/sharpsl.h 2007-08-23 13:09:22.000000000 +0200
+@@ -25,12 +25,6 @@
/*
* SharpSL Backlight
*/
@@ -5802,7 +5827,7 @@ Index: linux-2.6.22/include/asm-arm/arch-pxa/sharpsl.h
Index: linux-2.6.22/include/asm-arm/hardware/asic3_keys.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/include/asm-arm/hardware/asic3_keys.h 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/include/asm-arm/hardware/asic3_keys.h 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,18 @@
+#include <linux/input.h>
+
@@ -5825,7 +5850,7 @@ Index: linux-2.6.22/include/asm-arm/hardware/asic3_keys.h
Index: linux-2.6.22/include/asm-arm/hardware/asic3_leds.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/include/asm-arm/hardware/asic3_leds.h 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/include/asm-arm/hardware/asic3_leds.h 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,34 @@
+/*
+ * LEDs support for HTC ASIC3 devices.
@@ -5864,7 +5889,7 @@ Index: linux-2.6.22/include/asm-arm/hardware/asic3_leds.h
Index: linux-2.6.22/include/asm-arm/hardware/ipaq-asic3.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/include/asm-arm/hardware/ipaq-asic3.h 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/include/asm-arm/hardware/ipaq-asic3.h 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,602 @@
+/*
+ *
@@ -6470,9 +6495,9 @@ Index: linux-2.6.22/include/asm-arm/hardware/ipaq-asic3.h
+#endif
Index: linux-2.6.22/include/linux/backlight.h
===================================================================
---- linux-2.6.22.orig/include/linux/backlight.h 2007-07-09 00:32:17.000000000 +0100
-+++ linux-2.6.22/include/linux/backlight.h 2007-07-27 16:10:40.000000000 +0100
-@@ -87,4 +87,11 @@ extern void backlight_device_unregister(
+--- linux-2.6.22.orig/include/linux/backlight.h 2007-07-09 01:32:17.000000000 +0200
++++ linux-2.6.22/include/linux/backlight.h 2007-08-23 13:09:22.000000000 +0200
+@@ -87,4 +87,11 @@
#define to_backlight_device(obj) container_of(obj, struct backlight_device, class_dev)
@@ -6487,7 +6512,7 @@ Index: linux-2.6.22/include/linux/backlight.h
Index: linux-2.6.22/include/linux/gpiodev.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/include/linux/gpiodev.h 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/include/linux/gpiodev.h 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,44 @@
+#ifndef __GPIODEV_H
+#define __GPIODEV_H
@@ -6536,7 +6561,7 @@ Index: linux-2.6.22/include/linux/gpiodev.h
Index: linux-2.6.22/include/linux/input_pda.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/include/linux/input_pda.h 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/include/linux/input_pda.h 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,47 @@
+#ifndef _INPUT_PDA_H
+#define _INPUT_PDA_H
@@ -6588,7 +6613,7 @@ Index: linux-2.6.22/include/linux/input_pda.h
Index: linux-2.6.22/include/linux/pda_power.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/include/linux/pda_power.h 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/include/linux/pda_power.h 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,31 @@
+/*
+ * Common power driver for PDAs and phones with one or two external
@@ -6624,7 +6649,7 @@ Index: linux-2.6.22/include/linux/pda_power.h
Index: linux-2.6.22/include/linux/soc/asic3_base.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/include/linux/soc/asic3_base.h 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/include/linux/soc/asic3_base.h 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,104 @@
+#include <asm/types.h>
+#include <linux/gpiodev.h>
@@ -6733,7 +6758,7 @@ Index: linux-2.6.22/include/linux/soc/asic3_base.h
Index: linux-2.6.22/include/linux/soc/tmio_mmc.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/include/linux/soc/tmio_mmc.h 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/include/linux/soc/tmio_mmc.h 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,17 @@
+#include <linux/platform_device.h>
+
@@ -6754,8 +6779,8 @@ Index: linux-2.6.22/include/linux/soc/tmio_mmc.h
+};
Index: linux-2.6.22/include/asm-arm/arch-pxa/pxa-regs.h
===================================================================
---- linux-2.6.22.orig/include/asm-arm/arch-pxa/pxa-regs.h 2007-07-27 16:10:22.000000000 +0100
-+++ linux-2.6.22/include/asm-arm/arch-pxa/pxa-regs.h 2007-07-27 16:10:40.000000000 +0100
+--- linux-2.6.22.orig/include/asm-arm/arch-pxa/pxa-regs.h 2007-08-23 13:09:21.000000000 +0200
++++ linux-2.6.22/include/asm-arm/arch-pxa/pxa-regs.h 2007-08-23 13:09:22.000000000 +0200
@@ -2063,6 +2063,8 @@
#define LDCMD_SOFINT (1 << 22)
#define LDCMD_EOFINT (1 << 21)
@@ -6767,14 +6792,12 @@ Index: linux-2.6.22/include/asm-arm/arch-pxa/pxa-regs.h
#define LCCR5_SOFM2 (1<<1) /* Start Of Frame Mask for Overlay 2 (channel 2) */
Index: linux-2.6.22/drivers/mmc/host/Kconfig
===================================================================
---- linux-2.6.22.orig/drivers/mmc/host/Kconfig 2007-07-09 00:32:17.000000000 +0100
-+++ linux-2.6.22/drivers/mmc/host/Kconfig 2007-07-27 16:10:40.000000000 +0100
-@@ -99,4 +99,10 @@ config MMC_TIFM_SD
-
+--- linux-2.6.22.orig/drivers/mmc/host/Kconfig 2007-07-09 01:32:17.000000000 +0200
++++ linux-2.6.22/drivers/mmc/host/Kconfig 2007-08-23 13:09:22.000000000 +0200
+@@ -100,3 +100,9 @@
To compile this driver as a module, choose M here: the
module will be called tifm_sd.
--
-+
+
+config MMC_ASIC3
+ tristate "HTC ASIC3 SD/MMC support"
+ depends on MMC && HTC_ASIC3
@@ -6783,9 +6806,9 @@ Index: linux-2.6.22/drivers/mmc/host/Kconfig
+ in the iPAQ hx4700 and others.
Index: linux-2.6.22/drivers/mmc/host/Makefile
===================================================================
---- linux-2.6.22.orig/drivers/mmc/host/Makefile 2007-07-09 00:32:17.000000000 +0100
-+++ linux-2.6.22/drivers/mmc/host/Makefile 2007-07-27 16:10:40.000000000 +0100
-@@ -15,4 +15,4 @@ obj-$(CONFIG_MMC_AU1X) += au1xmmc.o
+--- linux-2.6.22.orig/drivers/mmc/host/Makefile 2007-07-09 01:32:17.000000000 +0200
++++ linux-2.6.22/drivers/mmc/host/Makefile 2007-08-23 13:09:22.000000000 +0200
+@@ -15,4 +15,4 @@
obj-$(CONFIG_MMC_OMAP) += omap.o
obj-$(CONFIG_MMC_AT91) += at91_mci.o
obj-$(CONFIG_MMC_TIFM_SD) += tifm_sd.o
@@ -6794,7 +6817,7 @@ Index: linux-2.6.22/drivers/mmc/host/Makefile
Index: linux-2.6.22/drivers/mmc/host/asic3_mmc.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/drivers/mmc/host/asic3_mmc.c 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/drivers/mmc/host/asic3_mmc.c 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,900 @@
+/* Note that this driver can likely be merged into the tmio driver, so
+ * consider this code temporary. It works, though.
@@ -7699,7 +7722,7 @@ Index: linux-2.6.22/drivers/mmc/host/asic3_mmc.c
Index: linux-2.6.22/drivers/mmc/host/asic3_mmc.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/drivers/mmc/host/asic3_mmc.h 2007-07-27 16:10:40.000000000 +0100
++++ linux-2.6.22/drivers/mmc/host/asic3_mmc.h 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,25 @@
+#ifndef __ASIC3_MMC_H
+#define __ASIC3_MMC_H
@@ -7728,9 +7751,9 @@ Index: linux-2.6.22/drivers/mmc/host/asic3_mmc.h
+#endif // __ASIC3_MMC_H
Index: linux-2.6.22/drivers/input/keyboard/Makefile
===================================================================
---- linux-2.6.22.orig/drivers/input/keyboard/Makefile 2007-07-09 00:32:17.000000000 +0100
-+++ linux-2.6.22/drivers/input/keyboard/Makefile 2007-07-27 16:10:41.000000000 +0100
-@@ -21,4 +21,4 @@ obj-$(CONFIG_KEYBOARD_OMAP) += omap-key
+--- linux-2.6.22.orig/drivers/input/keyboard/Makefile 2007-07-09 01:32:17.000000000 +0200
++++ linux-2.6.22/drivers/input/keyboard/Makefile 2007-08-23 13:09:22.000000000 +0200
+@@ -21,4 +21,4 @@
obj-$(CONFIG_KEYBOARD_PXA27x) += pxa27x_keyboard.o
obj-$(CONFIG_KEYBOARD_AAED2000) += aaed2000_kbd.o
obj-$(CONFIG_KEYBOARD_GPIO) += gpio_keys.o
@@ -7739,7 +7762,7 @@ Index: linux-2.6.22/drivers/input/keyboard/Makefile
Index: linux-2.6.22/drivers/input/keyboard/asic3_keys.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.22/drivers/input/keyboard/asic3_keys.c 2007-07-27 16:10:41.000000000 +0100
++++ linux-2.6.22/drivers/input/keyboard/asic3_keys.c 2007-08-23 13:09:22.000000000 +0200
@@ -0,0 +1,131 @@
+/*
+ * Generic buttons driver for ASIC3 SoC.
@@ -7874,8 +7897,8 @@ Index: linux-2.6.22/drivers/input/keyboard/asic3_keys.c
+MODULE_LICENSE("GPL");
Index: linux-2.6.22/include/asm-arm/arch-pxa/irqs.h
===================================================================
---- linux-2.6.22.orig/include/asm-arm/arch-pxa/irqs.h 2007-07-09 00:32:17.000000000 +0100
-+++ linux-2.6.22/include/asm-arm/arch-pxa/irqs.h 2007-07-27 16:10:41.000000000 +0100
+--- linux-2.6.22.orig/include/asm-arm/arch-pxa/irqs.h 2007-07-09 01:32:17.000000000 +0200
++++ linux-2.6.22/include/asm-arm/arch-pxa/irqs.h 2007-08-23 13:09:22.000000000 +0200
@@ -178,6 +178,8 @@
defined(CONFIG_MACH_LOGICPD_PXA270) || \
defined(CONFIG_MACH_MAINSTONE)
@@ -7887,9 +7910,9 @@ Index: linux-2.6.22/include/asm-arm/arch-pxa/irqs.h
#endif
Index: linux-2.6.22/include/linux/ioport.h
===================================================================
---- linux-2.6.22.orig/include/linux/ioport.h 2007-07-09 00:32:17.000000000 +0100
-+++ linux-2.6.22/include/linux/ioport.h 2007-07-27 16:10:41.000000000 +0100
-@@ -56,6 +56,7 @@ struct resource_list {
+--- linux-2.6.22.orig/include/linux/ioport.h 2007-07-09 01:32:17.000000000 +0200
++++ linux-2.6.22/include/linux/ioport.h 2007-08-23 13:09:22.000000000 +0200
+@@ -56,6 +56,7 @@
#define IORESOURCE_IRQ_HIGHLEVEL (1<<2)
#define IORESOURCE_IRQ_LOWLEVEL (1<<3)
#define IORESOURCE_IRQ_SHAREABLE (1<<4)
@@ -7899,9 +7922,9 @@ Index: linux-2.6.22/include/linux/ioport.h
#define IORESOURCE_DMA_TYPE_MASK (3<<0)
Index: linux-2.6.22/drivers/video/backlight/Kconfig
===================================================================
---- linux-2.6.22.orig/drivers/video/backlight/Kconfig 2007-07-27 16:10:00.000000000 +0100
-+++ linux-2.6.22/drivers/video/backlight/Kconfig 2007-07-27 16:10:41.000000000 +0100
-@@ -34,7 +34,7 @@ config LCD_CLASS_DEVICE
+--- linux-2.6.22.orig/drivers/video/backlight/Kconfig 2007-08-23 13:09:19.000000000 +0200
++++ linux-2.6.22/drivers/video/backlight/Kconfig 2007-08-23 13:09:22.000000000 +0200
+@@ -34,7 +34,7 @@
config BACKLIGHT_CORGI
tristate "Sharp Corgi Backlight Driver (SL Series)"
@@ -7912,8 +7935,8 @@ Index: linux-2.6.22/drivers/video/backlight/Kconfig
If you have a Sharp Zaurus SL-C7xx, SL-Cxx00 or SL-6000x say y to enable the
Index: linux-2.6.22/drivers/video/backlight/corgi_bl.c
===================================================================
---- linux-2.6.22.orig/drivers/video/backlight/corgi_bl.c 2007-07-09 00:32:17.000000000 +0100
-+++ linux-2.6.22/drivers/video/backlight/corgi_bl.c 2007-07-27 16:10:41.000000000 +0100
+--- linux-2.6.22.orig/drivers/video/backlight/corgi_bl.c 2007-07-09 01:32:17.000000000 +0200
++++ linux-2.6.22/drivers/video/backlight/corgi_bl.c 2007-08-23 13:09:22.000000000 +0200
@@ -24,7 +24,7 @@
static int corgibl_intensity;
static struct backlight_properties corgibl_data;
@@ -7923,7 +7946,7 @@ Index: linux-2.6.22/drivers/video/backlight/corgi_bl.c
static unsigned long corgibl_flags;
#define CORGIBL_SUSPENDED 0x01
-@@ -107,7 +107,7 @@ static struct backlight_ops corgibl_ops
+@@ -107,7 +107,7 @@
static int corgibl_probe(struct platform_device *pdev)
{
@@ -7934,8 +7957,8 @@ Index: linux-2.6.22/drivers/video/backlight/corgi_bl.c
if (!machinfo->limit_mask)
Index: linux-2.6.22/arch/arm/mach-pxa/corgi.c
===================================================================
---- linux-2.6.22.orig/arch/arm/mach-pxa/corgi.c 2007-07-27 16:10:13.000000000 +0100
-+++ linux-2.6.22/arch/arm/mach-pxa/corgi.c 2007-07-27 16:13:54.000000000 +0100
+--- linux-2.6.22.orig/arch/arm/mach-pxa/corgi.c 2007-08-23 13:09:20.000000000 +0200
++++ linux-2.6.22/arch/arm/mach-pxa/corgi.c 2007-08-23 13:09:22.000000000 +0200
@@ -20,6 +20,7 @@
#include <linux/interrupt.h>
#include <linux/mmc/host.h>
@@ -7944,7 +7967,7 @@ Index: linux-2.6.22/arch/arm/mach-pxa/corgi.c
#include <asm/setup.h>
#include <asm/memory.h>
-@@ -142,7 +143,7 @@ struct corgissp_machinfo corgi_ssp_machi
+@@ -142,7 +143,7 @@
/*
* Corgi Backlight Device
*/
@@ -7955,9 +7978,9 @@ Index: linux-2.6.22/arch/arm/mach-pxa/corgi.c
.limit_mask = 0x0b,
Index: linux-2.6.22/arch/arm/mach-pxa/spitz.c
===================================================================
---- linux-2.6.22.orig/arch/arm/mach-pxa/spitz.c 2007-07-27 16:10:17.000000000 +0100
-+++ linux-2.6.22/arch/arm/mach-pxa/spitz.c 2007-07-27 16:10:41.000000000 +0100
-@@ -221,7 +221,7 @@ struct corgissp_machinfo spitz_ssp_machi
+--- linux-2.6.22.orig/arch/arm/mach-pxa/spitz.c 2007-08-23 13:09:20.000000000 +0200
++++ linux-2.6.22/arch/arm/mach-pxa/spitz.c 2007-08-23 13:09:22.000000000 +0200
+@@ -221,7 +221,7 @@
/*
* Spitz Backlight Device
*/
@@ -7966,3 +7989,492 @@ Index: linux-2.6.22/arch/arm/mach-pxa/spitz.c
.default_intensity = 0x1f,
.limit_mask = 0x0b,
.max_intensity = 0x2f,
+Index: linux-2.6.22/arch/arm/mach-pxa/generic.c
+===================================================================
+--- linux-2.6.22.orig/arch/arm/mach-pxa/generic.c 2007-07-09 01:32:17.000000000 +0200
++++ linux-2.6.22/arch/arm/mach-pxa/generic.c 2007-08-23 13:09:22.000000000 +0200
+@@ -345,6 +345,18 @@
+ .id = 3,
+ };
+
++void __init pxa_set_ffuart_info(struct platform_pxa_serial_funcs *info)
++{
++ ffuart_device.dev.platform_data = info;
++}
++EXPORT_SYMBOL(pxa_set_ffuart_info);
++
++void __init pxa_set_btuart_info(struct platform_pxa_serial_funcs *info)
++{
++ btuart_device.dev.platform_data = info;
++}
++EXPORT_SYMBOL(pxa_set_btuart_info);
++
+ static struct resource i2c_resources[] = {
+ {
+ .start = 0x40301680,
+Index: linux-2.6.22/drivers/w1/slaves/Kconfig
+===================================================================
+--- linux-2.6.22.orig/drivers/w1/slaves/Kconfig 2007-07-09 01:32:17.000000000 +0200
++++ linux-2.6.22/drivers/w1/slaves/Kconfig 2007-08-23 13:09:22.000000000 +0200
+@@ -35,4 +35,15 @@
+ Each block has 30 bytes of data and a two byte CRC16.
+ Full block writes are only allowed if the CRC is valid.
+
++config W1_SLAVE_DS2760
++ tristate "Dallas 2760 battery monitor chip (HP iPAQ & others)"
++ depends on W1
++ help
++ If you enable this you will have the DS2760 battery monitor
++ chip support.
++ The battery monitor chip is used in many batteries/devices
++ as the one who is responsible for charging/discharging/monitoring
++ Li+ batteries.
++ If you are unsure, say N.
++
+ endmenu
+Index: linux-2.6.22/drivers/w1/slaves/Makefile
+===================================================================
+--- linux-2.6.22.orig/drivers/w1/slaves/Makefile 2007-07-09 01:32:17.000000000 +0200
++++ linux-2.6.22/drivers/w1/slaves/Makefile 2007-08-23 13:09:22.000000000 +0200
+@@ -5,4 +5,4 @@
+ obj-$(CONFIG_W1_SLAVE_THERM) += w1_therm.o
+ obj-$(CONFIG_W1_SLAVE_SMEM) += w1_smem.o
+ obj-$(CONFIG_W1_SLAVE_DS2433) += w1_ds2433.o
+-
++obj-$(CONFIG_W1_SLAVE_DS2760) += w1_ds2760.o
+Index: linux-2.6.22/drivers/w1/w1_family.h
+===================================================================
+--- linux-2.6.22.orig/drivers/w1/w1_family.h 2007-07-09 01:32:17.000000000 +0200
++++ linux-2.6.22/drivers/w1/w1_family.h 2007-08-23 13:09:22.000000000 +0200
+@@ -33,6 +33,7 @@
+ #define W1_THERM_DS1822 0x22
+ #define W1_EEPROM_DS2433 0x23
+ #define W1_THERM_DS18B20 0x28
++#define W1_FAMILY_DS2760 0x30
+
+ #define MAXNAMELEN 32
+
+Index: linux-2.6.22/include/asm-arm/arch-pxa/serial.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.22/include/asm-arm/arch-pxa/serial.h 2007-08-23 13:09:22.000000000 +0200
+@@ -0,0 +1,78 @@
++/*
++ * linux/include/asm-arm/arch-pxa/serial.h
++ *
++ * Author: Nicolas Pitre
++ * Copyright: (C) 2001 MontaVista Software Inc.
++ *
++ * 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 <asm/arch/pxa-regs.h>
++
++#define BAUD_BASE 921600
++
++/* Standard COM flags */
++#define STD_COM_FLAGS (ASYNC_SKIP_TEST)
++
++#define STD_SERIAL_PORT_DEFNS \
++ { \
++ type: PORT_PXA, \
++ xmit_fifo_size: 64, \
++ baud_base: BAUD_BASE, \
++ iomem_base: &FFUART, \
++ iomem_reg_shift: 2, \
++ io_type: SERIAL_IO_MEM, \
++ irq: IRQ_FFUART, \
++ flags: STD_COM_FLAGS, \
++ }, { \
++ type: PORT_PXA, \
++ xmit_fifo_size: 64, \
++ baud_base: BAUD_BASE, \
++ iomem_base: &STUART, \
++ iomem_reg_shift: 2, \
++ io_type: SERIAL_IO_MEM, \
++ irq: IRQ_STUART, \
++ flags: STD_COM_FLAGS, \
++ }, { \
++ type: PORT_PXA, \
++ xmit_fifo_size: 64, \
++ baud_base: BAUD_BASE, \
++ iomem_base: &BTUART, \
++ iomem_reg_shift: 2, \
++ io_type: SERIAL_IO_MEM, \
++ irq: IRQ_BTUART, \
++ flags: STD_COM_FLAGS, \
++ }
++
++#define EXTRA_SERIAL_PORT_DEFNS
++
++struct platform_pxa_serial_funcs {
++
++ /* Initialize whatever is connected to this serial port. */
++ void (*configure)(int state);
++#define PXA_UART_CFG_PRE_STARTUP 0
++#define PXA_UART_CFG_POST_STARTUP 1
++#define PXA_UART_CFG_PRE_SHUTDOWN 2
++#define PXA_UART_CFG_POST_SHUTDOWN 3
++
++ /* Enable or disable the individual transmitter/receiver submodules.
++ * On transceivers without echo cancellation (e.g. SIR)
++ * transmitter always has priority; e.g. if both bits are set,
++ * only the transmitter is enabled. */
++ void (*set_txrx)(int txrx);
++#define PXA_SERIAL_TX 1
++#define PXA_SERIAL_RX 2
++
++ /* Get the current state of tx/rx. */
++ int (*get_txrx)(void);
++
++ int (*suspend)(struct platform_device *dev, pm_message_t state);
++ int (*resume)(struct platform_device *dev);
++};
++
++void pxa_set_ffuart_info(struct platform_pxa_serial_funcs *ffuart_funcs);
++void pxa_set_btuart_info(struct platform_pxa_serial_funcs *btuart_funcs);
++void pxa_set_stuart_info(struct platform_pxa_serial_funcs *stuart_funcs);
++void pxa_set_hwuart_info(struct platform_pxa_serial_funcs *hwuart_funcs);
+Index: linux-2.6.22/drivers/w1/slaves/w1_ds2760.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.22/drivers/w1/slaves/w1_ds2760.c 2007-08-23 13:09:22.000000000 +0200
+@@ -0,0 +1,213 @@
++/*
++ * 1-Wire implementation for the ds2760 chip
++ *
++ * Copyright (c) 2004-2005, Szabolcs Gyurko <szabolcs.gyurko@tlt.hu>
++ *
++ * Use consistent with the GNU GPL is permitted,
++ * provided that this copyright notice is
++ * preserved in its entirety in all copies and derived works.
++ *
++ */
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/device.h>
++#include <linux/types.h>
++#include <linux/platform_device.h>
++#include <linux/mutex.h>
++#include <linux/idr.h>
++
++#include "../w1.h"
++#include "../w1_int.h"
++#include "../w1_family.h"
++#include "w1_ds2760.h"
++
++static int w1_ds2760_io(struct device *dev, char *buf, int addr, size_t count,
++ int io)
++{
++ struct w1_slave *sl = container_of(dev, struct w1_slave, dev);
++
++ if (!dev)
++ return 0;
++
++ mutex_lock(&sl->master->mutex);
++
++ if (addr > DS2760_DATA_SIZE || addr < 0) {
++ count = 0;
++ goto out;
++ }
++ if (addr + count > DS2760_DATA_SIZE)
++ count = DS2760_DATA_SIZE - addr;
++
++ if (!w1_reset_select_slave(sl)) {
++ if (!io) {
++ w1_write_8(sl->master, W1_DS2760_READ_DATA);
++ w1_write_8(sl->master, addr);
++ count = w1_read_block(sl->master, buf, count);
++ } else {
++ w1_write_8(sl->master, W1_DS2760_WRITE_DATA);
++ w1_write_8(sl->master, addr);
++ w1_write_block(sl->master, buf, count);
++ /* XXX w1_write_block returns void, not n_written */
++ }
++ }
++
++out:
++ mutex_unlock(&sl->master->mutex);
++
++ return count;
++}
++
++int w1_ds2760_read(struct device *dev, char *buf, int addr, size_t count)
++{
++ return w1_ds2760_io(dev, buf, addr, count, 0);
++}
++
++int w1_ds2760_write(struct device *dev, char *buf, int addr, size_t count)
++{
++ return w1_ds2760_io(dev, buf, addr, count, 1);
++}
++
++static ssize_t w1_ds2760_read_bin(struct kobject *kobj, char *buf, loff_t off,
++ size_t count)
++{
++ struct device *dev = container_of(kobj, struct device, kobj);
++ return w1_ds2760_read(dev, buf, off, count);
++}
++
++static struct bin_attribute w1_ds2760_bin_attr = {
++ .attr = {
++ .name = "w1_slave",
++ .mode = S_IRUGO,
++ .owner = THIS_MODULE,
++ },
++ .size = DS2760_DATA_SIZE,
++ .read = w1_ds2760_read_bin,
++};
++
++static DEFINE_IDR(bat_idr);
++static DEFINE_MUTEX(bat_idr_lock);
++
++static int new_bat_id(void)
++{
++ int ret;
++
++ while (1) {
++ int id;
++
++ ret = idr_pre_get(&bat_idr, GFP_KERNEL);
++ if (ret == 0)
++ return -ENOMEM;
++
++ mutex_lock(&bat_idr_lock);
++ ret = idr_get_new(&bat_idr, NULL, &id);
++ mutex_unlock(&bat_idr_lock);
++
++ if (ret == 0) {
++ ret = id & MAX_ID_MASK;
++ break;
++ }
++ else if (ret == -EAGAIN)
++ continue;
++ else
++ break;
++ }
++
++ return ret;
++}
++
++static void release_bat_id(int id)
++{
++ mutex_lock(&bat_idr_lock);
++ idr_remove(&bat_idr, id);
++ mutex_unlock(&bat_idr_lock);
++
++ return;
++}
++
++static int w1_ds2760_add_slave(struct w1_slave *sl)
++{
++ int ret;
++ int id;
++ struct platform_device *pdev;
++
++ id = new_bat_id();
++ if (id < 0) {
++ ret = id;
++ goto noid;
++ }
++
++ pdev = platform_device_alloc("ds2760-battery", id);
++ if (!pdev) {
++ ret = -ENOMEM;
++ goto pdev_alloc_failed;
++ }
++ pdev->dev.parent = &sl->dev;
++
++ ret = platform_device_add(pdev);
++ if (ret)
++ goto pdev_add_failed;
++
++ ret = sysfs_create_bin_file(&sl->dev.kobj, &w1_ds2760_bin_attr);
++ if (ret)
++ goto bin_attr_failed;
++
++ dev_set_drvdata(&sl->dev, pdev);
++
++ goto success;
++
++bin_attr_failed:
++pdev_add_failed:
++ platform_device_unregister(pdev);
++pdev_alloc_failed:
++ release_bat_id(id);
++noid:
++success:
++ return ret;
++}
++
++static void w1_ds2760_remove_slave(struct w1_slave *sl)
++{
++ struct platform_device *pdev = dev_get_drvdata(&sl->dev);
++ int id = pdev->id;
++
++ platform_device_unregister(pdev);
++ release_bat_id(id);
++ sysfs_remove_bin_file(&sl->dev.kobj, &w1_ds2760_bin_attr);
++
++ return;
++}
++
++static struct w1_family_ops w1_ds2760_fops = {
++ .add_slave = w1_ds2760_add_slave,
++ .remove_slave = w1_ds2760_remove_slave,
++};
++
++static struct w1_family w1_ds2760_family = {
++ .fid = W1_FAMILY_DS2760,
++ .fops = &w1_ds2760_fops,
++};
++
++static int __init w1_ds2760_init(void)
++{
++ printk(KERN_INFO "1-Wire driver for the DS2760 battery monitor "
++ " chip - (c) 2004-2005, Szabolcs Gyurko\n");
++ idr_init(&bat_idr);
++ return w1_register_family(&w1_ds2760_family);
++}
++
++static void __exit w1_ds2760_exit(void)
++{
++ w1_unregister_family(&w1_ds2760_family);
++ idr_destroy(&bat_idr);
++}
++
++EXPORT_SYMBOL(w1_ds2760_read);
++EXPORT_SYMBOL(w1_ds2760_write);
++
++module_init(w1_ds2760_init);
++module_exit(w1_ds2760_exit);
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Szabolcs Gyurko <szabolcs.gyurko@tlt.hu>");
++MODULE_DESCRIPTION("1-wire Driver Dallas 2760 battery monitor chip");
+Index: linux-2.6.22/drivers/w1/slaves/w1_ds2760.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.22/drivers/w1/slaves/w1_ds2760.h 2007-08-23 13:09:22.000000000 +0200
+@@ -0,0 +1,50 @@
++/*
++ * 1-Wire implementation for the ds2760 chip
++ *
++ * Copyright (c) 2004-2005, Szabolcs Gyurko <szabolcs.gyurko@tlt.hu>
++ *
++ * Use consistent with the GNU GPL is permitted,
++ * provided that this copyright notice is
++ * preserved in its entirety in all copies and derived works.
++ *
++ */
++
++#ifndef __w1_ds2760_h__
++#define __w1_ds2760_h__
++
++/* Known commands to the DS2760 chip */
++#define W1_DS2760_SWAP 0xAA
++#define W1_DS2760_READ_DATA 0x69
++#define W1_DS2760_WRITE_DATA 0x6C
++#define W1_DS2760_COPY_DATA 0x48
++#define W1_DS2760_RECALL_DATA 0xB8
++#define W1_DS2760_LOCK 0x6A
++
++/* Number of valid register addresses */
++#define DS2760_DATA_SIZE 0x40
++
++#define DS2760_PROTECTION_REG 0x00
++#define DS2760_STATUS_REG 0x01
++#define DS2760_EEPROM_REG 0x07
++#define DS2760_SPECIAL_FEATURE_REG 0x08
++#define DS2760_VOLTAGE_MSB 0x0c
++#define DS2760_VOLTAGE_LSB 0x0d
++#define DS2760_CURRENT_MSB 0x0e
++#define DS2760_CURRENT_LSB 0x0f
++#define DS2760_CURRENT_ACCUM_MSB 0x10
++#define DS2760_CURRENT_ACCUM_LSB 0x11
++#define DS2760_TEMP_MSB 0x18
++#define DS2760_TEMP_LSB 0x19
++#define DS2760_EEPROM_BLOCK0 0x20
++#define DS2760_ACTIVE_FULL 0x20
++#define DS2760_EEPROM_BLOCK1 0x30
++#define DS2760_RATED_CAPACITY 0x32
++#define DS2760_CURRENT_OFFSET_BIAS 0x33
++#define DS2760_ACTIVE_EMPTY 0x3b
++
++extern int w1_ds2760_read(struct device *dev, char *buf, int addr,
++ size_t count);
++extern int w1_ds2760_write(struct device *dev, char *buf, int addr,
++ size_t count);
++
++#endif /* !__w1_ds2760_h__ */
+Index: linux-2.6.22/drivers/serial/pxa.c
+===================================================================
+--- linux-2.6.22.orig/drivers/serial/pxa.c 2007-08-23 13:21:54.000000000 +0200
++++ linux-2.6.22/drivers/serial/pxa.c 2007-08-23 13:22:54.000000000 +0200
+@@ -46,6 +46,7 @@
+ #include <asm/io.h>
+ #include <asm/hardware.h>
+ #include <asm/irq.h>
++#include <asm/arch/serial.h>
+ #include <asm/arch/pxa-regs.h>
+
+
+@@ -59,6 +60,14 @@
+ char *name;
+ };
+
++
++#define IS_METHOD(dev, method) (dev && (dev)->platform_data && ((struct platform_pxa_serial_funcs *)(dev)->platform_data)->method)
++#define METHOD_CALL(dev, method) \
++ ((struct platform_pxa_serial_funcs *)(dev)->platform_data)->method()
++#define SAFE_METHOD_CALL(dev, method, args...) \
++ if (IS_METHOD(dev, method)) \
++ ((struct platform_pxa_serial_funcs *)(dev)->platform_data)->method(args)
++
+ static inline unsigned int serial_in(struct uart_pxa_port *up, int offset)
+ {
+ offset <<= 2;
+@@ -346,6 +355,9 @@
+ unsigned long flags;
+ int retval;
+
++ /* Perform platform-specific port initialization, if needed. */
++ SAFE_METHOD_CALL(port->dev, configure, PXA_UART_CFG_PRE_STARTUP);
++
+ if (port->line == 3) /* HWUART */
+ up->mcr |= UART_MCR_AFE;
+ else
+@@ -401,6 +413,12 @@
+ (void) serial_in(up, UART_IIR);
+ (void) serial_in(up, UART_MSR);
+
++ /*
++ * Perform platform-specific port initialization if needed
++ */
++ SAFE_METHOD_CALL(port->dev, configure, PXA_UART_CFG_POST_STARTUP);
++ SAFE_METHOD_CALL(port->dev, set_txrx, PXA_SERIAL_RX);
++
+ return 0;
+ }
+
+@@ -409,6 +427,8 @@
+ struct uart_pxa_port *up = (struct uart_pxa_port *)port;
+ unsigned long flags;
+
++ SAFE_METHOD_CALL(port->dev, configure, PXA_UART_CFG_PRE_SHUTDOWN);
++
+ free_irq(up->port.irq, up);
+
+ /*
+@@ -430,6 +450,8 @@
+ UART_FCR_CLEAR_RCVR |
+ UART_FCR_CLEAR_XMIT);
+ serial_out(up, UART_FCR, 0);
++
++ SAFE_METHOD_CALL(port->dev, configure, PXA_UART_CFG_POST_SHUTDOWN);
+ }
+
+ static void