i2c-pnx.h 1.0 KB

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 i2c_pnx_mif {
  15. int ret; /* Return value */
  16. int mode; /* Interface mode */
  17. struct completion complete; /* I/O completion */
  18. struct timer_list timer; /* Timeout */
  19. u8 * buf; /* Data buffer */
  20. int len; /* Length of data buffer */
  21. };
  22. struct i2c_pnx_algo_data {
  23. u32 base;
  24. u32 ioaddr;
  25. int irq;
  26. struct i2c_pnx_mif mif;
  27. int last;
  28. };
  29. struct i2c_pnx_data {
  30. u32 (*calculate_input_freq) (struct platform_device *pdev);
  31. int (*set_clock_run) (struct platform_device *pdev);
  32. int (*set_clock_stop) (struct platform_device *pdev);
  33. struct i2c_adapter *adapter;
  34. };
  35. #endif /* __I2C_PNX_H__ */