]> git.karo-electronics.de Git - karo-tx-linux.git/commit
rtc: rtc-hid-sensor-time: add option hctosys to set time at boot
authorAlexander Holler <holler@ahsoftware.de>
Thu, 23 May 2013 00:37:59 +0000 (10:37 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 27 May 2013 06:09:27 +0000 (16:09 +1000)
commitef767b4589e74218a6c500010204aab2fe09d9e4
tree956729b75d899ee4d04ce5af3060d655c2937817
parent7270b0519905b260f46658d4940a0edd3ba88137
rtc: rtc-hid-sensor-time: add option hctosys to set time at boot

drivers/rtc/hctosys (CONFIG_RTC_HCTOSYS) doesn't work for
rtc-hid-sensor-time because it will be called in late_init, and thus before
rtc-hid-sensor-time gets loaded. To set the time through
rtc-hid-sensor-time at startup, the module now checks by default if the
system time is before 1970-01-02 and sets the system time (once) if this is
the case.

To disable this behaviour, set the module option hctosys to zero, e.g. by
using rtc-hid-sensor-time.hctosys=0 at the kernel command line if the
driver is statically linked into the kernel.

Signed-off-by: Alexander Holler <holler@ahsoftware.de>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/rtc/rtc-hid-sensor-time.c