mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-04-28 09:04:41 +00:00
Add support for LPTIMx_OUT triggers that can be found on some STM32 devices. These triggers can be used then by ADC or DAC. Typical usage is to configure LPTimer as PWM output (via pwm-stm32-lp) and have synchronised analog conversions with these triggers. Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
27 lines
602 B
C
27 lines
602 B
C
/*
|
|
* Copyright (C) STMicroelectronics 2017
|
|
*
|
|
* Author: Fabrice Gasnier <fabrice.gasnier@st.com>
|
|
*
|
|
* License terms: GNU General Public License (GPL), version 2
|
|
*/
|
|
|
|
#ifndef _STM32_LPTIM_TRIGGER_H_
|
|
#define _STM32_LPTIM_TRIGGER_H_
|
|
|
|
#include <linux/iio/iio.h>
|
|
#include <linux/iio/trigger.h>
|
|
|
|
#define LPTIM1_OUT "lptim1_out"
|
|
#define LPTIM2_OUT "lptim2_out"
|
|
#define LPTIM3_OUT "lptim3_out"
|
|
|
|
#if IS_ENABLED(CONFIG_IIO_STM32_LPTIMER_TRIGGER)
|
|
bool is_stm32_lptim_trigger(struct iio_trigger *trig);
|
|
#else
|
|
static inline bool is_stm32_lptim_trigger(struct iio_trigger *trig)
|
|
{
|
|
return false;
|
|
}
|
|
#endif
|
|
#endif
|