#include "ssp.h"
#define SSP_DEV …
#define SSP_GET_MESSAGE_TYPE(data) …
#define SSP_MSG2AP_INST_BYPASS_DATA …
#define SSP_MSG2AP_INST_LIBRARY_DATA …
#define SSP_MSG2AP_INST_DEBUG_DATA …
#define SSP_MSG2AP_INST_BIG_DATA …
#define SSP_MSG2AP_INST_META_DATA …
#define SSP_MSG2AP_INST_TIME_SYNC …
#define SSP_MSG2AP_INST_RESET …
#define SSP_UNIMPLEMENTED …
struct ssp_msg_header { … } __attribute__((packed));
struct ssp_msg { … };
static const int ssp_offset_map[SSP_SENSOR_MAX] = …;
#define SSP_HEADER_SIZE …
#define SSP_HEADER_SIZE_ALIGNED …
static struct ssp_msg *ssp_create_msg(u8 cmd, u16 len, u16 opt, u32 data)
{ … }
static inline void ssp_fill_buffer(struct ssp_msg *m, unsigned int offset,
const void *src, unsigned int len)
{ … }
static inline void ssp_get_buffer(struct ssp_msg *m, unsigned int offset,
void *dest, unsigned int len)
{ … }
#define SSP_GET_BUFFER_AT_INDEX(m, index) …
#define SSP_SET_BUFFER_AT_INDEX(m, index, val) …
static void ssp_clean_msg(struct ssp_msg *m)
{ … }
static int ssp_print_mcu_debug(char *data_frame, int *data_index,
int received_len)
{ … }
static int ssp_check_lines(struct ssp_data *data, bool state)
{ … }
static int ssp_do_transfer(struct ssp_data *data, struct ssp_msg *msg,
struct completion *done, int timeout)
{ … }
static inline int ssp_spi_sync_command(struct ssp_data *data,
struct ssp_msg *msg)
{ … }
static int ssp_spi_sync(struct ssp_data *data, struct ssp_msg *msg,
int timeout)
{ … }
static int ssp_handle_big_data(struct ssp_data *data, char *dataframe, int *idx)
{ … }
static int ssp_parse_dataframe(struct ssp_data *data, char *dataframe, int len)
{ … }
int ssp_irq_msg(struct ssp_data *data)
{ … }
void ssp_clean_pending_list(struct ssp_data *data)
{ … }
int ssp_command(struct ssp_data *data, char command, int arg)
{ … }
int ssp_send_instruction(struct ssp_data *data, u8 inst, u8 sensor_type,
u8 *send_buf, u8 length)
{ … }
int ssp_get_chipid(struct ssp_data *data)
{ … }
int ssp_set_magnetic_matrix(struct ssp_data *data)
{ … }
unsigned int ssp_get_sensor_scanning_info(struct ssp_data *data)
{ … }
unsigned int ssp_get_firmware_rev(struct ssp_data *data)
{ … }