]> git.baikalelectronics.ru Git - kernel.git/commit
counter: microchip-tcb-capture: Handle Signal1 read and Synapse
authorWilliam Breathitt Gray <william.gray@linaro.org>
Tue, 18 Oct 2022 12:10:14 +0000 (08:10 -0400)
committerWilliam Breathitt Gray <william.gray@linaro.org>
Mon, 24 Oct 2022 00:38:49 +0000 (20:38 -0400)
commit8c8b3eb4e41f1b3c9f4a6b61e41120b65740fd03
treefdb54ca2f176b9778bee7842f5d1132406d9c4fe
parent9d811790d06fdafca56ae2d23611a074634f7087
counter: microchip-tcb-capture: Handle Signal1 read and Synapse

The signal_read(), action_read(), and action_write() callbacks have been
assuming Signal0 is requested without checking. This results in requests
for Signal1 returning data for Signal0. This patch fixes these
oversights by properly checking for the Signal's id in the respective
callbacks and handling accordingly based on the particular Signal
requested. The trig_inverted member of the mchp_tc_data is removed as
superfluous.

Fixes: f40f4c75bd68 ("counter: Add microchip TCB capture counter")
Cc: stable@vger.kernel.org
Reviewed-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
Link: https://lore.kernel.org/r/20221018121014.7368-1-william.gray@linaro.org/
Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
drivers/counter/microchip-tcb-capture.c