Jérôme Pouiller | b0998f0 | 2019-09-19 14:25:40 +0000 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | /* |
| 3 | * Interrupt bottom half. |
| 4 | * |
Jérôme Pouiller | f9dc9f3 | 2020-10-07 12:19:41 +0200 | [diff] [blame] | 5 | * Copyright (c) 2017-2020, Silicon Laboratories, Inc. |
Jérôme Pouiller | b0998f0 | 2019-09-19 14:25:40 +0000 | [diff] [blame] | 6 | * Copyright (c) 2010, ST-Ericsson |
| 7 | */ |
| 8 | #ifndef WFX_BH_H |
| 9 | #define WFX_BH_H |
| 10 | |
Greg Kroah-Hartman | 16d7586 | 2021-03-09 15:51:56 +0100 | [diff] [blame] | 11 | #include <linux/atomic.h> |
| 12 | #include <linux/wait.h> |
| 13 | #include <linux/workqueue.h> |
| 14 | |
Jérôme Pouiller | b0998f0 | 2019-09-19 14:25:40 +0000 | [diff] [blame] | 15 | struct wfx_dev; |
| 16 | |
| 17 | struct wfx_hif { |
| 18 | struct work_struct bh; |
| 19 | struct completion ctrl_ready; |
| 20 | wait_queue_head_t tx_buffers_empty; |
| 21 | atomic_t ctrl_reg; |
| 22 | int rx_seqnum; |
| 23 | int tx_seqnum; |
| 24 | int tx_buffers_used; |
| 25 | }; |
| 26 | |
| 27 | void wfx_bh_register(struct wfx_dev *wdev); |
| 28 | void wfx_bh_unregister(struct wfx_dev *wdev); |
| 29 | void wfx_bh_request_rx(struct wfx_dev *wdev); |
| 30 | void wfx_bh_request_tx(struct wfx_dev *wdev); |
Jérôme Pouiller | 57aa557 | 2020-05-05 14:37:49 +0200 | [diff] [blame] | 31 | void wfx_bh_poll_irq(struct wfx_dev *wdev); |
Jérôme Pouiller | b0998f0 | 2019-09-19 14:25:40 +0000 | [diff] [blame] | 32 | |
| 33 | #endif /* WFX_BH_H */ |