1# Microchip mec15xx tachometer sensor configuration options
2
3# Copyright (c) 2020 Intel Corporation
4# SPDX-License-Identifier: Apache-2.0
5
6config TACH_XEC
7	bool "XEC Tachometer sensor"
8	default y
9	depends on DT_HAS_MICROCHIP_XEC_TACH_ENABLED
10	depends on SOC_FAMILY_MEC
11	select PINCTRL
12	help
13	  Enable the Microchip XEC tachometer sensor.
14
15if TACH_XEC
16
17choice
18	prompt "Number of tach edges"
19	default TACH_XEC_5_TACH_EDGES
20	help
21	 This value represents the number of Tach edges that
22	 will be used to determine the interval for which the number of
23	 100KHz pulses will be counted.
24
25config TACH_XEC_9_TACH_EDGES
26	bool "Configure 9 tach edges or 4 tach periods"
27
28config TACH_XEC_5_TACH_EDGES
29	bool "Configure 5 tach edges or 2 tach periods"
30
31config TACH_XEC_3_TACH_EDGES
32	bool "Configure 3 tach edges or 1 tach period"
33
34config TACH_XEC_2_TACH_EDGES
35	bool "Configure 2 tach edges or 1/2 tach period"
36
37endchoice
38
39config TACH_XEC_EDGES
40	int
41	range 0 3
42	default 0 if TACH_XEC_2_TACH_EDGES
43	default 1 if TACH_XEC_3_TACH_EDGES
44	default 2 if TACH_XEC_5_TACH_EDGES
45	default 3 if TACH_XEC_9_TACH_EDGES
46
47endif #TACH_XEC
48