15 #define PROTO3_MAX_PACKET_SIZE 268
34 static int crosec_spi_io(
size_t req_size,
size_t resp_size,
void *context)
46 udelay(CONFIG_EC_GOOGLE_CHROMEEC_SPI_WAKEUP_DELAY_US);
70 "%s: Timeout waiting for framing byte.\n",
95 CONFIG_EC_GOOGLE_CHROMEEC_SPI_CHIP, &
slave))
#define printk(level,...)
int crosec_command_proto(struct chromeec_command *cec_command, crosec_io_t crosec_io, void *context)
int google_chromeec_command(struct chromeec_command *cec_command)
Send a command to a CrOS EC.
static uint8_t req_buf[PROTO3_MAX_PACKET_SIZE]
static uint8_t resp_buf[PROTO3_MAX_PACKET_SIZE]
static struct stopwatch cs_cooldown_sw
enum host_event_code google_chromeec_get_event(void)
static int crosec_spi_io(size_t req_size, size_t resp_size, void *context)
#define PROTO3_MAX_PACKET_SIZE
static const long cs_cooldown_us
static const uint8_t EcFramingByte
void * crosec_get_buffer(size_t size, int req)
static int stopwatch_expired(struct stopwatch *sw)
static void stopwatch_init(struct stopwatch *sw)
static void stopwatch_wait_until_expired(struct stopwatch *sw)
static void stopwatch_init_usecs_expire(struct stopwatch *sw, long us)
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
int spi_claim_bus(const struct spi_slave *slave)
int spi_xfer(const struct spi_slave *slave, const void *dout, size_t bytesout, void *din, size_t bytesin)
void spi_release_bus(const struct spi_slave *slave)
int spi_setup_slave(unsigned int bus, unsigned int cs, struct spi_slave *slave)
static struct spi_slave slave