* [2/4] rtc: rtc-rs5c372: fixed check for 'oscillator halted' condition
@ 2010-06-02 13:53 thomas.koeller
2016-05-03 14:23 ` [rtc-linux] " Alexandre Belloni
0 siblings, 1 reply; 2+ messages in thread
From: thomas.koeller @ 2010-06-02 13:53 UTC (permalink / raw)
To: p_gortmaker, rtc-linux; +Cc: Thomas Koeller
From: Thomas Koeller <thomas.koeller@baslerweb.com>
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>
---
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 211cacd..be80560 100644
--- a/drivers/rtc/rtc-rs5c372.c
+++ b/drivers/rtc/rtc-rs5c372.c
@@ -535,9 +535,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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [rtc-linux] Re: [2/4] rtc: rtc-rs5c372: fixed check for 'oscillator halted' condition
2010-06-02 13:53 [2/4] rtc: rtc-rs5c372: fixed check for 'oscillator halted' condition thomas.koeller
@ 2016-05-03 14:23 ` Alexandre Belloni
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2016-05-03 14:23 UTC (permalink / raw)
To: thomas.koeller; +Cc: p_gortmaker, rtc-linux
On 02/06/2010 at 15:53:05 +0200, thomas.koeller@baslerweb.com wrote :
> From: Thomas Koeller <thomas.koeller@baslerweb.com>
>
> 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>
> ---
> drivers/rtc/rtc-rs5c372.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
Applied, thanks.
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
--
--
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-05-03 14:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-02 13:53 [2/4] rtc: rtc-rs5c372: fixed check for 'oscillator halted' condition thomas.koeller
2016-05-03 14:23 ` [rtc-linux] " Alexandre Belloni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox