lkml.org 
[lkml]   [2016]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] iio: fix pressure data output unit in hid-sensor-attributes
From
Date
On 30/08/16 20:49, Pandruvada, Srinivas wrote:
> On Mon, 2016-08-29 at 18:50 +0800, Kweh, Hock Leong wrote:
>> 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>
> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Thanks,

Applied to the fixes-togreg branch of iio.git and marked for stable.

Jonathan
>
>> ---
>> .../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)

\
 
 \ /
  Last update: 2016-09-17 09:58    [W:0.073 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site