Skip to content

Commit

Permalink
driver: sensor: adds basic support for analog devices ltc2990
Browse files Browse the repository at this point in the history
This commit adds Kconfig variables to configure ADLTC2990. This commit adds
basic driver code for analog devices ltc2990 sensor.

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
  • Loading branch information
jilaypandya committed Jul 26, 2023
1 parent 66f5ed1 commit 0c8db7b
Show file tree
Hide file tree
Showing 4 changed files with 586 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/sensor/adltc2990/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#SPDX - FileCopyrightText : Copyright(c) 2023 Carl Zeiss Meditec AG
#SPDX - License - Identifier : Apache - 2.0

zephyr_library()

zephyr_library_sources_ifdef(CONFIG_ADLTC2990 adltc2990.c)
49 changes: 49 additions & 0 deletions drivers/sensor/adltc2990/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#ADLTC2990 Quad I2C Voltage, Current and Temperature sensor configuration options

#SPDX - FileCopyrightText : Copyright(c) 2023 Carl Zeiss Meditec AG
#SPDX - License - Identifier : Apache - 2.0

menuconfig ADLTC2990
bool "ADLTC2990 Quad I2C Voltage, Current and Temperature Monitor"
default n
depends on DT_HAS_ADI_ADLTC2990_ENABLED
select I2C
help
Enable the driver for Analog Devices LTC2990
Quad I2C Voltage, Current and Temperature Monitor.

if ADLTC2990

choice
prompt "Temperature Format"

config ADLTC2990_TEMPERATURE_IN_KELVIN
bool "Kelvin"

config ADLTC2990_TEMPERATURE_IN_CELCIUS
bool "Celcius"

endchoice

config ADLTC2990_TEMPERATURE_FORMAT_VALUE
int
default 0 if ADLTC2990_TEMPERATURE_IN_CELCIUS
default 1 if ADLTC2990_TEMPERATURE_IN_KELVIN

choice
prompt "Acquisition Type"

config ADLTC2990_ACQUISITION_SINGLE
bool "Single"

config ADLTC2990_ACQUISITION_REPEATED
bool "Repeated"

endchoice

config ADLTC2990_ACQUISITION_TYPE_VALUE
int
default 0 if ADLTC2990_ACQUISITION_REPEATED
default 1 if ADLTC2990_ACQUISITION_SINGLE

endif #ADLTC2990

0 comments on commit 0c8db7b

Please sign in to comment.