iio: magnetometer: mag3110: Add ability to run in continuous mode
authorRichard Tresidder <rtresidd@electromag.com.au>
Tue, 8 May 2018 07:59:54 +0000 (15:59 +0800)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 12 May 2018 10:01:59 +0000 (11:01 +0100)
commit3345d4702329a4f5760f4c8100da391e07eb878d
treeb929280c5a92b43534e02eb5a8ab6d916f555aaa
parente2fad7450306df281d21111620124954d4cb2cd9
iio: magnetometer: mag3110: Add ability to run in continuous mode

Adds the ability to run the Mag3110 in continuous mode to speed up the
sampling rate.
Depending on the sampling rate requested the device can be put in or out
of continuous mode automatically.
Shifting out of continuous mode requires a potential 1 / ODR wait which
is also implemented.
Modified the sleep method when data is not ready to allow for
sampling > 50sps to work.

Signed-off-by: Richard Tresidder <rtresidd@electromag.com.au>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/magnetometer/mag3110.c