From: "Kweh, Hock Leong" <hock.leong.kweh@intel.com>
To: Jonathan Cameron <jic23@kernel.org>,
Pandruvada Srinivas <srinivas.pandruvada@intel.com>,
Jiri Kosina <jikos@kernel.org>
Cc: linux-iio <linux-iio@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-input <linux-input@vger.kernel.org>,
Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
Ong Boon Leong <boon.leong.ong@intel.com>,
Lim Lee Booi <lee.booi.lim@intel.com>,
Lay Kuan Loon <kuan.loon.lay@intel.com>,
Ooi Joyce <joyce.ooi@intel.com>,
"Kweh, Hock Leong" <hock.leong.kweh@intel.com>
Subject: [PATCH] iio: fix pressure data output unit in hid-sensor-attributes
Date: Mon, 29 Aug 2016 18:50:56 +0800 [thread overview]
Message-ID: <1472467856-14526-1-git-send-email-hock.leong.kweh@intel.com> (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
next reply other threads:[~2016-08-29 2:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-29 10:50 Kweh, Hock Leong [this message]
2016-08-30 19:49 ` [PATCH] iio: fix pressure data output unit in hid-sensor-attributes Pandruvada, Srinivas
2016-09-03 16:10 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1472467856-14526-1-git-send-email-hock.leong.kweh@intel.com \
--to=hock.leong.kweh@intel.com \
--cc=boon.leong.ong@intel.com \
--cc=jic23@kernel.org \
--cc=jikos@kernel.org \
--cc=joyce.ooi@intel.com \
--cc=knaack.h@gmx.de \
--cc=kuan.loon.lay@intel.com \
--cc=lars@metafoo.de \
--cc=lee.booi.lim@intel.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
--cc=srinivas.pandruvada@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).