upload tizen1.0 source
[kernel/linux-2.6.36.git] / include / linux / i2c / mcs.h
1 /*
2  * Copyright (C) 2009 - 2010 Samsung Electronics Co.Ltd
3  * Author: Joonyoung Shim <jy0922.shim@samsung.com>
4  * Author: HeungJun Kim <riverful.kim@samsung.com>
5  *
6  *  This program is free software; you can redistribute  it and/or modify it
7  *  under  the terms of  the GNU General  Public License as published by the
8  *  Free Software Foundation;  either version 2 of the  License, or (at your
9  *  option) any later version.
10  *
11  */
12
13 #ifndef __LINUX_MCS_H
14 #define __LINUX_MCS_H
15
16 #define MCS_KEY_MAP(v, c)       ((((v) & 0xff) << 16) | ((c) & 0xffff))
17 #define MCS_KEY_VAL(v)          (((v) >> 16) & 0xff)
18 #define MCS_KEY_CODE(v)         ((v) & 0xffff)
19
20 struct mcs_platform_data {
21         void (*cfg_pin)(void);
22
23         /* touchscreen */
24         unsigned int x_size;
25         unsigned int y_size;
26
27         /* touchkey */
28         void (*poweron)(bool);
29         void (*cfg_pin_fw)(int);
30         unsigned int fw_ver;            /* Firmware Version */
31         unsigned int md_ver;            /* Module Version */
32         const u32 *keymap;
33         unsigned int keymap_size;
34         unsigned int key_maxval;
35         bool no_autorepeat;
36 };
37
38 extern int mcsdl_download_binary_data(void);
39 extern int mcsdl_set_i2c_client(struct i2c_client *c);
40
41 #endif  /* __LINUX_MCS_H */