aboutsummaryrefslogtreecommitdiff
path: root/drivers/iio/adc/mcp3422.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2020-04-03 15:27:16 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2020-04-19 17:50:02 +0100
commit3b7f9dbb827ce8680b98490215e698b6079a9ec5 (patch)
treebbe1e6436cda17e156a7213dbc54d153bbaba2fd /drivers/iio/adc/mcp3422.c
parent8bef455c8b1694547ee59e8b1939205ed9d901a6 (diff)
iio: xilinx-xadc: Make sure not exceed maximum samplerate
The XADC supports a samplerate of up to 1MSPS. Unfortunately the hardware does not have a FIFO, which means it generates an interrupt for each conversion sequence. At one 1MSPS this creates an interrupt storm that causes the system to soft-lock. For this reason the driver limits the maximum samplerate to 150kSPS. Currently this check is only done when setting a new samplerate. But it is also possible that the initial samplerate configured in the FPGA bitstream exceeds the limit. In this case when starting to capture data without first changing the samplerate the system can overload. To prevent this check the currently configured samplerate in the probe function and reduce it to the maximum if necessary. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Fixes: bdc8cda1d010 ("iio:adc: Add Xilinx XADC driver") Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/adc/mcp3422.c')
0 files changed, 0 insertions, 0 deletions