688e29262a43d7f11f957f84a32c7f059a7539f1
[safe/jmp/linux-2.6] / include / linux / i2c-pnx.h
1 /*
2  * Header file for I2C support on PNX010x/4008.
3  *
4  * Author: Dennis Kovalev <dkovalev@ru.mvista.com>
5  *
6  * 2004-2006 (c) MontaVista Software, Inc. This file is licensed under
7  * the terms of the GNU General Public License version 2. This program
8  * is licensed "as is" without any warranty of any kind, whether express
9  * or implied.
10  */
11
12 #ifndef __I2C_PNX_H__
13 #define __I2C_PNX_H__
14
15 struct platform_device;
16 struct clk;
17
18 struct i2c_pnx_mif {
19         int                     ret;            /* Return value */
20         int                     mode;           /* Interface mode */
21         struct completion       complete;       /* I/O completion */
22         struct timer_list       timer;          /* Timeout */
23         u8 *                    buf;            /* Data buffer */
24         int                     len;            /* Length of data buffer */
25 };
26
27 struct i2c_pnx_algo_data {
28         u32                     base;
29         u32                     ioaddr;
30         int                     irq;
31         struct i2c_pnx_mif      mif;
32         int                     last;
33         struct clk              *clk;
34 };
35
36 struct i2c_pnx_data {
37         u32 (*calculate_input_freq) (struct platform_device *pdev);
38         struct i2c_adapter *adapter;
39 };
40
41 #endif /* __I2C_PNX_H__ */