diff options
author | Mylène Josserand <mylene.josserand@free-electrons.com> | 2016-03-21 18:06:09 +0100 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2016-03-25 02:41:13 +0100 |
commit | 59a8383adb75459c9d6766656bccc05950b783ea (patch) | |
tree | 1e05f7f7883155af28e9bc43b76cefcd0f8a083a /kernel | |
parent | 85062c9b990b1dc8bbb8971ee7d3044a999cf25f (diff) | |
download | linux-59a8383adb75459c9d6766656bccc05950b783ea.tar.gz linux-59a8383adb75459c9d6766656bccc05950b783ea.tar.bz2 linux-59a8383adb75459c9d6766656bccc05950b783ea.zip |
rtc: abx80x: handle autocalibration
The autocalibration is separated in two bits to set in Oscillator
Control register (0x1c) :
- OSEL bit to select the oscillator type (XT or RC).
- ACAL bit to select the autocalibration type.
These functionnalities are exported in sysfs entries : "oscillator"
and "autocalibration". Respectively, the values are "xtal" for XT
oscillator and "rc" for RC oscillator and 0 to disable the
autocalibration cycle, 512 for a 512 seconds autocalibration cycle
and 1024 for a cycle of 1024 seconds.
Examples :
Set to XT Oscillator
echo xtal > /sys/class/rtc/rtc0/device/oscillator
Activate an autocalibration every 512 seconds
echo 512 > /sys/class/rtc/rtc0/device/autocalibration
Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions