]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
counter: microchip-tcb-capture: Fix undefined counter channel state on probe
authorWilliam Breathitt Gray <wbg@kernel.org>
Wed, 5 Mar 2025 10:01:19 +0000 (19:01 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:31:56 +0000 (14:31 +0200)
commit1e82f28f295860d064d2a38fd909b76dd04ff39b
treea5d4842fcd8d767469e214dcc42ac57c5ea338ba
parent889c71c613c060258c36efdfee0bc3aaf6315ada
counter: microchip-tcb-capture: Fix undefined counter channel state on probe

commit c0c9c73434666dc99ee156b25e7e722150bee001 upstream.

Hardware initialize of the timer counter channel does not occur on probe
thus leaving the Count in an undefined state until the first
function_write() callback is executed. Fix this by performing the proper
hardware initialization during probe.

Fixes: 106b104137fd ("counter: Add microchip TCB capture counter")
Reported-by: Csókás Bence <csokas.bence@prolan.hu>
Closes: https://lore.kernel.org/all/bfa70e78-3cc3-4295-820b-3925c26135cb@prolan.hu/
Link: https://lore.kernel.org/r/20250305-preset-capture-mode-microchip-tcb-capture-v1-1-632c95c6421e@kernel.org
Signed-off-by: William Breathitt Gray <wbg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/counter/microchip-tcb-capture.c