iio: adc: stm32-dfsdm: add check on spi-max-frequency
authorFabrice Gasnier <fabrice.gasnier@st.com>
Fri, 23 Feb 2018 12:51:01 +0000 (13:51 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 28 Apr 2018 15:17:59 +0000 (16:17 +0100)
commit4cfcb2bfdd07b130f05a3fb39edd6bfa2a59bf7a
treeb87452dc0efdff5a696e0b1dcc629ca61e2b3c9d
parentdfa105b1f602bdd63296ab0abd2c6ec2cb09eb89
iio: adc: stm32-dfsdm: add check on spi-max-frequency

spi-max-frequency is requested for SPI master mode (only), to tune output
clock. It may happen requested frequency isn't reachable.
Add explicit check, so probe fails with error in this case. Otherwise,
output clock may simply be silently turned off (conversions fail).

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/stm32-dfsdm-core.c