Commit d799ea46 authored by Yannick Brosseau's avatar Yannick Brosseau Committed by Zheng Zengkai
Browse files

iio: adc: stm32: Fix ADCs iteration in irq handler

stable inclusion
from stable-v5.10.127
commit 62284d45e26d53423fcdb5b5cf0bdb8af4e366c9
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5XDDK

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=62284d45e26d53423fcdb5b5cf0bdb8af4e366c9



--------------------------------

commit d2214cca upstream.

The irq handler was only checking the mask for the first ADCs in the case of the
F4 and H7 generation, since it was iterating up to the num_irq value. This patch add
the maximum number of ADC in the common register, which map to the number of entries of
eoc_msk and ovr_msk in stm32_adc_common_regs. This allow the handler to check all ADCs in
that module.

Tested on a STM32F429NIH6.

Fixes: 695e2f5c ("iio: adc: stm32-adc: fix a regression when using dma and irq")
Signed-off-by: default avatarYannick Brosseau <yannick.brosseau@gmail.com>
Reviewed-by: default avatarFabrice Gasnier <fabrice.gasnier@foss.st.com>
Link: https://lore.kernel.org/r/20220516203939.3498673-2-yannick.brosseau@gmail.com


Cc: <Stable@vger.kernel.org>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
parent 1b24e2f9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment