Commit 29646ee3 authored by Fabrice Gasnier's avatar Fabrice Gasnier Committed by William Breathitt Gray
Browse files

counter: stm32-timer-cnt: add checks on quadrature encoder capability



This is a precursor patch to support capture channels on all possible
channels and stm32 timer types. Original driver was intended to be used
only as quadrature encoder and simple counter on internal clock.

So, add a check on encoder capability, so the driver may be probed for
timer instances without encoder feature. This way, all timers may be used
as simple counter on internal clock, starting from here.

Encoder capability is retrieved by using the timer index (originally in
stm32-timer-trigger driver and dt-bindings). The need to keep backward
compatibility with existing device tree lead to parse aside trigger node.

Reviewed-by: default avatarWilliam Breathitt Gray <william.gray@linaro.org>
Signed-off-by: default avatarFabrice Gasnier <fabrice.gasnier@foss.st.com>
Link: https://lore.kernel.org/r/20240307133306.383045-7-fabrice.gasnier@foss.st.com


Signed-off-by: default avatarWilliam Breathitt Gray <william.gray@linaro.org>
parent b73d03b3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment