rtc: rtc-hid-sensor-time: allow full years (16bit) in HID reports
authorAlexander Holler <holler@ahsoftware.de>
Wed, 3 Jul 2013 22:07:00 +0000 (15:07 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 Jul 2013 23:07:54 +0000 (16:07 -0700)
commit7e3c741abdae964b8f8aa9f46cf51143e2d0f686
tree4e788e34be0ff993825b50f12e236a49973a8683
parenta2c0b85945e75901906d0aa82ef9a0bea96f85ce
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rtc/rtc-hid-sensor-time.c