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: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
Henrik Brix Andersen 2019-10-07 13:08:44 +02:00 committed by Johan Hedberg
commit bc2113bd46
21 changed files with 1477 additions and 0 deletions

View file

@ -0,0 +1,24 @@
/*
* Copyright (c) 2019 Vestas Wind Systems A/S
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_INCLUDE_DRIVERS_ADC_LMP90XXX_H_
#define ZEPHYR_INCLUDE_DRIVERS_ADC_LMP90XXX_H_
#include <device.h>
#include <zephyr/types.h>
/* LMP90xxx supports GPIO D0..D6 */
#define LMP90XXX_GPIO_MAX 6
int lmp90xxx_gpio_set_output(struct device *dev, u8_t pin);
int lmp90xxx_gpio_set_input(struct device *dev, u8_t pin);
int lmp90xxx_gpio_set_pin_value(struct device *dev, u8_t pin, bool value);
int lmp90xxx_gpio_get_pin_value(struct device *dev, u8_t pin, bool *value);
#endif /* ZEPHYR_INCLUDE_DRIVERS_ADC_LMP90XXX_H_ */