blob: 9ebdf882d032b4994feda64adfe0c7e5e84f5d58 [file] [log] [blame]
Vitaly Wool41561f22006-12-10 21:21:29 +01001/*
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
Russell King2727f222008-08-08 15:13:27 +010015struct platform_device;
Russell King0321cb82009-11-20 11:12:26 +000016struct clk;
Vitaly Wool41561f22006-12-10 21:21:29 +010017
18struct 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 */
Kevin Wells4ced24c2009-11-12 00:23:00 +010023 u8 * buf; /* Data buffer */
Vitaly Wool41561f22006-12-10 21:21:29 +010024 int len; /* Length of data buffer */
25};
26
27struct i2c_pnx_algo_data {
Russell King88d968b2009-11-21 11:58:36 +000028 void __iomem *ioaddr;
Vitaly Wool41561f22006-12-10 21:21:29 +010029 struct i2c_pnx_mif mif;
30 int last;
Russell King0321cb82009-11-20 11:12:26 +000031 struct clk *clk;
Vitaly Wool41561f22006-12-10 21:21:29 +010032};
33
34struct i2c_pnx_data {
Vitaly Wool41561f22006-12-10 21:21:29 +010035 struct i2c_adapter *adapter;
Russell King44c5d732009-11-21 12:10:54 +000036 u32 base;
37 int irq;
Vitaly Wool41561f22006-12-10 21:21:29 +010038};
39
40#endif /* __I2C_PNX_H__ */