diff options
author | Thomas Koeller <thomas.koeller@baslerweb.com> | 2010-06-02 15:53:05 +0200 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2016-05-21 17:07:16 +0200 |
commit | a9dbe558920e12ea286cd4479039df26991a95de (patch) | |
tree | 713c2c948bb691b86ea4b19f106c56789f887e9a /drivers/rtc | |
parent | rtc: rv3029: add alarm IRQ (diff) | |
download | linux-a9dbe558920e12ea286cd4479039df26991a95de.tar.xz linux-a9dbe558920e12ea286cd4479039df26991a95de.zip |
rtc: rs5c372: r2025: fix check for 'oscillator halted' condition
The R2025SD chip, according to its data sheet, sets the /XST
bit to zero if the oscillator stops. Hence the check for this
condition was wrong.
Signed-off-by: Thomas Koeller <thomas.koeller@baslerweb.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-rs5c372.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-rs5c372.c b/drivers/rtc/rtc-rs5c372.c index aaebe10876e8..ef86229428fc 100644 --- a/drivers/rtc/rtc-rs5c372.c +++ b/drivers/rtc/rtc-rs5c372.c @@ -506,9 +506,9 @@ static int rs5c_oscillator_setup(struct rs5c372 *rs5c372) int addr, i, ret = 0; if (rs5c372->type == rtc_r2025sd) { - if (!(rs5c372->regs[RS5C_REG_CTRL2] & R2025_CTRL2_XST)) + if (rs5c372->regs[RS5C_REG_CTRL2] & R2025_CTRL2_XST) return ret; - rs5c372->regs[RS5C_REG_CTRL2] &= ~R2025_CTRL2_XST; + rs5c372->regs[RS5C_REG_CTRL2] |= R2025_CTRL2_XST; } else { if (!(rs5c372->regs[RS5C_REG_CTRL2] & RS5C_CTRL2_XSTP)) return ret; |