]> git.karo-electronics.de Git - karo-tx-linux.git/commit
rtc: rtc-hid-sensor-time: allow full years (16bit) in HID reports
authorAlexander Holler <holler@ahsoftware.de>
Fri, 7 Jun 2013 00:09:12 +0000 (10:09 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 7 Jun 2013 05:43:00 +0000 (15:43 +1000)
commitdf94af3f9494e6ab75d4c8b7072edec8f73f7c41
tree51910f6095a9533c9f2ef8cf06d4740882207053
parent9bad063996846473dd6d0bb3a3b99f10c853fd38
rtc: rtc-hid-sensor-time: allow full years (16bit) in HID reports

The draft for HID-sensors (HUTRR39) currently doesn't define the range for
the attribute year.  Asking one of the authors revealed that full years
(e.g.  2013 instead of just 13) were meant.

So we now allow both, 8 bit and 16 bit values for the attribute year and
assuming full years when the value is 16 bits wide.

We will still support 8 bit values until the specification gets final
(and maybe defines a way to set the time too).

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