serial_max3100.h 1.2 KB

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