i2c-pnx.h 946 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. #ifndef __I2C_PNX_H__
  12. #define __I2C_PNX_H__
  13. struct platform_device;
  14. struct clk;
  15. struct i2c_pnx_mif {
  16. int ret; /* Return value */
  17. int mode; /* Interface mode */
  18. struct completion complete; /* I/O completion */
  19. struct timer_list timer; /* Timeout */
  20. u8 * buf; /* Data buffer */
  21. int len; /* Length of data buffer */
  22. };
  23. struct i2c_pnx_algo_data {
  24. void __iomem *ioaddr;
  25. struct i2c_pnx_mif mif;
  26. int last;
  27. struct clk *clk;
  28. struct i2c_pnx_data *i2c_pnx;
  29. struct i2c_adapter adapter;
  30. };
  31. struct i2c_pnx_data {
  32. const char *name;
  33. u32 base;
  34. int irq;
  35. };
  36. #endif /* __I2C_PNX_H__ */