]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: stmp3xxx: use optional crystal in low power states
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thu, 16 Apr 2015 19:45:04 +0000 (12:45 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 17 Apr 2015 13:03:59 +0000 (09:03 -0400)
commit0b0f4d69ec074dbeaff93b4f9025b889223dadcf
tree97bbc064215190a72387d0607afadc92cc39c76c
parentb54ead4fe963d92f22dc32d2d67152b5fced2fba
rtc: stmp3xxx: use optional crystal in low power states

The rtc's status register allows to determine if a 32k crystal is
connected to keep the rtc running in low power states provided the
corresponding fuse bits were blown correctly during production.  (In case
they were not, the right frequency can be stated in the device tree.) If
there is no such crystal available force the 24 MHz XTAL clock to keep
running to retain the right date and time.  Otherwise use the crystal to
save some power.

It would be nice to only switch to the crystal when the XTAL clock is
about to be disabled and keep the crystal off when unneeded because XTAL
is always on while the chip is powered on.  But as sudden power loss isn't
detectable this is not save.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt
drivers/rtc/rtc-stmp3xxx.c