i2c-pnx.h 1.1 KB

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. #include <asm/arch/i2c.h>
  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. char * 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. int (*suspend) (struct platform_device *pdev, pm_message_t state);
  31. int (*resume) (struct platform_device *pdev);
  32. u32 (*calculate_input_freq) (struct platform_device *pdev);
  33. int (*set_clock_run) (struct platform_device *pdev);
  34. int (*set_clock_stop) (struct platform_device *pdev);
  35. struct i2c_adapter *adapter;
  36. };
  37. #endif /* __I2C_PNX_H__ */