]> git.karo-electronics.de Git - karo-tx-linux.git/commit
rtc: sun6i: Fix compatibility with old DT binding
authorChen-Yu Tsai <wens@csie.org>
Sun, 29 Jan 2017 10:13:43 +0000 (18:13 +0800)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Wed, 1 Feb 2017 11:44:24 +0000 (12:44 +0100)
commit15829cf4b3f8dd3849446138830e629715848d7f
treee42d4879e2af0ea6ca0d0a68be18f9e143425184
parent7bb633b1a9812a6b9f3e49d0cf17f60a633914e5
rtc: sun6i: Fix compatibility with old DT binding

Commit 847b8bf62eb4 ("rtc: sun6i: Expose the 32kHz oscillator") adds
a new clock for the rtc block with a 2 step probe mechanism. To share
the register region between both the clock and rtc instance, a static
pointer is used to keep the related data structure.

To preserve compatibility with the old binding, the data structure
should be saved as soon as the registers are mapped in, regardless
of the presence of the clock bindings, so that the rtc device can
retrieve it when it is probed.

This fixes the rtc device not probing when we use the updated driver
with an old device tree blob.

Fixes: 847b8bf62eb4 ("rtc: sun6i: Expose the 32kHz oscillator")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/rtc-sun6i.c