counter: microchip-tcb-capture: Handle Signal1 read and Synapse
stable inclusion from stable-v5.10.153 commit 0bcd1ab3e8b3e897141e6e757a3ca00040bd49b8 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I64YCA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0bcd1ab3e8b3e897141e6e757a3ca00040bd49b8 -------------------------------- commit d917a62a upstream. 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: 106b1041 ("counter: Add microchip TCB capture counter") Cc: stable@vger.kernel.org Reviewed-by: NKamel Bouhara <kamel.bouhara@bootlin.com> Link: https://lore.kernel.org/r/20221018121014.7368-1-william.gray@linaro.org/Signed-off-by: NWilliam Breathitt Gray <william.gray@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NLipeng Sang <sanglipeng1@jd.com>
Showing
想要评论请 注册 或 登录