summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-hid-sensor-time.c
Commit message (Collapse)AuthorAgeFilesLines
* rtc: rtc-hid-sensor-time: allow 16 and 32 bit values for all attributes.Alexander Holler2013-07-031-27/+32
| | | | | | | | | | | | | | There is no real reason to not support 16 or 32 bit values 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>
* rtc: rtc-hid-sensor-time: allow full years (16bit) in HID reportsAlexander Holler2013-07-031-7/+26
| | | | | | | | | | | | | | | | | | | | | | 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>
* rtc: hid-sensor-time: use devm_rtc_device_register()Jingoo Han2013-04-291-4/+3
| | | | | | | | | devm_rtc_device_register() is device managed and makes cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* rtc: hid-sensor-time: Add missing spin_lock_initAxel Lin2013-01-261-0/+1
| | | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Alexander Holler <holler@ahsoftware.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* hid: iio: rename struct hid_sensor_iio_common to hid_sensor_commonAlexander Holler2013-01-061-1/+1
| | | | | | | | | The structure with common attributes for hid-sensors isn't specific to the iio-subsystem, so rename it to hid_sensor_common. Signed-off-by: Alexander Holler <holler@ahsoftware.de> Acked-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* rtc: add rtc-driver for HID sensors of type timeAlexander Holler2013-01-061-0/+291
This driver makes the time from HID sensors (hubs) which are offering such available like any other RTC does. It is necessary that all values like year, month etc, are send as 8bit values (1 byte each) and all of them in 1 report. Also the spec HUTRR39b doesn't define the range of the year field, we tread it as 0 - 99 because that's what most RTCs I know about are offering. Currently the time can only be read. Setting the time must be done through sending a report (or a feature). The spec currently doesn't define how and I'm not sure if I just should define something by myself. Signed-off-by: Alexander Holler <holler@ahsoftware.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
OpenPOWER on IntegriCloud