serial_max3100.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. *
  3. * Copyright (C) 2007 Christian Pellegrin
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. */
  10. #ifndef _LINUX_SERIAL_MAX3100_H
  11. #define _LINUX_SERIAL_MAX3100_H 1
  12. /**
  13. * struct plat_max3100 - MAX3100 SPI UART platform data
  14. * @loopback: force MAX3100 in loopback
  15. * @crystal: 1 for 3.6864 Mhz, 0 for 1.8432
  16. * @max3100_hw_suspend: MAX3100 has a shutdown pin. This is a hook
  17. * called on suspend and resume to activate it.
  18. * @poll_time: poll time for CTS signal in ms, 0 disables (so no hw
  19. * flow ctrl is possible but you have less CPU usage)
  20. *
  21. * You should use this structure in your machine description to specify
  22. * how the MAX3100 is connected. Example:
  23. *
  24. * static struct plat_max3100 max3100_plat_data = {
  25. * .loopback = 0,
  26. * .crystal = 0,
  27. * .poll_time = 100,
  28. * };
  29. *
  30. * static struct spi_board_info spi_board_info[] = {
  31. * {
  32. * .modalias = "max3100",
  33. * .platform_data = &max3100_plat_data,
  34. * .irq = IRQ_EINT12,
  35. * .max_speed_hz = 5*1000*1000,
  36. * .chip_select = 0,
  37. * },
  38. * };
  39. *
  40. **/
  41. struct plat_max3100 {
  42. int loopback;
  43. int crystal;
  44. void (*max3100_hw_suspend) (int suspend);
  45. int poll_time;
  46. };
  47. #endif