iio: Add STM32 timer trigger driver
authorBenjamin Gaignard <benjamin.gaignard@linaro.org>
Fri, 20 Jan 2017 09:15:07 +0000 (10:15 +0100)
committerLee Jones <lee.jones@linaro.org>
Wed, 25 Jan 2017 16:11:56 +0000 (16:11 +0000)
commit93fbe91b552194af970256ce72934745d01df435
treefd34fba1c4fac1a69cf17927f4e316b891822d50
parentbf2d8581b1b3ddd72a679e06157b57c1e2dd7b23
iio: Add STM32 timer trigger driver

Timers IPs can be used to generate triggers for other IPs like
DAC or ADC.
Each trigger may result of timer internals signals like counter enable,
reset or edge, this configuration could be done through "master_mode"
device attribute.

Since triggers could be used by DAC or ADC their names are defined
in include/ nux/iio/timer/stm32-timer-trigger.h and is_stm32_iio_timer_trigger
function could be used to check if the trigger is valid or not.

"trgo" trigger have a "sampling_frequency" attribute which allow to configure
timer sampling frequency.

version 8:
- change kernel version from 4.10 to 4.11 in ABI documentation

version 7:
- remove all iio_device related code
- move driver into trigger directory

version 5:
- simplify tables of triggers
- only create an IIO device when needed

version 4:
- get triggers configuration from "reg" in DT
- add tables of triggers
- sampling frequency is enable/disable when writing in trigger
  sampling_frequency attribute
- no more use of interruptions

version 3:
- change compatible to "st,stm32-timer-trigger"
- fix attributes access right
- use string instead of int for master_mode and slave_mode
- document device attributes in sysfs-bus-iio-timer-stm32

version 2:
- keep only one compatible
- use st,input-triggers-names and st,output-triggers-names
  to know which triggers are accepted and/or create by the device

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Documentation/ABI/testing/sysfs-bus-iio-timer-stm32 [new file with mode: 0644]
drivers/iio/trigger/Kconfig
drivers/iio/trigger/Makefile
drivers/iio/trigger/stm32-timer-trigger.c [new file with mode: 0644]
include/linux/iio/timer/stm32-timer-trigger.h [new file with mode: 0644]