blob: f13255e06406aa9eb7a8c60485599b960a976f8b [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 +010015#include <linux/pm.h>
16
17struct platform_device;
Vitaly Wool41561f22006-12-10 21:21:29 +010018
19struct i2c_pnx_mif {
20 int ret; /* Return value */
21 int mode; /* Interface mode */
22 struct completion complete; /* I/O completion */
23 struct timer_list timer; /* Timeout */
24 char * buf; /* Data buffer */
25 int len; /* Length of data buffer */
26};
27
28struct i2c_pnx_algo_data {
29 u32 base;
30 u32 ioaddr;
31 int irq;
32 struct i2c_pnx_mif mif;
33 int last;
34};
35
36struct i2c_pnx_data {
37 int (*suspend) (struct platform_device *pdev, pm_message_t state);
38 int (*resume) (struct platform_device *pdev);
39 u32 (*calculate_input_freq) (struct platform_device *pdev);
40 int (*set_clock_run) (struct platform_device *pdev);
41 int (*set_clock_stop) (struct platform_device *pdev);
42 struct i2c_adapter *adapter;
43};
44
45#endif /* __I2C_PNX_H__ */