|
4 | 4 | #ifndef _QUICKSPI_DEV_H_
|
5 | 5 | #define _QUICKSPI_DEV_H_
|
6 | 6 |
|
| 7 | +#include <linux/bits.h> |
7 | 8 | #include <linux/hid-over-spi.h>
|
| 9 | +#include <linux/sizes.h> |
| 10 | +#include <linux/wait.h> |
| 11 | + |
| 12 | +#include "quickspi-protocol.h" |
8 | 13 |
|
9 | 14 | #define PCI_DEVICE_ID_INTEL_THC_MTL_DEVICE_ID_SPI_PORT1 0x7E49
|
10 | 15 | #define PCI_DEVICE_ID_INTEL_THC_MTL_DEVICE_ID_SPI_PORT2 0x7E4B
|
@@ -92,6 +97,21 @@ struct acpi_device;
|
92 | 97 | * @active_ltr_val: THC active LTR value
|
93 | 98 | * @low_power_ltr_val: THC low power LTR value
|
94 | 99 | * @report_descriptor: store a copy of device report descriptor
|
| 100 | + * @input_buf: store a copy of latest input report data |
| 101 | + * @report_buf: store a copy of latest input/output report packet from set/get feature |
| 102 | + * @report_len: the length of input/output report packet |
| 103 | + * @reset_ack_wq: workqueue for waiting reset response from device |
| 104 | + * @reset_ack: indicate reset response received or not |
| 105 | + * @nondma_int_received_wq: workqueue for waiting THC non-DMA interrupt |
| 106 | + * @nondma_int_received: indicate THC non-DMA interrupt received or not |
| 107 | + * @report_desc_got_wq: workqueue for waiting device report descriptor |
| 108 | + * @report_desc_got: indicate device report descritor received or not |
| 109 | + * @set_power_on_wq: workqueue for waiting set power on response from device |
| 110 | + * @set_power_on: indicate set power on response received or not |
| 111 | + * @get_feature_cmpl_wq: workqueue for waiting get feature response from device |
| 112 | + * @get_feature_cmpl: indicate get feature received or not |
| 113 | + * @set_feature_cmpl_wq: workqueue for waiting set feature to device |
| 114 | + * @set_feature_cmpl: indicate set feature send complete or not |
95 | 115 | */
|
96 | 116 | struct quickspi_device {
|
97 | 117 | struct device *dev;
|
@@ -121,6 +141,24 @@ struct quickspi_device {
|
121 | 141 | u32 low_power_ltr_val;
|
122 | 142 |
|
123 | 143 | u8 *report_descriptor;
|
| 144 | + u8 *input_buf; |
| 145 | + u8 *report_buf; |
| 146 | + u32 report_len; |
| 147 | + |
| 148 | + wait_queue_head_t reset_ack_wq; |
| 149 | + bool reset_ack; |
| 150 | + |
| 151 | + wait_queue_head_t nondma_int_received_wq; |
| 152 | + bool nondma_int_received; |
| 153 | + |
| 154 | + wait_queue_head_t report_desc_got_wq; |
| 155 | + bool report_desc_got; |
| 156 | + |
| 157 | + wait_queue_head_t get_report_cmpl_wq; |
| 158 | + bool get_report_cmpl; |
| 159 | + |
| 160 | + wait_queue_head_t set_report_cmpl_wq; |
| 161 | + bool set_report_cmpl; |
124 | 162 | };
|
125 | 163 |
|
126 | 164 | #endif /* _QUICKSPI_DEV_H_ */
|
0 commit comments