]> git.baikalelectronics.ru Git - kernel.git/commit
iio: hid-sensors: Set default unit of measure for report interval
authorArchana Patni <archana.patni@linux.intel.com>
Tue, 5 Aug 2014 13:36:00 +0000 (14:36 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sat, 10 May 2014 10:45:02 +0000 (11:45 +0100)
commitc5d0c2c5fe4f2241e1abf65a45d2b497e2b894e0
treeb40308e10d4819f65b50a25d1a71ba801ea9e220
parent5ebcc91fd3d71112d14803b5d909b6da9e40c067
iio: hid-sensors: Set default unit of measure for report interval

For PROP_REPORT_INTERVAL, the spec does not mandate the presence
of the report interval unit in the feature report and expects the
default unit of measure to be used as milliseconds.

Currently, when the unit is not present, it gets set as zero leading
to issues in sampling frequency.

This patch sets the unit of measure to the default unit if it
is not defined by firmware.

Signed-off-by: Archana Patni <archana.patni@intel.com>
Signed-off-by: Subramony Sesha <subramony.sesha@intel.com>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/common/hid-sensors/hid-sensor-attributes.c