Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox...
[linux-2.6-microblaze.git] / drivers / platform / chrome / cros_ec_lpc_reg.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * LPC interface for ChromeOS Embedded Controller
4  *
5  * Copyright (C) 2016 Google, Inc
6  */
7
8 #ifndef __CROS_EC_LPC_REG_H
9 #define __CROS_EC_LPC_REG_H
10
11 /**
12  * cros_ec_lpc_read_bytes - Read bytes from a given LPC-mapped address.
13  * Returns 8-bit checksum of all bytes read.
14  *
15  * @offset: Base read address
16  * @length: Number of bytes to read
17  * @dest: Destination buffer
18  */
19 u8 cros_ec_lpc_read_bytes(unsigned int offset, unsigned int length, u8 *dest);
20
21 /**
22  * cros_ec_lpc_write_bytes - Write bytes to a given LPC-mapped address.
23  * Returns 8-bit checksum of all bytes written.
24  *
25  * @offset: Base write address
26  * @length: Number of bytes to write
27  * @msg: Write data buffer
28  */
29 u8 cros_ec_lpc_write_bytes(unsigned int offset, unsigned int length, u8 *msg);
30
31 /**
32  * cros_ec_lpc_reg_init
33  *
34  * Initialize register I/O.
35  */
36 void cros_ec_lpc_reg_init(void);
37
38 /**
39  * cros_ec_lpc_reg_destroy
40  *
41  * Cleanup reg I/O.
42  */
43 void cros_ec_lpc_reg_destroy(void);
44
45 #endif /* __CROS_EC_LPC_REG_H */