Skip to content

Commit 8c97c6d

Browse files
committed
drivers: sensor: microchip: mtch9010 Added mtch9010 support
Added support for MTCH9010 and applied edits from reviewers. Signed-off-by: Robert Perkel <[email protected]>
1 parent f070786 commit 8c97c6d

File tree

19 files changed

+1857
-0
lines changed

19 files changed

+1857
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# Copyright (c) 2024 Analog Devices, Inc.
2+
# Copyright (c) 2025 Microchip Technology Inc.
23
# SPDX-License-Identifier: Apache-2.0
34

45
# zephyr-keep-sorted-start
56
add_subdirectory_ifdef(CONFIG_MCP9600 mcp9600)
67
add_subdirectory_ifdef(CONFIG_MCP970X mcp970x)
8+
add_subdirectory_ifdef(CONFIG_MTCH9010 mtch9010)
79
add_subdirectory_ifdef(CONFIG_TACH_XEC mchp_tach_xec)
810
add_subdirectory_ifdef(CONFIG_TCN75A tcn75a)
911
# zephyr-keep-sorted-stop

drivers/sensor/microchip/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# Copyright (c) 2024 Analog Devices, Inc.
2+
# Copyright (c) 2025 Microchip Technology Inc.
23
# SPDX-License-Identifier: Apache-2.0
34

45
# zephyr-keep-sorted-start
56
source "drivers/sensor/microchip/mchp_tach_xec/Kconfig"
67
source "drivers/sensor/microchip/mcp9600/Kconfig"
78
source "drivers/sensor/microchip/mcp970x/Kconfig"
9+
source "drivers/sensor/microchip/mtch9010/Kconfig"
810
source "drivers/sensor/microchip/tcn75a/Kconfig"
911
# zephyr-keep-sorted-stop
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright (c) 2025 Microchip Technology Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
zephyr_library()
5+
6+
zephyr_library_sources(mtch9010.c)
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Copyright (c) 2025 Microchip Technology Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
menuconfig MTCH9010
5+
bool "MTCH9010"
6+
default y
7+
depends on DT_HAS_MICROCHIP_MTCH9010_ENABLED
8+
help
9+
Configure the MTCH9010 driver
10+
11+
if MTCH9010
12+
13+
config MTCH9010_RESET_ON_STARTUP
14+
bool "Reset MTCH9010 on Startup"
15+
default y
16+
help
17+
Resets the MTCH9010 before the driver configures it.
18+
If disabled and the MTCH9010 was configured already, configuration will fail.
19+
20+
config MTCH9010_LOCK_ON_STARTUP
21+
bool "Save MTCH9010 Settings on Startup"
22+
default n
23+
help
24+
If set, this option will assert SYS_LK after initialization.
25+
The sensor will use these parameters if SYS_LK is asserted on the next POR.
26+
27+
config MTCH9010_SAMPLE_DELAY_TIMEOUT_MS
28+
int "Maximum wait time to get a sample (ms)"
29+
default 500
30+
help
31+
Sets the maximum amount of time in milliseconds to wait for a response from the MTCH9010
32+
when asking for a sample. Conductive mode is much faster than capacitive mode.
33+
34+
config MTCH9010_OVERRIDE_DELAY_ENABLE
35+
bool "Override Delay if not Wake on Request"
36+
default y
37+
help
38+
If the MTCH9010 has a sleep period defined, the wake pin will not wake the device.
39+
If this option is set, the API will allow for <sleep period + timeout> length
40+
delays during fetch. Otherwise, the API will use the normal timeout, and likely fail.
41+
42+
config MTCH9010_REFERENCE_AVERAGING_COUNT
43+
int "Reference Averaging Count"
44+
default 1
45+
range 1 64
46+
help
47+
If the MTCH9010 is using the current measurement as its reference, then this
48+
is the number of samples to average.
49+
50+
config MTCH9010_HEARTBEAT_MONITORING_ENABLE
51+
bool "Heartbeat Monitoring"
52+
default y
53+
help
54+
Configures monitoring of the heartbeat output
55+
56+
# Logging Settings
57+
module = MTCH9010
58+
module-str = MTCH9010
59+
source "subsys/logging/Kconfig.template.log_config"
60+
61+
endif

0 commit comments

Comments
 (0)