Commit bc2113bd authored by Henrik Brix Andersen's avatar Henrik Brix Andersen Committed by Johan Hedberg
Browse files

drivers: adc: add LMP90xxx ADC driver with GPIO



Add driver for the Texas Instruments LMP90xxx series of multi-channel,
low-power 16-/24-bit sensor analog frontends (AFEs).

The functionality is split into two drivers; an ADC driver and a GPIO
driver.

Tested with LMP90080 and LMP90100.

Signed-off-by: default avatarHenrik Brix Andersen <hebad@vestas.com>
parent 9d71384e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -135,6 +135,7 @@
/drivers/flash/*stm32*                    @superna9999
/drivers/gpio/                            @mnkp @pabigot
/drivers/gpio/*ht16k33*                   @henrikbrixandersen
/drivers/gpio/*lmp90xxx*                  @henrikbrixandersen
/drivers/gpio/*stm32*                     @rsalveti @idlethread
/drivers/hwinfo/                          @alexanderwachter
/drivers/i2c/*litex*                      @mateusz-holenko @kgugala @pgielda
+1 −0
Original line number Diff line number Diff line
@@ -11,4 +11,5 @@ zephyr_library_sources_ifdef(CONFIG_ADC_NRFX_SAADC adc_nrfx_saadc.c)
zephyr_library_sources_ifdef(CONFIG_ADC_SAM0		adc_sam0.c)
zephyr_library_sources_ifdef(CONFIG_ADC_STM32		adc_stm32.c)
zephyr_library_sources_ifdef(CONFIG_ADC_XEC		adc_mchp_xec.c)
zephyr_library_sources_ifdef(CONFIG_ADC_LMP90XXX	adc_lmp90xxx.c)
zephyr_library_sources_ifdef(CONFIG_USERSPACE		adc_handlers.c)
+2 −0
Original line number Diff line number Diff line
@@ -57,4 +57,6 @@ source "drivers/adc/Kconfig.stm32"

source "drivers/adc/Kconfig.xec"

source "drivers/adc/Kconfig.lmp90xxx"

endif # ADC
+54 −0
Original line number Diff line number Diff line
# LMP90xxx ADC configuration options

# Copyright (c) 2019 Vestas Wind Systems A/S
# SPDX-License-Identifier: Apache-2.0

config ADC_LMP90XXX
	bool "LMP90xxx driver"
	depends on SPI
	select ADC_CONFIGURABLE_INPUTS
	help
	  Enable LMP90xxx ADC driver.

	  The LMP90xxx is a multi-channel, low power sensor analog
	  frontend (AFE).

if ADC_LMP90XXX

config ADC_LMP90XXX_INIT_PRIORITY
	int "Init priority"
	default 80
	help
	  LMP90xxx ADC device driver initialization priority.

config ADC_LMP90XXX_ACQUISITION_THREAD_STACK_SIZE
	int "Stack size for the ADC data acquisition thread"
	default 400
	help
	  Size of the stack used for the internal data acquisition
	  thread.

config ADC_LMP90XXX_ACQUISITION_THREAD_PRIO
	int "Priority for the ADC data acquisition thread"
	default 0
	help
	  Priority level for the internal ADC data acquisition thread.

config ADC_LMP90XXX_CRC
	bool "Use Cyclic Redundancy Check (CRC)"
	default y
	help
	  Use Cyclic Redundancy Check (CRC) to verify the integrity of
	  the data read from the LMP90xxx.

config ADC_LMP90XXX_GPIO
	bool "Enable GPIO support"
	depends on GPIO
	select GPIO_LMP90XXX
	help
	  Enable GPIO child device support in the LMP90xxx ADC driver.

	  The GPIO functionality is handled by the LMP90xxx GPIO
	  driver.

endif # ADC_LMP90XXX
+1137 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading