1 /* SPDX-License-Identifier: GPL-2.0 */
3 * LPC interface for ChromeOS Embedded Controller
5 * Copyright (C) 2016 Google, Inc
8 #ifndef __CROS_EC_LPC_REG_H
9 #define __CROS_EC_LPC_REG_H
12 * cros_ec_lpc_read_bytes - Read bytes from a given LPC-mapped address.
13 * Returns 8-bit checksum of all bytes read.
15 * @offset: Base read address
16 * @length: Number of bytes to read
17 * @dest: Destination buffer
19 u8 cros_ec_lpc_read_bytes(unsigned int offset, unsigned int length, u8 *dest);
22 * cros_ec_lpc_write_bytes - Write bytes to a given LPC-mapped address.
23 * Returns 8-bit checksum of all bytes written.
25 * @offset: Base write address
26 * @length: Number of bytes to write
27 * @msg: Write data buffer
29 u8 cros_ec_lpc_write_bytes(unsigned int offset, unsigned int length, u8 *msg);
32 * cros_ec_lpc_reg_init
34 * Initialize register I/O.
36 void cros_ec_lpc_reg_init(void);
39 * cros_ec_lpc_reg_destroy
43 void cros_ec_lpc_reg_destroy(void);
45 #endif /* __CROS_EC_LPC_REG_H */