1 /*
2  * Copyright (c) 2022 ITE Technology Corporation.
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 #ifndef ZEPHYR_INCLUDE_DT_BINDINGS_SENSOR_IT8XXX2_VCMP_H_
7 #define ZEPHYR_INCLUDE_DT_BINDINGS_SENSOR_IT8XXX2_VCMP_H_
8 
9 /**
10  * @name it8xxx2 voltage comparator channel references
11  * @{
12  */
13 
14 #define VCMP_CHANNEL_0				0
15 #define VCMP_CHANNEL_1				1
16 #define VCMP_CHANNEL_2				2
17 #define VCMP_CHANNEL_3				3
18 #define VCMP_CHANNEL_4				4
19 #define VCMP_CHANNEL_5				5
20 #define VCMP_CHANNEL_CNT			6
21 
22 /** @} */
23 
24 /**
25  * @name it8xxx2 voltage comparator scan period for "all comparator channel"
26  * @{
27  */
28 
29 #define IT8XXX2_VCMP_SCAN_PERIOD_100US		0x10
30 #define IT8XXX2_VCMP_SCAN_PERIOD_200US		0x20
31 #define IT8XXX2_VCMP_SCAN_PERIOD_400US		0x30
32 #define IT8XXX2_VCMP_SCAN_PERIOD_600US		0x40
33 #define IT8XXX2_VCMP_SCAN_PERIOD_800US		0x50
34 #define IT8XXX2_VCMP_SCAN_PERIOD_1MS		0x60
35 #define IT8XXX2_VCMP_SCAN_PERIOD_1_5MS		0x70
36 #define IT8XXX2_VCMP_SCAN_PERIOD_2MS		0x80
37 #define IT8XXX2_VCMP_SCAN_PERIOD_2_5MS		0x90
38 #define IT8XXX2_VCMP_SCAN_PERIOD_3MS		0xa0
39 #define IT8XXX2_VCMP_SCAN_PERIOD_4MS		0xb0
40 #define IT8XXX2_VCMP_SCAN_PERIOD_5MS		0xc0
41 
42 /** @} */
43 
44 /**
45  * @name it8xxx2 voltage comparator interrupt trigger mode
46  * @{
47  */
48 
49 #define IT8XXX2_VCMP_LESS_OR_EQUAL		0
50 #define IT8XXX2_VCMP_GREATER			1
51 #define IT8XXX2_VCMP_UNDEFINED			0xffff
52 
53 /** @} */
54 #endif /* ZEPHYR_INCLUDE_DT_BINDINGS_SENSOR_IT8XXX2_VCMP_H_ */
55