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>
Sat, 24 Jun 2017 05:11:14 +0000 (07:11 +0200)
commitcf308c15103e9b5e13a7719decec86b20d538863
tree113670f8f4307bcf0b531b33a68765e4f080589e
parent56251d138570b4c789ee8e55c4f58f8b658e8ea0
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