Merge current mainline tree into linux-omap tree
[pandora-kernel.git] / include / linux / spi / tsc2101.h
1 /*
2  * include/linux/spi/tsc2101.h
3  *
4  * TSC2101 codec interface driver for the OMAP platform
5  *
6  * Copyright (C) 2004 Texas Instruments, Inc.
7  *
8  * This package is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License version 2 as
10  * published by the Free Software Foundation.
11  *
12  * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
15  *
16  * History:
17  *
18  * 2004/11/07   Nishanth Menon - Provided common hooks for Audio and Touchscreen
19  */
20
21 #ifndef __OMAP_TSC2101_H
22 #define __OMAP_TSC2101_H
23
24 #include <linux/spi/spi.h>
25
26 struct tsc2101_platform_data {
27         int     (*init)(struct spi_device *spi);
28         void    (*cleanup)(struct spi_device *spi);
29         void    (*enable_mclk)(struct spi_device *spi);
30         void    (*disable_mclk)(struct spi_device *spi);
31 };
32
33 extern int tsc2101_read_sync(struct spi_device *spi, int page, u8 address);
34 extern int tsc2101_reads_sync(struct spi_device *spi, int page,
35                                u8 startaddress, u16 * data, int numregs);
36 extern int tsc2101_write_sync(struct spi_device *spi, int page, u8 address,
37                                u16 data);
38
39 extern int tsc2101_enable_mclk(struct spi_device *spi);
40 extern void tsc2101_disable_mclk(struct spi_device *spi);
41
42 #endif
43