iio: adc: rockchip-flexbus-adc: Add read memory barrier

Guarantee flexbus has completed transmission before reading.

Change-Id: I38d600a9feb1c0e586e70ec8cb581f803cf7902d
Signed-off-by: Wesley Yao <wesley.yao@rock-chips.com>
This commit is contained in:
Wesley Yao
2024-12-31 17:00:27 +08:00
committed by Tao Huang
parent 072c7b2223
commit 655499e285

View File

@@ -175,6 +175,7 @@ static int rockchip_flexbus_adc_read_raw(struct iio_dev *indio_dev,
val_mask = 0xffff;
break;
}
dma_rmb();
*val = readw(rkfb_adc->dst_buf) & val_mask;
return IIO_VAL_INT;