Revert "unicode: Don't special case ignorable code points"
[linux.git] / drivers / platform / chrome / cros_ec_proto_test_util.h
blob414002271c9c0c5efde31a79d9d2e5624698a0e5
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * CrOS Kunit tests utilities.
4 */
6 #ifndef _CROS_KUNIT_UTIL_H_
7 #define _CROS_KUNIT_UTIL_H_
9 #include <linux/platform_data/cros_ec_proto.h>
11 struct ec_xfer_mock {
12 struct list_head list;
13 struct kunit *test;
15 /* input */
16 struct cros_ec_command msg;
17 void *i_data;
19 /* output */
20 int ret;
21 int result;
22 void *o_data;
23 u32 o_data_len;
26 extern int cros_kunit_ec_xfer_mock_default_result;
27 extern int cros_kunit_ec_xfer_mock_default_ret;
28 extern int cros_kunit_ec_cmd_xfer_mock_called;
29 extern int cros_kunit_ec_pkt_xfer_mock_called;
31 int cros_kunit_ec_xfer_mock(struct cros_ec_device *ec_dev, struct cros_ec_command *msg);
32 int cros_kunit_ec_cmd_xfer_mock(struct cros_ec_device *ec_dev, struct cros_ec_command *msg);
33 int cros_kunit_ec_pkt_xfer_mock(struct cros_ec_device *ec_dev, struct cros_ec_command *msg);
34 struct ec_xfer_mock *cros_kunit_ec_xfer_mock_add(struct kunit *test, size_t size);
35 struct ec_xfer_mock *cros_kunit_ec_xfer_mock_addx(struct kunit *test,
36 int ret, int result, size_t size);
37 struct ec_xfer_mock *cros_kunit_ec_xfer_mock_next(void);
39 extern int cros_kunit_readmem_mock_offset;
40 extern u8 *cros_kunit_readmem_mock_data;
41 extern int cros_kunit_readmem_mock_ret;
43 int cros_kunit_readmem_mock(struct cros_ec_device *ec_dev, unsigned int offset,
44 unsigned int bytes, void *dest);
46 void cros_kunit_mock_reset(void);
48 #endif