blob: a87124d4d5338d2704875c71ba5f6d87c8d41a72 [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;
Russell King9d7f7362009-11-21 12:25:27 +000032 struct i2c_pnx_data *i2c_pnx;
33 struct i2c_adapter adapter;
Vitaly Wool41561f22006-12-10 21:21:29 +010034};
35
36struct i2c_pnx_data {
Russell King9d7f7362009-11-21 12:25:27 +000037 const char *name;
Russell King44c5d732009-11-21 12:10:54 +000038 u32 base;
39 int irq;
Vitaly Wool41561f22006-12-10 21:21:29 +010040};
41
42#endif /* __I2C_PNX_H__ */