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; |
Vitaly Wool | 41561f2 | 2006-12-10 21:21:29 +0100 | [diff] [blame] | 16 | |
| 17 | struct i2c_pnx_mif { |
| 18 | int ret; /* Return value */ |
| 19 | int mode; /* Interface mode */ |
| 20 | struct completion complete; /* I/O completion */ |
| 21 | struct timer_list timer; /* Timeout */ |
Kevin Wells | 4ced24c | 2009-11-12 00:23:00 +0100 | [diff] [blame] | 22 | u8 * buf; /* Data buffer */ |
Vitaly Wool | 41561f2 | 2006-12-10 21:21:29 +0100 | [diff] [blame] | 23 | int len; /* Length of data buffer */ |
| 24 | }; |
| 25 | |
| 26 | struct i2c_pnx_algo_data { |
| 27 | u32 base; |
| 28 | u32 ioaddr; |
| 29 | int irq; |
| 30 | struct i2c_pnx_mif mif; |
| 31 | int last; |
| 32 | }; |
| 33 | |
| 34 | struct i2c_pnx_data { |
Vitaly Wool | 41561f2 | 2006-12-10 21:21:29 +0100 | [diff] [blame] | 35 | u32 (*calculate_input_freq) (struct platform_device *pdev); |
| 36 | int (*set_clock_run) (struct platform_device *pdev); |
| 37 | int (*set_clock_stop) (struct platform_device *pdev); |
| 38 | struct i2c_adapter *adapter; |
| 39 | }; |
| 40 | |
| 41 | #endif /* __I2C_PNX_H__ */ |