Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1257453
| From | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] rtc: ds1307: Fix alarm programming for mcp794xx |
| Date | 2015-10-28 00:00 +0100 |
| Message-ID | <qolnI-2I6-15@gated-at.bofh.it> (permalink) |
| References | <qmEb8-1Kb-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 23/10/2015 at 09:29:57 +0300, Tero Kristo wrote :
> mcp794xx alarm registers must be written in BCD format. However, the
> alarm programming logic neglected this by adding one to the value
> after bin2bcd conversion has been already done, writing bad values
> to month register in case the alarm being set is in October. In this
> case, the alarm month value becomes 0x0a instead of the expected 0x10.
>
> Fix by moving the +1 addition within the bin2bcd call also.
>
> Fixes: 1d1945d261a2 ("drivers/rtc/rtc-ds1307.c: add alarm support for mcp7941x chips")
>
> Signed-off-by: Tero Kristo <t-kristo@ti.com>
> ---
> drivers/rtc/rtc-ds1307.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Applied, thanks.
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] rtc: ds1307: Fix alarm programming for mcp794xx Tero Kristo <t-kristo@ti.com> - 2015-10-23 08:40 +0200 Re: [PATCH] rtc: ds1307: Fix alarm programming for mcp794xx Nishanth Menon <nm@ti.com> - 2015-10-24 16:50 +0200 Re: [PATCH] rtc: ds1307: Fix alarm programming for mcp794xx Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2015-10-28 00:00 +0100
csiph-web