iio: aspeed-adc: wait for initial sequence.
authorMykola Kostenok <c_mykolak@mellanox.com>
Mon, 17 Jul 2017 09:00:35 +0000 (12:00 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Aug 2017 20:46:55 +0000 (13:46 -0700)
commit5f26ebe1afdcf348a9daafd419f97bca02e1a49c
tree61e50a9520d8d6e918c7afad6775f207d9874076
parentf0ab97d1aa1468d769ce6663e52a850601f68f37
iio: aspeed-adc: wait for initial sequence.

commit 737cc2a593782df6846b3cab7e0f64384f58364a upstream.

This patch enables adc engine at initialization time and waits
for the initial sequence completion before enabling adc channels.

Without this code adc channels are not functional and shows
zeros for all connected channels.

Tested on mellanox msn platform.

v1 -> v2:
Pointed by Rick Altherr:
 - Wait init sequence code enabled by bool
from OF match table.

Signed-off-by: Mykola Kostenok <c_mykolak@mellanox.com>
Reviewed-by: Rick Altherr <raltherr@google.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/adc/aspeed_adc.c