1# ST Microelectronics IIS2ICLX 2-axis accelerometer sensor driver
2
3# Copyright (c) 2020 STMicroelectronics
4# SPDX-License-Identifier: Apache-2.0
5
6menuconfig IIS2ICLX
7	bool "IIS2ICLX I2C/SPI accelerometer Chip"
8	default y
9	depends on DT_HAS_ST_IIS2ICLX_ENABLED
10	depends on ZEPHYR_HAL_ST_MODULE
11	select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_IIS2ICLX),i2c)
12	select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_IIS2ICLX),spi)
13	select HAS_STMEMSC
14	select USE_STDC_IIS2ICLX
15	help
16	  Enable driver for IIS2ICLX accelerometer
17	  sensor.
18
19if IIS2ICLX
20
21choice IIS2ICLX_TRIGGER_MODE
22	prompt "Trigger mode"
23	help
24	  Specify the type of triggering to be used by the driver.
25
26config IIS2ICLX_TRIGGER_NONE
27	bool "No trigger"
28
29config IIS2ICLX_TRIGGER_GLOBAL_THREAD
30	bool "Use global thread"
31	depends on GPIO
32	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_ST_IIS2ICLX),drdy-gpios)
33	select IIS2ICLX_TRIGGER
34
35config IIS2ICLX_TRIGGER_OWN_THREAD
36	bool "Use own thread"
37	depends on GPIO
38	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_ST_IIS2ICLX),drdy-gpios)
39	select IIS2ICLX_TRIGGER
40
41endchoice
42
43config IIS2ICLX_TRIGGER
44	bool
45
46if IIS2ICLX_TRIGGER
47
48config IIS2ICLX_THREAD_PRIORITY
49	int "Thread priority"
50	depends on IIS2ICLX_TRIGGER_OWN_THREAD
51	default 10
52	help
53	  Priority of thread used by the driver to handle interrupts.
54
55config IIS2ICLX_THREAD_STACK_SIZE
56	int "Thread stack size"
57	depends on IIS2ICLX_TRIGGER_OWN_THREAD
58	default 1024
59	help
60	  Stack size of thread used by the driver to handle interrupts.
61
62endif # IIS2ICLX_TRIGGER
63
64config IIS2ICLX_ENABLE_TEMP
65	bool "Temperature"
66	help
67	  Enable/disable temperature
68
69config IIS2ICLX_SENSORHUB
70	bool "I2C sensorhub feature"
71	help
72	  Enable/disable internal sensorhub. You can enable
73	  a maximum of two external sensors (if more than two are enabled
74	  the system would enumerate only the first two found)
75
76if IIS2ICLX_SENSORHUB
77
78config IIS2ICLX_EXT_LIS2MDL
79	bool "LIS2MDL as external sensor"
80
81config IIS2ICLX_EXT_IIS2MDC
82	bool "IIS2MDC as external sensor"
83
84config IIS2ICLX_EXT_LPS22HH
85	bool "LPS22HH as external sensor"
86
87config IIS2ICLX_EXT_HTS221
88	bool "HTS221 as external sensor"
89
90config IIS2ICLX_EXT_LPS22HB
91	bool "LPS22HB as external sensor"
92
93endif # IIS2ICLX_SENSORHUB
94
95endif # IIS2ICLX
96