mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-09-01 06:39:05 +00:00

Intel QuickSPI driver uses THC hardware to accelerate HID over SPI (HIDSPI) protocol flow. This patch implements all data flows described in HID over SPI protocol SPEC by using THC hardware layer APIs. HID over SPI SPEC: https://www.microsoft.com/download/details.aspx?id=103325 Co-developed-by: Xinpeng Sun <xinpeng.sun@intel.com> Signed-off-by: Xinpeng Sun <xinpeng.sun@intel.com> Signed-off-by: Even Xu <even.xu@intel.com> Tested-by: Rui Zhang <rui1.zhang@intel.com> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Aaron Ma <aaron.ma@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
26 lines
804 B
C
26 lines
804 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/* Copyright (c) 2024 Intel Corporation */
|
|
|
|
#ifndef _QUICKSPI_PROTOCOL_H_
|
|
#define _QUICKSPI_PROTOCOL_H_
|
|
|
|
#include <linux/hid-over-spi.h>
|
|
|
|
#define QUICKSPI_ACK_WAIT_TIMEOUT 5
|
|
|
|
struct quickspi_device;
|
|
|
|
void quickspi_handle_input_data(struct quickspi_device *qsdev, u32 buf_len);
|
|
int quickspi_get_report(struct quickspi_device *qsdev, u8 report_type,
|
|
unsigned int report_id, void *buf);
|
|
int quickspi_set_report(struct quickspi_device *qsdev, u8 report_type,
|
|
unsigned int report_id, void *buf, u32 buf_len);
|
|
int quickspi_get_report_descriptor(struct quickspi_device *qsdev);
|
|
|
|
int quickspi_set_power(struct quickspi_device *qsdev,
|
|
enum hidspi_power_state power_state);
|
|
|
|
int reset_tic(struct quickspi_device *qsdev);
|
|
|
|
#endif /* _QUICKSPI_PROTOCOL_H_ */
|