提交 1987a08c 编写于 作者: F Fabrice Gasnier 提交者: Jonathan Cameron

iio: trigger: stm32-timer: fix write_raw return value

Fixes: 4adec7da ("iio: stm32 trigger: Add quadrature encoder device")

IIO core expects zero as return value for write_raw() callback
in case of success.
Signed-off-by: NFabrice Gasnier <fabrice.gasnier@st.com>
Acked-by: NBenjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
上级 50b39608
......@@ -406,9 +406,8 @@ static int stm32_counter_write_raw(struct iio_dev *indio_dev,
switch (mask) {
case IIO_CHAN_INFO_RAW:
regmap_write(priv->regmap, TIM_CNT, val);
return regmap_write(priv->regmap, TIM_CNT, val);
return IIO_VAL_INT;
case IIO_CHAN_INFO_SCALE:
/* fixed scale */
return -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部