bh.h 758 B

12345678910111213141516171819202122232425262728293031323334
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Interrupt bottom half (BH).
  4. *
  5. * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  6. * Copyright (c) 2010, ST-Ericsson
  7. */
  8. #ifndef WFX_BH_H
  9. #define WFX_BH_H
  10. #include <linux/atomic.h>
  11. #include <linux/wait.h>
  12. #include <linux/completion.h>
  13. #include <linux/workqueue.h>
  14. struct wfx_dev;
  15. struct wfx_hif {
  16. struct work_struct bh;
  17. struct completion ctrl_ready;
  18. wait_queue_head_t tx_buffers_empty;
  19. atomic_t ctrl_reg;
  20. int rx_seqnum;
  21. int tx_seqnum;
  22. int tx_buffers_used;
  23. };
  24. void wfx_bh_register(struct wfx_dev *wdev);
  25. void wfx_bh_unregister(struct wfx_dev *wdev);
  26. void wfx_bh_request_rx(struct wfx_dev *wdev);
  27. void wfx_bh_request_tx(struct wfx_dev *wdev);
  28. void wfx_bh_poll_irq(struct wfx_dev *wdev);
  29. #endif