linux/include/linux/iio/timer/stm32-timer-trigger.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (C) STMicroelectronics 2016
 *
 * Author: Benjamin Gaignard <[email protected]>
 */

#ifndef _STM32_TIMER_TRIGGER_H_
#define _STM32_TIMER_TRIGGER_H_

#define TIM1_TRGO
#define TIM1_TRGO2
#define TIM1_CH1
#define TIM1_CH2
#define TIM1_CH3
#define TIM1_CH4

#define TIM2_TRGO
#define TIM2_CH1
#define TIM2_CH2
#define TIM2_CH3
#define TIM2_CH4

#define TIM3_TRGO
#define TIM3_CH1
#define TIM3_CH2
#define TIM3_CH3
#define TIM3_CH4

#define TIM4_TRGO
#define TIM4_CH1
#define TIM4_CH2
#define TIM4_CH3
#define TIM4_CH4

#define TIM5_TRGO
#define TIM5_CH1
#define TIM5_CH2
#define TIM5_CH3
#define TIM5_CH4

#define TIM6_TRGO

#define TIM7_TRGO

#define TIM8_TRGO
#define TIM8_TRGO2
#define TIM8_CH1
#define TIM8_CH2
#define TIM8_CH3
#define TIM8_CH4

#define TIM9_TRGO
#define TIM9_CH1
#define TIM9_CH2

#define TIM10_OC1

#define TIM11_OC1

#define TIM12_TRGO
#define TIM12_CH1
#define TIM12_CH2

#define TIM13_OC1

#define TIM14_OC1

#define TIM15_TRGO

#define TIM16_OC1

#define TIM17_OC1

#if IS_REACHABLE(CONFIG_IIO_STM32_TIMER_TRIGGER)
bool is_stm32_timer_trigger(struct iio_trigger *trig);
#else
static inline bool is_stm32_timer_trigger(struct iio_trigger *trig)
{
#if IS_ENABLED(CONFIG_IIO_STM32_TIMER_TRIGGER)
	pr_warn_once("stm32-timer-trigger not linked in\n");
#endif
	return false;
}
#endif
#endif