Skip to content
Commit 223c4490 authored by Callum Sinclair's avatar Callum Sinclair Committed by Tom Rini
Browse files

rtc: ds1307: Fix incorrect clock reset for DS13xx



The ds1307 driver also supports the DS1339 and DS1340.
However, in ds1307_rtc_reset the register writes assume that the chip
is a DS1307. This is evident in the writing of bits SQWE, RS1, RS0 to
the control register. While this applies correctly to the DS1307, on a
DS1340 the control register doesn't contain those bits (instead, the
register is used for clock calibration). By writing these bits the
clock calibration will be changed and the chip can become
non-functional after a reset call.

Signed-off-by: default avatarCallum Sinclair <callum.sinclair@alliedtelesis.co.nz>
parent 8956854d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment