blob: 6e8efb7afd7c870ccf362b0cd09e1c447d839a26 [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_adapter adapter;
Roland Stigge1451ba32012-04-22 11:59:47 +020033 phys_addr_t base;
34 int irq;
Vitaly Wool41561f22006-12-10 21:21:29 +010035};
36
37#endif /* __I2C_PNX_H__ */