mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user