OSDN Git Service

iio: adis16480: Make use of __adis_initial_startup
authorNuno Sá <nuno.sa@analog.com>
Mon, 10 Feb 2020 13:26:05 +0000 (15:26 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 8 Mar 2020 17:28:31 +0000 (17:28 +0000)
commit366a543421cfaa78564bff4eb369791c7e9b85e7
tree290c07822136a81ff51c4f15c69b974b26b0c196
parent1fd4567026926d01a94a74d0543e324fc794aa73
iio: adis16480: Make use of __adis_initial_startup

All actions done in `adis16480_initial_setup()` are now done in
`__adis_initial_startup()` so, there's no need for code duplication.
Furthermore, the call to `adis16480_initial_setup()` is done before any
device configuration since the device will be reset if not already (via
rst pin). This is actually fixing a potential bug since `adis_reset()` was
being called after configuring the device which is obviously a problem.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/adis16480.c