Commit c5d93137 authored by Beniamin Bia's avatar Beniamin Bia Committed by Jonathan Cameron

iio: adc: ad7606: Allow reconfigration after reset

According to datasheet, ad7616 require at least 15ms after a restart
to fully reconfigure and being able to receive new commands via spi.
Signed-off-by: default avatarBeniamin Bia <beniamin.bia@analog.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent a0c648c0
......@@ -594,6 +594,10 @@ int ad7606_probe(struct device *dev, int irq, void __iomem *base_address,
if (ret)
dev_warn(st->dev, "failed to RESET: no RESET GPIO specified\n");
/* AD7616 requires al least 15ms to reconfigure after a reset */
if (msleep_interruptible(15))
return -ERESTARTSYS;
st->write_scale = ad7606_write_scale_hw;
st->write_os = ad7606_write_os_hw;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment