-
Jongpil Jung authored
To convert SX9360 status register ["REG_STAT"], into a channel index, we need to right shift by |stat_offset|, not left shift. Also the PROXSTAT bit (3) is for channel 1 (PHM, Phase Measured), not (PHR, Phase Reference, channel 0), so the offset is 2 instead of 3. Fixes: 1cdb4c47 ("iio:proximity:sx9360: Add sx9360 support") Signed-off-by: Jongpil Jung <jongpil19.jung@samsung.com> Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20220122213444.745152-1-gwendal@chromium.orgSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
19d32860