diff -Naur linux-omap-2.6.orig/arch/arm/mach-omap1/Kconfig linux-omap-2.6/arch/arm/mach-omap1/Kconfig
--- linux-omap-2.6.orig/arch/arm/mach-omap1/Kconfig	2006-01-14 14:58:56.000000000 +0000
+++ linux-omap-2.6/arch/arm/mach-omap1/Kconfig	2006-01-14 19:43:54.000000000 +0000
@@ -73,11 +73,11 @@
 	bool "Palm Tungsten E"
 	depends on ARCH_OMAP1 && ARCH_OMAP15XX
 	help
-          Support for the Palm Tungsten E PDA. Currently only the LCD panel
-          is supported. To boot the kernel, you'll need a PalmOS compatible
-          bootloader; check out http://palmtelinux.sourceforge.net for more
-          informations.
-          Say Y here if you have such a PDA, say NO otherwise.
+	  Support for the Palm Tungsten E PDA. Currently only the LCD
+	  panel with the touchscreen input are supported. To boot the
+	  kernel, you'll need a PalmOS compatible bootloader; check out
+	  http://palmtelinux.sourceforge.net for more informations.
+	  Say Y here if you have such a PDA, say N otherwise.
 
 config MACH_OMAP_GENERIC
 	bool "Generic OMAP board"
diff -Naur linux-omap-2.6.orig/drivers/input/touchscreen/Kconfig linux-omap-2.6/drivers/input/touchscreen/Kconfig
--- linux-omap-2.6.orig/drivers/input/touchscreen/Kconfig	2006-01-14 14:59:17.000000000 +0000
+++ linux-omap-2.6/drivers/input/touchscreen/Kconfig	2006-01-14 15:56:12.000000000 +0000
@@ -99,7 +99,8 @@
 config TOUCHSCREEN_OMAP
 	tristate "OMAP touchscreen input driver"
 	depends on INPUT && INPUT_TOUCHSCREEN && ARCH_OMAP
-	select OMAP_TSC2101
+	select OMAP_TSC2101 if MACH_OMAP_H3 || MACH_OMAP_H2
+	select OMAP_TSC2301 if MACH_OMAP_PALMTE
 	help
 	  Say Y here if you have an OMAP based board with touchscreen
 	  attached to it, e.g. OMAP Innovator, OSK, H2 or H3
diff -Naur linux-omap-2.6.orig/drivers/input/touchscreen/omap/Makefile linux-omap-2.6/drivers/input/touchscreen/omap/Makefile
--- linux-omap-2.6.orig/drivers/input/touchscreen/omap/Makefile	2006-01-14 14:59:17.000000000 +0000
+++ linux-omap-2.6/drivers/input/touchscreen/omap/Makefile	2006-01-14 15:56:12.000000000 +0000
@@ -8,5 +8,6 @@
 objs-$(CONFIG_ARCH_OMAP16XX)$(CONFIG_MACH_OMAP_H3) += ts_hx.o
 objs-$(CONFIG_ARCH_OMAP15XX)$(CONFIG_MACH_OMAP_INNOVATOR) += ts_inn1510.o
 objs-$(CONFIG_ARCH_OMAP16XX)$(CONFIG_MACH_OMAP_OSK) += ts_osk.o
+objs-$(CONFIG_ARCH_OMAP15XX)$(CONFIG_MACH_OMAP_PALMTE) += ts_palmte.o
 
 omapts-objs := omap_ts.o $(objs-yy)
diff -Naur linux-omap-2.6.orig/drivers/input/touchscreen/omap/omap_ts.c linux-omap-2.6/drivers/input/touchscreen/omap/omap_ts.c
--- linux-omap-2.6.orig/drivers/input/touchscreen/omap/omap_ts.c	2006-01-14 14:59:17.000000000 +0000
+++ linux-omap-2.6/drivers/input/touchscreen/omap/omap_ts.c	2006-01-14 15:56:12.000000000 +0000
@@ -23,7 +23,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  * History:
  * 12/12/2004    Srinath Modified and intergrated code for H2 and H3
