Merge current mainline tree into linux-omap tree
[pandora-kernel.git] / drivers / input / touchscreen / omap / omap_ts.h
1 /*
2  * omap_ts.h - header file for OMAP touchscreen support
3  * 
4  * Copyright (c) 2002 MontaVista Software Inc.
5  * Copyright (c) 2004 Texas Instruments, Inc.
6  *
7  * Assembled using driver code copyright the companies above.
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22  */
23
24 #ifndef __OMAP_TS_H
25 #define __OMAP_TS_H
26
27 #ifdef DEBUG
28 #define DEBUG_TS(fmt...)   printk(fmt)
29 #else
30 #define DEBUG_TS(fmt...)   do { } while (0)
31 #endif
32
33 struct omap_ts_t;
34
35 struct ts_device {
36         int  (*probe)   (struct omap_ts_t *);
37         void (*read)    (u16 *);
38         void (*enable)  (void);
39         void (*disable) (void);
40         void (*remove)  (void);
41         int  (*penup)  (void);
42 };
43
44 struct omap_ts_t{
45         struct input_dev * inputdevice;
46         struct timer_list ts_timer;      // Timer for triggering acquisitions
47         int touched;
48         int irq;
49         int irq_type;
50         int irq_enabled;
51         struct ts_device *dev;
52         spinlock_t lock;
53 };
54
55 extern struct ts_device hx_ts;
56
57 #endif /* __OMAP_TS_H */