mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-24 23:52:40 +00:00
iio: trigger: Add STM32 LPTimer trigger driver
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>
This commit is contained in:
parent
5dae3c90fe
commit
b01ced2b50
4 changed files with 157 additions and 0 deletions
27
include/linux/iio/timer/stm32-lptim-trigger.h
Normal file
27
include/linux/iio/timer/stm32-lptim-trigger.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* 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
|
Loading…
Add table
Add a link
Reference in a new issue