Commit 3a1567ec authored by Jonathan Cameron's avatar Jonathan Cameron Committed by Zheng Zengkai
Browse files

staging:iio:adc:ad7280a: Fix handing of device address bit reversing.

stable inclusion
from stable-v5.10.110
commit b5db33a81ee7acf557dabf03ada137e6e5d5a278
bugzilla: https://gitee.com/openeuler/kernel/issues/I574AL

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



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

[ Upstream commit f281e4dd ]

The bit reversal was wrong for bits 1 and 3 of the 5 bits.
Result is driver failure to probe if you have more than 2 daisy-chained
devices.  Discovered via QEMU based device emulation.

Fixes tag is for when this moved from a macro to a function, but it
was broken before that.

Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Fixes: 065a7c0b ("Staging: iio: adc: ad7280a.c: Fixed Macro argument reuse")
Reviewed-by: default avatarMarcelo Schmitt <marcelo.schmitt1@gmail.com>
Link: https://lore.kernel.org/r/20220206190328.333093-2-jic23@kernel.org


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarYu Liao <liaoyu15@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 63a88195
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment