forked from thesofproject/sof
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspi.h
More file actions
42 lines (33 loc) · 836 Bytes
/
spi.h
File metadata and controls
42 lines (33 loc) · 836 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright(c) 2017 Intel Corporation. All rights reserved.
*
* Author: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
*/
#ifndef __SOF_DRIVERS_SPI_H__
#define __SOF_DRIVERS_SPI_H__
#include <stddef.h>
#include <stdint.h>
enum spi_type {
SOF_SPI_INTEL_SLAVE,
SOF_SPI_INTEL_MASTER,
};
enum spi_xfer_direction {
SPI_DIR_RX,
SPI_DIR_TX,
};
struct spi_plat_fifo_data {
uint32_t handshake;
};
struct spi_platform_data {
uint32_t base;
struct spi_plat_fifo_data fifo[2];
enum spi_type type;
};
struct spi;
int spi_push(struct spi *spi, const void *data, size_t size);
int spi_probe(struct spi *spi);
struct spi *spi_get(enum spi_type type);
int spi_install(const struct spi_platform_data *plat, size_t n);
void spi_init(void);
#endif /* __SOF_DRIVERS_SPI_H__ */