2 * Copyright (C) 2015-2021 Espressif Systems (Shanghai) PTE LTD
4 * This software file (the "File") is distributed by Espressif Systems (Shanghai)
5 * PTE LTD under the terms of the GNU General Public License Version 2, June 1991
6 * (the "License"). You may use, redistribute and/or modify this File in
7 * accordance with the terms and conditions of the License, a copy of which
8 * is available by writing to the Free Software Foundation, Inc.,
9 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
10 * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
12 * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
13 * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
14 * ARE EXPRESSLY DISCLAIMED. The License provides additional details about
15 * this warranty disclaimer.
22 #define HANDSHAKE_PIN 22
23 #define SPI_IRQ gpio_to_irq(HANDSHAKE_PIN)
24 #define SPI_DATA_READY_PIN 27
25 #define SPI_DATA_READY_IRQ gpio_to_irq(SPI_DATA_READY_PIN)
26 #define SPI_BUF_SIZE 1600
28 struct esp_spi_context {
29 struct esp_adapter *adapter;
30 struct spi_device *esp_spi_dev;
31 struct sk_buff_head tx_q[MAX_PRIORITY_QUEUES];
32 struct sk_buff_head rx_q[MAX_PRIORITY_QUEUES];
33 struct workqueue_struct *spi_workqueue;
34 struct work_struct spi_work;
35 struct workqueue_struct *nw_cmd_reinit_workqueue;
36 struct work_struct nw_cmd_reinit_work;
38 uint8_t spi_gpio_enabled;