Skip to content

Commit 698a286

Browse files
aurel32MaureenHelm
authored andcommitted
drivers/sensor: Add basic Silabs Si7210 support
This adds basic support for the Silabs Si7210 hall effect magnetic position and temperature sensor. It is able to get magnetic field and temperature in the default scale of the sensor (depending on the variant). It also supports going into sleep mode without measurements through the device power management infrastructure. It is most notably missing support for scale change, measurement averaging and filtering, and alert pin configuration (threshold, hysteris, tamper). Signed-off-by: Aurelien Jarno <[email protected]>
1 parent fcfb1d9 commit 698a286

File tree

8 files changed

+575
-0
lines changed

8 files changed

+575
-0
lines changed

drivers/sensor/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ add_subdirectory_ifdef(CONFIG_SHT4X sht4x)
8080
add_subdirectory_ifdef(CONFIG_SI7006 si7006)
8181
add_subdirectory_ifdef(CONFIG_SI7055 si7055)
8282
add_subdirectory_ifdef(CONFIG_SI7060 si7060)
83+
add_subdirectory_ifdef(CONFIG_SI7210 si7210)
8384
add_subdirectory_ifdef(CONFIG_SM351LT sm351lt)
8485
add_subdirectory_ifdef(CONFIG_HAS_STMEMSC stmemsc)
8586
add_subdirectory_ifdef(CONFIG_STM32_TEMP stm32_temp)

drivers/sensor/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@ source "drivers/sensor/si7055/Kconfig"
200200

201201
source "drivers/sensor/si7060/Kconfig"
202202

203+
source "drivers/sensor/si7210/Kconfig"
204+
203205
source "drivers/sensor/sm351lt/Kconfig"
204206

205207
source "drivers/sensor/stm32_temp/Kconfig"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
zephyr_library()
4+
5+
zephyr_library_sources(si7210.c)

drivers/sensor/si7210/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Si7210 Hall Effect Magnetic Position and Temperature Sensor configuration options
2+
# Copyright (c) 2019 Actinius
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
config SI7210
6+
bool "Si7210 Hall Effect Magnetic Position and Temperature Sensor"
7+
depends on I2C
8+
help
9+
Enable driver for Si7210 Hall Effect Magnetic Position and Temperature Sensor.

0 commit comments

Comments
 (0)