rtc: pcf8523: set xtal load capacitance from DT
authorSam Ravnborg <sam@ravnborg.org>
Sat, 19 Jan 2019 09:00:30 +0000 (10:00 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Tue, 22 Jan 2019 17:57:08 +0000 (18:57 +0100)
commit189927e719e36ceefbb8037f23d3849e47833aef
treeeaa926f119a6c93ebe86ef3baed9aac1ad9eacb3
parente4a604cbee5470fc116ac9a4f852152070984286
rtc: pcf8523: set xtal load capacitance from DT

Add support for specifying the xtal load capacitance in the DT node.
The pcf8523 supports xtal load capacitance of 7pF or 12.5pF.
If the rtc has the wrong configuration the time will
drift several hours/week.

The driver use the default value 12.5pF.

The DT may specify either 7000fF or 12500fF.
(The DT uses femto Farad to avoid decimal numbers).
Other values are warned and the driver uses the default value.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-pcf8523.c