iio: proximity: as3935: recalibrate RCO after resume
authorMatt Ranostay <matt.ranostay@konsulko.com>
Fri, 14 Apr 2017 23:38:19 +0000 (16:38 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Jun 2017 05:13:09 +0000 (07:13 +0200)
commit7e2ad8b207f23a28cd3af7f0661fc1141c5a2375
tree9372bf9055cb0b5ce333459e1d2e954223e44c6b
parent0c967139e8320293819277b0dddf401192b5649f
iio: proximity: as3935: recalibrate RCO after resume

commit 6272c0de13abf1480f701d38288f28a11b4301c4 upstream.

According to the datasheet the RCO must be recalibrated
on every power-on-reset. Also remove mutex locking in the
calibration function since callers other than the probe
function (which doesn't need it) will have a lock.

Fixes: 24ddb0e4bba4 ("iio: Add AS3935 lightning sensor support")
Cc: George McCollister <george.mccollister@gmail.com>
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/proximity/as3935.c