]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iio: adc: rockchip_saradc: fix bitmask for channels on SARADCv2
authorQuentin Schulz <quentin.schulz@theobroma-systems.com>
Fri, 23 Feb 2024 12:45:21 +0000 (13:45 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Apr 2024 13:28:22 +0000 (15:28 +0200)
commit7ed675cfaf51710e9474005afa230e3cd6a26e93
tree50537b79308de86a34ebfba9f9af9c5ec06f6fa7
parent8ec4a68a25a231e2303716a0aba8ff1413d47c87
iio: adc: rockchip_saradc: fix bitmask for channels on SARADCv2

[ Upstream commit b0a4546df24a4f8c59b2d05ae141bd70ceccc386 ]

The SARADCv2 on RK3588 (the only SoC currently supported that has an
SARADCv2) selects the channel through the channel_sel bitfield which is
the 4 lowest bits, therefore the mask should be GENMASK(3, 0) and not
GENMASK(15, 0).

Fixes: 757953f8ec69 ("iio: adc: rockchip_saradc: Add support for RK3588")
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20240223-saradcv2-chan-mask-v1-1-84b06a0f623a@theobroma-systems.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iio/adc/rockchip_saradc.c