Vitaly Wool | 41561f2 | 2006-12-10 21:21:29 +0100 | [diff] [blame] | 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 | |
Russell King | 2727f22 | 2008-08-08 15:13:27 +0100 | [diff] [blame] | 15 | struct platform_device; |
Russell King | 0321cb8 | 2009-11-20 11:12:26 +0000 | [diff] [blame] | 16 | struct clk; |
Vitaly Wool | 41561f2 | 2006-12-10 21:21:29 +0100 | [diff] [blame] | 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 */ |
Kevin Wells | 4ced24c | 2009-11-12 00:23:00 +0100 | [diff] [blame] | 23 | u8 * buf; /* Data buffer */ |
Vitaly Wool | 41561f2 | 2006-12-10 21:21:29 +0100 | [diff] [blame] | 24 | int len; /* Length of data buffer */ |
Roland Stigge | c076ada4 | 2012-08-08 09:42:32 +0200 | [diff] [blame] | 25 | int order; /* RX Bytes to order via TX */ |
Vitaly Wool | 41561f2 | 2006-12-10 21:21:29 +0100 | [diff] [blame] | 26 | }; |
| 27 | |
| 28 | struct i2c_pnx_algo_data { |
Russell King | 88d968b | 2009-11-21 11:58:36 +0000 | [diff] [blame] | 29 | void __iomem *ioaddr; |
Vitaly Wool | 41561f2 | 2006-12-10 21:21:29 +0100 | [diff] [blame] | 30 | struct i2c_pnx_mif mif; |
| 31 | int last; |
Russell King | 0321cb8 | 2009-11-20 11:12:26 +0000 | [diff] [blame] | 32 | struct clk *clk; |
Russell King | 9d7f736 | 2009-11-21 12:25:27 +0000 | [diff] [blame] | 33 | struct i2c_adapter adapter; |
Roland Stigge | 1451ba3 | 2012-04-22 11:59:47 +0200 | [diff] [blame] | 34 | phys_addr_t base; |
| 35 | int irq; |
Roland Stigge | b41a216 | 2012-04-22 11:59:47 +0200 | [diff] [blame] | 36 | u32 timeout; |
Vitaly Wool | 41561f2 | 2006-12-10 21:21:29 +0100 | [diff] [blame] | 37 | }; |
| 38 | |
| 39 | #endif /* __I2C_PNX_H__ */ |