i2c-pnx.h 953 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. u32 base;
  25. u32 ioaddr;
  26. int irq;
  27. struct i2c_pnx_mif mif;
  28. int last;
  29. struct clk *clk;
  30. };
  31. struct i2c_pnx_data {
  32. u32 (*calculate_input_freq) (struct platform_device *pdev);
  33. struct i2c_adapter *adapter;
  34. };
  35. #endif /* __I2C_PNX_H__ */