msm_serial_hs.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Copyright (C) 2008 Google, Inc.
  3. * Author: Nick Pelly <npelly@google.com>
  4. *
  5. * This software is licensed under the terms of the GNU General Public
  6. * License version 2, as published by the Free Software Foundation, and
  7. * may be copied, distributed, and modified under those terms.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. */
  14. #ifndef __ASM_ARCH_MSM_SERIAL_HS_H
  15. #define __ASM_ARCH_MSM_SERIAL_HS_H
  16. #include <linux/serial_core.h>
  17. /* API to request the uart clock off or on for low power management
  18. * Clients should call request_clock_off() when no uart data is expected,
  19. * and must call request_clock_on() before any further uart data can be
  20. * received. */
  21. extern void msm_hs_request_clock_off(struct uart_port *uport);
  22. extern void msm_hs_request_clock_on(struct uart_port *uport);
  23. /**
  24. * struct msm_serial_hs_platform_data
  25. * @rx_wakeup_irq: Rx activity irq
  26. * @rx_to_inject: extra character to be inserted to Rx tty on wakeup
  27. * @inject_rx: 1 = insert rx_to_inject. 0 = do not insert extra character
  28. * @exit_lpm_cb: function called before every Tx transaction
  29. *
  30. * This is an optional structure required for UART Rx GPIO IRQ based
  31. * wakeup from low power state. UART wakeup can be triggered by RX activity
  32. * (using a wakeup GPIO on the UART RX pin). This should only be used if
  33. * there is not a wakeup GPIO on the UART CTS, and the first RX byte is
  34. * known (eg., with the Bluetooth Texas Instruments HCILL protocol),
  35. * since the first RX byte will always be lost. RTS will be asserted even
  36. * while the UART is clocked off in this mode of operation.
  37. */
  38. struct msm_serial_hs_platform_data {
  39. int rx_wakeup_irq;
  40. unsigned char inject_rx_on_wakeup;
  41. char rx_to_inject;
  42. void (*exit_lpm_cb)(struct uart_port *);
  43. };
  44. #endif