Skip to content

Commit

Permalink
drivers: sensor: SCD4x Add driver
Browse files Browse the repository at this point in the history
This adds support for Sensirion's SCD4x co2 sensor.

(cherry picked from commit 2efc859)

Original-Signed-off-by: Jan Faeh <jan.faeh@sensirion.com>
GitOrigin-RevId: 2efc859
Cr-Build-Id: 8730847287260936497
Cr-Build-Url: https://cr-buildbucket.appspot.com/build/8730847287260936497
Copybot-Job-Name: zephyr-main-copybot-downstream
Change-Id: Ie31b2952befca27c3b0535c46e50556a444e8a23
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/6035384
Reviewed-by: Tristan Honscheid <honscheid@google.com>
Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
Tested-by: Tristan Honscheid <honscheid@google.com>
Commit-Queue: Tristan Honscheid <honscheid@google.com>
  • Loading branch information
Jan Faeh authored and Chromeos LUCI committed Nov 20, 2024
1 parent ac396af commit 175bf41
Show file tree
Hide file tree
Showing 10 changed files with 1,143 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/sensor/sensirion/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# SPDX-License-Identifier: Apache-2.0

# zephyr-keep-sorted-start
add_subdirectory_ifdef(CONFIG_SCD4X scd4x)
add_subdirectory_ifdef(CONFIG_SGP40 sgp40)
add_subdirectory_ifdef(CONFIG_SHT3XD sht3xd)
add_subdirectory_ifdef(CONFIG_SHT4X sht4x)
Expand Down
1 change: 1 addition & 0 deletions drivers/sensor/sensirion/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# SPDX-License-Identifier: Apache-2.0

# zephyr-keep-sorted-start
source "drivers/sensor/sensirion/scd4x/Kconfig"
source "drivers/sensor/sensirion/sgp40/Kconfig"
source "drivers/sensor/sensirion/sht3xd/Kconfig"
source "drivers/sensor/sensirion/sht4x/Kconfig"
Expand Down
5 changes: 5 additions & 0 deletions drivers/sensor/sensirion/scd4x/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# SPDX-License-Identifier: Apache-2.0

zephyr_library()

zephyr_library_sources(scd4x.c)
13 changes: 13 additions & 0 deletions drivers/sensor/sensirion/scd4x/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Drivers configuration options for Sensirion SCD4x

# Copyright (c) 2024 Jan Fäh
# SPDX-License-Identifier: Apache-2.0

config SCD4X
bool "SCD4x Carbon Dioxide Sensor"
default y
depends on DT_HAS_SENSIRION_SCD41_ENABLED || DT_HAS_SENSIRION_SCD40_ENABLED
select I2C
select CRC
help
Enable driver for the Sensirion SCD4x carbon dioxide sensors.
Loading

0 comments on commit 175bf41

Please sign in to comment.