Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1471518

[PATCH] iio: fix pressure data output unit in hid-sensor-attributes

From "Kweh, Hock Leong" <hock.leong.kweh@intel.com>
Newsgroups linux.kernel
Subject [PATCH] iio: fix pressure data output unit in hid-sensor-attributes
Date 2016-08-29 04:50 +0200
Message-ID <sbkO5-1yo-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


From: "Kweh, Hock Leong" <hock.leong.kweh@intel.com>

According to IIO ABI definition, IIO_PRESSURE data output unit is
kilopascal:
http://lxr.free-electrons.com/source/Documentation/ABI/testing/sysfs-bus-iio

This patch fix output unit of HID pressure sensor IIO driver from pascal to
kilopascal to follow IIO ABI definition.

Signed-off-by: Kweh, Hock Leong <hock.leong.kweh@intel.com>
---
 .../iio/common/hid-sensors/hid-sensor-attributes.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/common/hid-sensors/hid-sensor-attributes.c b/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
index e81f434..dc33c1d 100644
--- a/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
+++ b/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
@@ -56,8 +56,8 @@ static struct {
 	{HID_USAGE_SENSOR_ALS, 0, 1, 0},
 	{HID_USAGE_SENSOR_ALS, HID_USAGE_SENSOR_UNITS_LUX, 1, 0},
 
-	{HID_USAGE_SENSOR_PRESSURE, 0, 100000, 0},
-	{HID_USAGE_SENSOR_PRESSURE, HID_USAGE_SENSOR_UNITS_PASCAL, 1, 0},
+	{HID_USAGE_SENSOR_PRESSURE, 0, 100, 0},
+	{HID_USAGE_SENSOR_PRESSURE, HID_USAGE_SENSOR_UNITS_PASCAL, 0, 1000},
 };
 
 static int pow_10(unsigned power)
-- 
1.7.9.5

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] iio: fix pressure data output unit in hid-sensor-attributes "Kweh, Hock Leong" <hock.leong.kweh@intel.com> - 2016-08-29 04:50 +0200
  Re: [PATCH] iio: fix pressure data output unit in  hid-sensor-attributes "Pandruvada, Srinivas" <srinivas.pandruvada@intel.com> - 2016-08-30 22:00 +0200
    Re: [PATCH] iio: fix pressure data output unit in  hid-sensor-attributes Jonathan Cameron <jic23@kernel.org> - 2016-09-03 18:20 +0200

csiph-web