- *
+ * 13/01/2006    Added PalmTE specific code, Andrzej Zaborowski
  */
 
 #include <linux/errno.h>
@@ -55,8 +55,17 @@
 #if defined(CONFIG_MACH_OMAP_INNOVATOR) && defined(CONFIG_ARCH_OMAP15XX)
 	&innovator1510_ts,
 #endif
+#ifdef CONFIG_MACH_OMAP_PALMTE
+	&palmte_ts,
+#endif
 };
 
+#ifdef CONFIG_MACH_OMAP_PALMTE
+static int omap_ts_host_controlled = 1;
+#else
+static int omap_ts_host_controlled = 0;
+#endif
+
 static struct omap_ts_t ts_omap;
 
 static int omap_ts_read(void)
@@ -127,10 +136,38 @@
 	return IRQ_HANDLED;
 }
 
+static irqreturn_t omap_ts_handler_host(int irq, void *dev_id,
+		struct pt_regs *regs)
+{
+	spin_lock(&ts_omap.lock);
+
+	if (!ts_omap.touched) {
+		DEBUG_TS("omap_ts_handler_host: pen down\n");
+		input_report_key(&(ts_omap.inputdevice), BTN_TOUCH, 1);
+		ts_omap.touched = 1;
+	}
+
+	omap_ts_read();
+
+	if (ts_omap.dev->penup() && ts_omap.touched) {
+		DEBUG_TS("omap_ts_handler_host: pen up\n");
+		ts_omap.touched = 0;
+		input_report_abs(&(ts_omap.inputdevice), ABS_X, 0);
+		input_report_abs(&(ts_omap.inputdevice), ABS_Y, 0);
+		input_report_abs(&(ts_omap.inputdevice), ABS_PRESSURE, 0);
+		input_sync(&(ts_omap.inputdevice));
+		input_report_key(&(ts_omap.inputdevice), BTN_TOUCH, 0);
+	}
+
+	spin_unlock(&ts_omap.lock);
+	return IRQ_HANDLED;
+}
+
 static int __init omap_ts_probe(struct platform_device *pdev)
 {
 	int i;
 	int status = -ENODEV;
+	irqreturn_t (*irq_handler)(int, void *, struct pt_regs *);
 
 	memset(&ts_omap, 0, sizeof(ts_omap));
 	spin_lock_init(&ts_omap.lock);
@@ -154,10 +191,15 @@
 
 	/* request irq */
 	if (ts_omap.irq != -1) {
-		if (request_irq(ts_omap.irq, omap_ts_handler, 0,
+		if (omap_ts_host_controlled)
+			irq_handler = omap_ts_handler_host;
+		else
+			irq_handler = omap_ts_handler;
+
+		if (request_irq(ts_omap.irq, irq_handler, 0,
 				OMAP_TS_NAME, &ts_omap)) {
-			printk(KERN_ERR
-	  "omap_ts.c: Could not allocate touchscreen IRQ!\n");
+			printk(KERN_ERR "omap_ts.c: Could not "
+					"allocate touchscreen IRQ!\n");
 			ts_omap.irq = -1;
 			return -EINVAL;
 		}
@@ -176,6 +218,7 @@
 	    BIT(ABS_X) | BIT(ABS_Y) | BIT(ABS_PRESSURE);
 	input_register_device(ts_omap.inputdevice);
 
+	ts_omap.touched = 0;
 	ts_omap.dev->enable();
 
 	printk("OMAP touchscreen driver initialized\n");
@@ -211,6 +254,7 @@
 {
 	/* Nothing */
 }
+
 static struct platform_driver omap_ts_driver = {
 	.probe 		= omap_ts_probe,
 	.remove 	= omap_ts_remove,
diff -Naur linux-omap-2.6.orig/drivers/input/touchscreen/omap/omap_ts.h linux-omap-2.6/drivers/input/touchscreen/omap/omap_ts.h
--- linux-omap-2.6.orig/drivers/input/touchscreen/omap/omap_ts.h	2006-01-14 14:59:17.000000000 +0000
+++ linux-omap-2.6/drivers/input/touchscreen/omap/omap_ts.h	2006-01-14 15:56:12.000000000 +0000
@@ -38,7 +38,7 @@
         void (*enable)  (void);
         void (*disable) (void);
         void (*remove)  (void);
-        int  (*penup)  (void);
+        int  (*penup)   (void);
 };
 
 struct omap_ts_t{
@@ -54,5 +54,6 @@
 extern struct ts_device hx_ts;
 extern struct ts_device osk_ts;
 extern struct ts_device innovator1510_ts;
+extern struct ts_device palmte_ts;
 
 #endif /* __OMAP_TS_H */
diff -Naur linux-omap-2.6.orig/drivers/input/touchscreen/omap/ts_palmte.c linux-omap-2.6/drivers/input/touchscreen/omap/ts_palmte.c
--- linux-omap-2.6.orig/drivers/input/touchscreen/omap/ts_palmte.c	1970-01-01 00:00:00.000000000 +0000
+++ linux-omap-2.6/drivers/input/touchscreen/omap/ts_palmte.c	2006-01-14 16:57:24.000000000 +0000
@@ -0,0 +1,186 @@
+/*
+ * drivers/input/touchscreen/omap/ts_palmte.c
+ *
+ * Touchscreen support for the OMAP 310 boards
+ * 
+ * Copyright (c) 2005 Andrzej Zaborowski  <balrog@zabor.org>
+ * based on the H2/H3 Touchscreen driver:
+ * Copyright (c) 2002 MontaVista Software Inc.
+ * Copyright (c) 2004 Texas Instruments, Inc.
+ * Assembled using driver code copyright the companies above.
+ *
+ * This package is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This package is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this package; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include <linux/input.h>
+#include <linux/device.h>
+#include <asm/mach-types.h>
+#include <asm/arch/gpio.h>
+#include <asm/arch/mux.h>
+#include <asm/arch/hardware.h>
+#include <asm/hardware/tsc2301.h>
+
+#include "../drivers/ssi/omap-tsc2301.h"
+#include "omap_ts.h"
+
+#define PALMTE_GPIO_NUM				6
+
+#define TOUCHSCREEN_DATA_REGISTERS_PAGE		0x0
+#define TOUCHSCREEN_CONTROL_REGISTERS_PAGE	0x1
+
+#define TSC2301_XRES				320
+#define TSC2301_READ_MAX			0x4
+#define TSC2301_GETSTATUS(ret)			\
+	(((ret) & 0x8000) || !((ret) & 0x4000))
+#define TSC2301_MASKVAL				0x0fff
+#define TSC2301_PRESSUREVAL(x)			((x) << 12)
+
+static int palmte_ts_penup(void);
+static int palmte_ts_probe(struct omap_ts_t *ts);
+static void palmte_ts_read(u16 *data);
+static void palmte_ts_enable(void);
+static void palmte_ts_disable(void);
+#ifdef	MODULE
+static void palmte_ts_remove(void);
+#endif
+
+struct ts_device palmte_ts = {
+	.probe 		= palmte_ts_probe,
+	.read 		= palmte_ts_read,
+	.enable 	= palmte_ts_enable,
+	.disable 	= palmte_ts_disable,
+	.remove 	= __exit_p(palmte_ts_remove),
+	.penup 		= palmte_ts_penup,
+};
+
+static int palmte_ts_penup(void)
+{
+	u16 ret;
+
+	/*
+	 * Read the ADC control register
+	 *
+	 * TODO: Instead read the DAV bit of the TSC2301_TS_CONFIG2_CTRL
+	 * register that indicates actual converted data availiable.
+	 */
+	ret = omap_tsc2301_read(TOUCHSCREEN_CONTROL_REGISTERS_PAGE,
+			TSC2301_TS_ADC_CTRL);
+
+	/* Check for pen status in the ADC control register */
+	ret = TSC2301_GETSTATUS(ret);
+	return !ret;
+
+}
+
+static int __init palmte_ts_probe(struct omap_ts_t *ts)
+{
+	unsigned gpio = PALMTE_GPIO_NUM;
+
+	ts->irq = OMAP_GPIO_IRQ(gpio);
+	if (omap_request_gpio(gpio) != 0) {
+		printk(KERN_ERR "palmte_ts_init.c: Could not reserve GPIO!\n");
+		return -EINVAL;
+	}
+
+	omap_set_gpio_direction(gpio, 1);
+	set_irq_type(ts->irq, IRQT_FALLING);
+	return 0;
+}
+
+static void palmte_ts_read(u16 *values)
+{
+	s32 t, p = 0;
+	int i;
+
+	/* Read X, Y, Z1 and Z2 */
+	omap_tsc2301_reads(TOUCHSCREEN_DATA_REGISTERS_PAGE, TSC2301_TS_X,
+			values, TSC2301_READ_MAX);
+
+	for (i = 0; i < TSC2301_READ_MAX; i ++)
+		values[i] &= TSC2301_MASKVAL;
+
+	/* Calculate Pressure */
+	if (values[TSC2301_TS_Z1] != 0) {
+		t = ((TSC2301_XRES * values[TSC2301_TS_X]) *
+			(values[TSC2301_TS_Z2] - values[TSC2301_TS_Z1]));
+		p = t / (u32) (TSC2301_PRESSUREVAL(values[TSC2301_TS_Z1]));
+		if (p < 0)
+			p = 0;
+	}
+
+	values[TSC2301_TS_Z1] = p;
+}
+
+static void palmte_ts_enable(void)
+{
+	int ret = omap_tsc2301_enable();
+	if (ret) {
+		printk(KERN_ERR "TSC2301 Codec initialization failed!\n");
+		return;
+	}
+
+	/* Stop all conversions */
+	omap_tsc2301_write(TOUCHSCREEN_CONTROL_REGISTERS_PAGE,
+			TSC2301_TS_ADC_CTRL,
+			TSC2301_ADC_POWERDOWN | TSC2301_ADC_CONTROL);
+
+	/*
+	 * Use internal reference, 100 usec power-up delay,
+	 * power down between conversions, 1.25V internal reference
+	 */
+	omap_tsc2301_write(TOUCHSCREEN_CONTROL_REGISTERS_PAGE,
+			TSC2301_TS_REF_CTRL, TSC2301_REF_POWERUP);
+
+	/* Set an 84usec precharge time and 32 usec sense time */
+	omap_tsc2301_write(TOUCHSCREEN_CONTROL_REGISTERS_PAGE,
+			TSC2301_TS_CONFIG_CTRL, TSC2301_CONFIG_TIMES);
+
+	omap_tsc2301_write(TOUCHSCREEN_CONTROL_REGISTERS_PAGE,
+			TSC2301_TS_CONFIG2_CTRL, TSC2301_CONFIG_TIMES);
+
+	/*
+	 * Set the TSC controlled mode and slowest rates, this is
+	 * in order to work around the hardware bug documented here:
+	 * http://focus.ti.com/lit/er/slaz003/slaz003.pdf
+	 */
+	omap_tsc2301_write(TOUCHSCREEN_CONTROL_REGISTERS_PAGE,
+			TSC2301_TS_ADC_CTRL, TSC2301_ADC_SLOW);
+
+	/*
+	 * TSC2301-controlled conversions,
+	 * Continuous X, Y, Z1, Z2 scan mode,
+	 * 12-bit samples,
+	 * Average (mean) 4 samples per coordinate,
+	 * 1 MHz internal conversion clock,
+	 * 500 usec panel voltage stabilization delay
+	 */
+	omap_tsc2301_write(TOUCHSCREEN_CONTROL_REGISTERS_PAGE,
+			TSC2301_TS_ADC_CTRL, TSC2301_ADC_CONTROL);
+}
+
+static void palmte_ts_disable(void)
+{
+	/* Stop conversions and power down */
+	omap_tsc2301_write(TOUCHSCREEN_CONTROL_REGISTERS_PAGE,
+			TSC2301_TS_ADC_CTRL, TSC2301_ADC_POWERDOWN);
+	omap_tsc2301_disable();
+}
+
+#ifdef	MODULE
+static void __exit palmte_ts_remove(void)
+{
+	omap_free_gpio(PALMTE_GPIO_NUM);
+}
+#endif
diff -Naur linux-omap-2.6.orig/drivers/ssi/Kconfig linux-omap-2.6/drivers/ssi/Kconfig
--- linux-omap-2.6.orig/drivers/ssi/Kconfig	2006-01-14 14:59:35.000000000 +0000
+++ linux-omap-2.6/drivers/ssi/Kconfig	2006-01-14 15:56:12.000000000 +0000
@@ -15,4 +15,12 @@
 	---help---
 	  Say Y here if you want support for the TSC2101 codec.  It is
 	  needed for touchscreen and audio on OMAP1610 and 1710.
+
+config OMAP_TSC2301
+	depends on ARCH_OMAP1 || ARCH_OMAP15XX
+	tristate "TSC2301 codec support for Touchscreen"
+	select OMAP_UWIRE if MACH_OMAP_PALMTE
+	---help---
+	  Say Y here if you want support for the TSC2301 codec.  It is
+	  needed for the touchscreen driver for OMAP310 and 311.
 endmenu
diff -Naur linux-omap-2.6.orig/drivers/ssi/Makefile linux-omap-2.6/drivers/ssi/Makefile
--- linux-omap-2.6.orig/drivers/ssi/Makefile	2006-01-14 14:59:35.000000000 +0000
+++ linux-omap-2.6/drivers/ssi/Makefile	2006-01-14 15:56:12.000000000 +0000
@@ -4,3 +4,4 @@
 
 obj-$(CONFIG_OMAP_UWIRE)        += omap-uwire.o
 obj-$(CONFIG_OMAP_TSC2101)      += omap-tsc2101.o
+obj-$(CONFIG_OMAP_TSC2301)      += omap-tsc2301.o
diff -Naur linux-omap-2.6.orig/drivers/ssi/omap-tsc2301.c linux-omap-2.6/drivers/ssi/omap-tsc2301.c
--- linux-omap-2.6.orig/drivers/ssi/omap-tsc2301.c	1970-01-01 00:00:00.000000000 +0000
+++ linux-omap-2.6/drivers/ssi/omap-tsc2301.c	2006-01-14 15:56:12.000000000 +0000
@@ -0,0 +1,184 @@
+/*
+ * drivers/ssi/omap-tsc2301.c
+ *
+ * TSC2301 codec interface driver for the OMAP platform
+ *
+ * Copyright (c) 2005 Andrzej Zaborowski  <balrog@zabor.org>
+ * based on the TSC2101 codec interface driver:
+ * Copyright (C) 2004 Texas Instruments, Inc.
+ *
+ * This package is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This package is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this package; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/sched.h>
+#include <linux/errno.h>
+#include <linux/delay.h>
+
+#include <asm/system.h>
+#include <asm/irq.h>
+#include <asm/io.h>
+#include <asm/mach-types.h>
+#include <asm/hardware.h>
+#include <asm/hardware/clock.h>
+
+#include <asm/arch/mux.h>
+#include <asm/arch/io.h>
+#include <asm/arch/hardware.h>
+#include <asm/hardware/tsc2301.h>
+
+#include "omap-tsc2301.h"
+
+#if CONFIG_ARCH_OMAP15XX
+#include <../drivers/ssi/omap-uwire.h>
+#else
+#error "Unsupported configuration"
+#endif
+
+#define SPIO			1
+
+static int count;
+static spinlock_t tsc2301_lock = SPIN_LOCK_UNLOCKED;
+static struct clk *tsc2301_mclk_ck;
+
+static int omap_tsc2301_configure(void);
+
+#define PALMTE_TSC2301_CS	0	/* As opposed to 3 */
+#define CLK_SOFT_REQ_REG_BASE	(0xfffe0800 | 0x34)
+#define SOFT_COM_MCK0_REQ_MASK	(0x1 << 6)
+
+int omap_tsc2301_enable(void)
+{
+	int ret = 0;
+
+	spin_lock(&tsc2301_lock);
+	if (count ++ == 0) {
+		int ret = 0;
+
+		/* Get the MCLK - assuming the rate is at 12000000 */
+		tsc2301_mclk_ck = clk_get(0, "mclk");
+		if (tsc2301_mclk_ck == 0) {
+			printk(KERN_ERR "Unable to get the clock MCLK!!!\n");
+			ret = -EPERM;
+			goto done;
+		}
+
+		clk_enable(tsc2301_mclk_ck);
+
+		ret = omap_tsc2301_configure();
+
+		/* Lock the module */
+		if (!ret && !try_module_get(THIS_MODULE)) {
+			printk(KERN_CRIT "Failed to get TSC module\n");
+			ret = -ESTALE;
+		}
+	}
+
+done:
+	spin_unlock(&tsc2301_lock);
+	return ret;
+}
+
+void omap_tsc2301_disable(void)
+{
+	spin_lock(&tsc2301_lock);
+	if (-- count == 0) {
+		/* Release the MCLK */
+		clk_disable(tsc2301_mclk_ck);
+		clk_put(tsc2301_mclk_ck);
+		tsc2301_mclk_ck = NULL;
+
+		module_put(THIS_MODULE);
+	}
+	spin_unlock(&tsc2301_lock);
+}
+
+void omap_tsc2301_write(int page, u8 address, u16 data)
+{
+
+	int ret = 0;
+	int cs = 0;
+	if (machine_is_omap_palmte())
+		cs = PALMTE_TSC2301_CS;
+
+	/* Address */
+	ret = omap_uwire_data_transfer(cs,
+			(((page) << 11) | (address << 5)), 16,
+			0, NULL, 1);
+	if (ret) {
+		printk(KERN_ERR "uwire-write returned error for address %x\n",
+				address);
+		return;
+	}
+
+	/* Data */
+	ret = omap_uwire_data_transfer(cs, data, 16, 0, NULL, 0);
+	if (ret) {
+		printk(KERN_ERR "uwire-write returned error for address %x\n",
+				address);
+		return;
+	}
+}
+
+void omap_tsc2301_reads(int page, u8 startaddress, u16 *data, int numregs)
+{
+	int cs = 0, i;
+	if (machine_is_omap_palmte())
+		cs = PALMTE_TSC2301_CS;
+
+	/* Address */
+	(void) omap_uwire_data_transfer(cs, 0x8000 | (page << 11) |
+			(startaddress << 5), 16, 0, NULL, 1);
+
+	/* Data */
+	for (i = 0; i < (numregs - 1); i ++, data ++)
+		omap_uwire_data_transfer(cs, 0, 0, 16, data, 1);
+
+	omap_uwire_data_transfer(cs, 0, 0, 16, data, 0);
+}
+
+u16 omap_tsc2301_read(int page, u8 address)
+{
+	u16 ret;
+	omap_tsc2301_reads(page, address, &ret, 1);
+	return ret;
+}
+
+/* FIXME: adapt clock divisors for uwire to current ARM xor clock rate */
+static int omap_tsc2301_configure(void)
+{
+	unsigned long uwire_flags = 0;
+
+	if (machine_is_omap_palmte()) {
+		uwire_flags = UWIRE_READ_RISING_EDGE | UWIRE_WRITE_RISING_EDGE;
+		omap_uwire_configure_mode(PALMTE_TSC2301_CS, uwire_flags);
+	}
+
+	/* Configure MCLK enable */
+	omap_writel(omap_readl(PU_PD_SEL_2) | (1 << 22), PU_PD_SEL_2);	
+
+	return 0;
+}
+
+EXPORT_SYMBOL(omap_tsc2301_enable);
+EXPORT_SYMBOL(omap_tsc2301_read);
+EXPORT_SYMBOL(omap_tsc2301_reads);
+EXPORT_SYMBOL(omap_tsc2301_write);
+EXPORT_SYMBOL(omap_tsc2301_disable);
+
+MODULE_AUTHOR("Andrzej Zaborowski");
+MODULE_DESCRIPTION("Interface driver for TI TSC2301 chips.");
+MODULE_LICENSE("GPL");
diff -Naur linux-omap-2.6.orig/drivers/ssi/omap-tsc2301.h linux-omap-2.6/drivers/ssi/omap-tsc2301.h
--- linux-omap-2.6.orig/drivers/ssi/omap-tsc2301.h	1970-01-01 00:00:00.000000000 +0000
+++ linux-omap-2.6/drivers/ssi/omap-tsc2301.h	2006-01-14 15:56:12.000000000 +0000
@@ -0,0 +1,36 @@
+/*
+ * drivers/ssi/omap-tsc2301.h
+ *
+ * TSC2301 codec interface driver for the OMAP platform
+ *
+ * Copyright (c) 2005 Andrzej Zaborowski  <balrog@zabor.org>
+ * based on the TSC2101 codec interface driver:
+ * Copyright (C) 2004 Texas Instruments, Inc.
+ *
+ * This package is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This package is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this package; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef __OMAP_TSC2301_H
+#define __OMAP_TSC2301_H
+
+extern u16 omap_tsc2301_read(int page, u8 address);
+extern void omap_tsc2301_reads(int page, u8 startaddress, u16 *data,
+		int numregs);
+extern void omap_tsc2301_write(int page, u8 address, u16 data);
+
+extern void omap_tsc2301_disable(void);
+extern int omap_tsc2301_enable(void);
+
+#endif /* __OMAP_TSC2301_H */
diff -Naur linux-omap-2.6.orig/include/asm-arm/hardware/tsc2301.h linux-omap-2.6/include/asm-arm/hardware/tsc2301.h
--- linux-omap-2.6.orig/include/asm-arm/hardware/tsc2301.h	1970-01-01 00:00:00.000000000 +0000
+++ linux-omap-2.6/include/asm-arm/hardware/tsc2301.h	2006-01-14 15:56:12.000000000 +0000
@@ -0,0 +1,116 @@
+/*
+ * include/asm-arm/hardware/tsc2301.h
+ *
+ * TI TSC2301 Touchscreen, Audio and Battery control register definitions 
+ *
+ * Copyright (c) 2005 Andrzej Zaborowski  <balrog@zabor.org>
+ *
+ * This package is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This package is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this package; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef __ASM_HARDWARE_TSC2301_H
+#define __ASM_HARDWARE_TSC2301_H
+
+/* Page 0, Touch Screen & Keypad Data registers */
+#define TSC2301_TS_X			0x00
+#define TSC2301_TS_Y			0x01
+#define TSC2301_TS_Z1			0x02
+#define TSC2301_TS_Z2			0x03
+#define TSC2301_TS_KPDATA		0x04
+#define TSC2301_TS_BAT1			0x05
+#define TSC2301_TS_BAT2			0x06
+#define TSC2301_TS_AUX1			0x07
+#define TSC2301_TS_AUX2			0x08
+#define TSC2301_TS_TEMP1		0x09
+#define TSC2301_TS_TEMP2		0x0a
+#define TSC2301_TS_DAC			0x0b
+
+/* Page 1, Touch Screen & Keypad Control registers */
+#define TSC2301_TS_ADC_CTRL		0x00
+#define TSC2301_TS_KEY_CTRL		0x01
+#define TSC2301_TS_DAC_CTRL		0x02
+#define TSC2301_TS_REF_CTRL		0x03
+#define TSC2301_TS_RESET_CTRL		0x04
+#define TSC2301_TS_CONFIG_CTRL		0x05
+#define TSC2301_TS_CONFIG2_CTRL		0x06
+#define TSC2301_TS_KPMASK		0x10
+
+/* Page 2, Audio Control registers */
+#define TSC2301_AUDIO_CTRL		0x00
+#define TSC2301_ADC_GAIN_CTRL		0x01
+#define TSC2301_DAC_GAIN_CTRL		0x02
+#define TSC2301_ANALOG_GAIN_CTRL	0x03
+#define TSC2301_KEYCLICK_CTRL		0x04
+#define TSC2301_AUDIO_POWER_CTRL	0x05
+#define TSC2301_GPIO			0x06
+#define TSC2301_LCH_BASS_BOOST_N0	0x07
+#define TSC2301_LCH_BASS_BOOST_N1	0x08
+#define TSC2301_LCH_BASS_BOOST_N2	0x09
+#define TSC2301_LCH_BASS_BOOST_N3	0x0a
+#define TSC2301_LCH_BASS_BOOST_N4	0x0b
+#define TSC2301_LCH_BASS_BOOST_N5	0x0c
+#define TSC2301_LCH_BASS_BOOST_D1	0x0d
+#define TSC2301_LCH_BASS_BOOST_D2	0x0e
+#define TSC2301_LCH_BASS_BOOST_D4	0x0f
+#define TSC2301_LCH_BASS_BOOST_D5	0x10
+#define TSC2301_RCH_BASS_BOOST_N0	0x11
+#define TSC2301_RCH_BASS_BOOST_N1	0x12
+#define TSC2301_RCH_BASS_BOOST_N2	0x13
+#define TSC2301_RCH_BASS_BOOST_N3	0x14
+#define TSC2301_RCH_BASS_BOOST_N4	0x15
+#define TSC2301_RCH_BASS_BOOST_N5	0x16
+#define TSC2301_RCH_BASS_BOOST_D1	0x17
+#define TSC2301_RCH_BASS_BOOST_D2	0x18
+#define TSC2301_RCH_BASS_BOOST_D4	0x19
+#define TSC2301_RCH_BASS_BOOST_D5	0x1a
+
+/* Bit field definitions for TS Control */
+#define TSC2301_ADC_CONTROL		0x8874
+#define TSC2301_ADC_POWERDOWN		0x4000
+#define TSC2301_ADC_SLOW		0x07ff
+#define TSC2301_REF_POWERUP		0x0014
+#define TSC2301_CONFIG_TIMES		0x0008
+
+/* Bit position */
+#define TSC2301_BIT(ARG)		(0x01 << (ARG))
+
+/* Field masks for Audio Control */
+#define TSC2301_AC_ADCHPF(ARG)		(((ARG) & 0x03) << 14)
+#define TSC2301_AC_WLEN(ARG)		(((ARG) & 0x03) << 10)
+#define TSC2301_AC_DATFM(ARG)		(((ARG) & 0x03) << 8)
+#define TSC2301_AC_DACFS(ARG)		(((ARG) & 0x07) << 3)
+#define TSC2301_AC_ADCFS(ARG)		(((ARG) & 0x07))
+
+/* Field masks for TSC2301_DAC_GAIN_CTRL */
+#define TSC2301_DGC_DALMU		TSC2301_BIT(15)
+#define TSC2301_DGC_DALVL(ARG)		(((ARG) & 0x7F) << 8)
+#define TSC2301_DGC_DARMU		TSC2301_BIT(7)
+#define TSC2301_DGC_DARVL(ARG)		(((ARG) & 0x7F))
+
+/* Field masks settings for TSC2301_GPIO_CTRL */
+#define TSC2301_DIR5			TSC2301_BIT(13)
+#define TSC2301_DIR4			TSC2301_BIT(12)
+#define TSC2301_DIR3			TSC2301_BIT(11)
+#define TSC2301_DIR2			TSC2301_BIT(10)
+#define TSC2301_DIR1			TSC2301_BIT(9)
+#define TSC2301_DIR0			TSC2301_BIT(8)
+#define TSC2301_GPIO5			TSC2301_BIT(5)
+#define TSC2301_GPIO4			TSC2301_BIT(4)
+#define TSC2301_GPIO3			TSC2301_BIT(3)
+#define TSC2301_GPIO2			TSC2301_BIT(2)
+#define TSC2301_GPIO1			TSC2301_BIT(1)
+#define TSC2301_GPIO0			TSC2301_BIT(0)
+
+#endif	/* __ASM_HARDWARE_TSC2301_H */




























