2006-12-10 20:21:29 +00:00
|
|
|
/*
|
|
|
|
* Header file for I2C support on PNX010x/4008.
|
|
|
|
*
|
|
|
|
* Author: Dennis Kovalev <dkovalev@ru.mvista.com>
|
|
|
|
*
|
|
|
|
* 2004-2006 (c) MontaVista Software, Inc. This file is licensed under
|
|
|
|
* the terms of the GNU General Public License version 2. This program
|
|
|
|
* is licensed "as is" without any warranty of any kind, whether express
|
|
|
|
* or implied.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __I2C_PNX_H__
|
|
|
|
#define __I2C_PNX_H__
|
|
|
|
|
2008-08-08 14:13:27 +00:00
|
|
|
struct platform_device;
|
2009-11-20 11:12:26 +00:00
|
|
|
struct clk;
|
2006-12-10 20:21:29 +00:00
|
|
|
|
|
|
|
struct i2c_pnx_mif {
|
|
|
|
int ret; /* Return value */
|
|
|
|
int mode; /* Interface mode */
|
|
|
|
struct completion complete; /* I/O completion */
|
|
|
|
struct timer_list timer; /* Timeout */
|
2009-11-11 23:23:00 +00:00
|
|
|
u8 * buf; /* Data buffer */
|
2006-12-10 20:21:29 +00:00
|
|
|
int len; /* Length of data buffer */
|
2012-08-08 07:42:32 +00:00
|
|
|
int order; /* RX Bytes to order via TX */
|
2006-12-10 20:21:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct i2c_pnx_algo_data {
|
2009-11-21 11:58:36 +00:00
|
|
|
void __iomem *ioaddr;
|
2006-12-10 20:21:29 +00:00
|
|
|
struct i2c_pnx_mif mif;
|
|
|
|
int last;
|
2009-11-20 11:12:26 +00:00
|
|
|
struct clk *clk;
|
2009-11-21 12:25:27 +00:00
|
|
|
struct i2c_adapter adapter;
|
2012-04-22 09:59:47 +00:00
|
|
|
phys_addr_t base;
|
|
|
|
int irq;
|
2012-04-22 09:59:47 +00:00
|
|
|
u32 timeout;
|
2006-12-10 20:21:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* __I2C_PNX_H__ */
|