Fabrice Gasnier | b01ced2 | 2017-08-28 12:04:11 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) STMicroelectronics 2017 |
| 3 | * |
| 4 | * Author: Fabrice Gasnier <fabrice.gasnier@st.com> |
| 5 | * |
| 6 | * License terms: GNU General Public License (GPL), version 2 |
| 7 | */ |
| 8 | |
| 9 | #ifndef _STM32_LPTIM_TRIGGER_H_ |
| 10 | #define _STM32_LPTIM_TRIGGER_H_ |
| 11 | |
| 12 | #include <linux/iio/iio.h> |
| 13 | #include <linux/iio/trigger.h> |
| 14 | |
| 15 | #define LPTIM1_OUT "lptim1_out" |
| 16 | #define LPTIM2_OUT "lptim2_out" |
| 17 | #define LPTIM3_OUT "lptim3_out" |
| 18 | |
Arnd Bergmann | 6d745ee | 2017-09-06 14:56:50 +0200 | [diff] [blame] | 19 | #if IS_REACHABLE(CONFIG_IIO_STM32_LPTIMER_TRIGGER) |
Fabrice Gasnier | b01ced2 | 2017-08-28 12:04:11 +0200 | [diff] [blame] | 20 | bool is_stm32_lptim_trigger(struct iio_trigger *trig); |
| 21 | #else |
| 22 | static inline bool is_stm32_lptim_trigger(struct iio_trigger *trig) |
| 23 | { |
Arnd Bergmann | 6d745ee | 2017-09-06 14:56:50 +0200 | [diff] [blame] | 24 | #if IS_ENABLED(CONFIG_IIO_STM32_LPTIMER_TRIGGER) |
| 25 | pr_warn_once("stm32 lptim_trigger not linked in\n"); |
| 26 | #endif |
Fabrice Gasnier | b01ced2 | 2017-08-28 12:04:11 +0200 | [diff] [blame] | 27 | return false; |
| 28 | } |
| 29 | #endif |
| 30 | #endif |