From 10df1e6787647f381a90689a5285555275f1a3a3 Mon Sep 17 00:00:00 2001 From: Arnaud Ebalard Date: Wed, 10 Dec 2014 15:54:08 -0800 Subject: [PATCH] drivers/rtc/rtc-isl12057.c: add proper handling of oscillator failure bit MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit As suggested by Uwe, instead of clearing oscillator failure bit unconditionally at driver load, this patch adds proper handling of the flag. The driver now returns -ENODATA when reading time from the device and oscillator failure bit is set. The flag is now cleared only when the a new time value is pushed to the device. Signed-off-by: Arnaud Ebalard Reported-by: Uwe Kleine-König Acked-by: Uwe Kleine-König Cc: Mark Rutland Cc: Alessandro Zummo Cc: Peter Huewe Cc: Linus Walleij Cc: Thierry Reding Cc: Mark Brown Cc: Grant Likely Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-format-patch failed