]> 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>
Thu, 27 Jun 2013 23:53:24 +0000 (09:53 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 28 Jun 2013 06:38:40 +0000 (16:38 +1000)
commit6c42a2f41b98e64f73afdbe285eac108be726410
tree7b7c4a1b8aa2cf96bafca5c11e2ae4182b64f0ec
parent7d9d39c3dd2ead38f42b3e6f9a1866623d145439
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