diff options
author | Fabrice Gasnier <fabrice.gasnier@st.com> | 2017-07-27 19:18:59 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2017-07-30 16:46:02 +0300 |
commit | 06e3fe89988b1c99a3d9953b1d3b1faf3f047017 (patch) | |
tree | 793c2e9ab489063514a608bbe9d2c8916de38e35 /fs/filesystems.c | |
parent | 1987a08cd989fd9e5690e90a04e70046e93315f4 (diff) | |
download | linux-06e3fe89988b1c99a3d9953b1d3b1faf3f047017.tar.xz |
iio: trigger: stm32-timer: fix get/set down count direction
Fixes: 4adec7da0536 ("iio: stm32 trigger: Add quadrature encoder device")
This fixes two issues:
- stm32_set_count_direction: to set down direction
- stm32_get_count_direction: to get down direction
IIO core provides/expects value to be an index of iio_enum items array.
This needs to be turned by these routines into TIM_CR1_DIR (e.g. BIT(4))
value.
Also, report error when attempting to write direction, when in encoder
mode: in this case, direction is read only (given by encoder inputs).
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'fs/filesystems.c')
0 files changed, 0 insertions, 0 deletions