All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio: fix pressure data output unit in hid-sensor-attributes
@ 2016-08-29 10:50 ` Kweh, Hock Leong
  0 siblings, 0 replies; 6+ messages in thread
From: Kweh, Hock Leong @ 2016-08-29 10:50 UTC (permalink / raw)
  To: Jonathan Cameron, Pandruvada Srinivas, Jiri Kosina
  Cc: linux-iio, LKML, linux-input, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler, Ong Boon Leong, Lim Lee Booi,
	Lay Kuan Loon, Ooi Joyce, Kweh, Hock Leong

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] iio: fix pressure data output unit in hid-sensor-attributes
@ 2016-08-29 10:50 ` Kweh, Hock Leong
  0 siblings, 0 replies; 6+ messages in thread
From: Kweh, Hock Leong @ 2016-08-29 10:50 UTC (permalink / raw)
  To: Jonathan Cameron, Pandruvada Srinivas, Jiri Kosina
  Cc: linux-iio, LKML, linux-input, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler, Ong Boon Leong, Lim Lee Booi,
	Lay Kuan Loon, Ooi Joyce, Kweh, Hock Leong

From: "Kweh, Hock Leong" <hock.leong.kweh-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

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-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 .../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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] iio: fix pressure data output unit in hid-sensor-attributes
  2016-08-29 10:50 ` Kweh, Hock Leong
@ 2016-08-30 19:49   ` Pandruvada, Srinivas
  -1 siblings, 0 replies; 6+ messages in thread
From: Pandruvada, Srinivas @ 2016-08-30 19:49 UTC (permalink / raw)
  To: jikos, Kweh, Hock Leong, jic23
  Cc: Lay, Kuan Loon, linux-kernel, lars, knaack.h, Ong, Boon Leong,
	linux-iio, pmeerw, Ooi, Joyce, linux-input, Lim, Lee Booi

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>

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] iio: fix pressure data output unit in hid-sensor-attributes
@ 2016-08-30 19:49   ` Pandruvada, Srinivas
  0 siblings, 0 replies; 6+ messages in thread
From: Pandruvada, Srinivas @ 2016-08-30 19:49 UTC (permalink / raw)
  To: jikos, Kweh, Hock Leong, jic23
  Cc: Lay, Kuan Loon, linux-kernel, lars, knaack.h, Ong, Boon Leong,
	linux-iio, pmeerw, Ooi, Joyce, linux-input, Lim, Lee Booi

T24gTW9uLCAyMDE2LTA4LTI5IGF0IDE4OjUwICswODAwLCBLd2VoLCBIb2NrIExlb25nIHdyb3Rl
Og0KPiBGcm9tOiAiS3dlaCwgSG9jayBMZW9uZyIgPGhvY2subGVvbmcua3dlaEBpbnRlbC5jb20+
DQo+IA0KPiBBY2NvcmRpbmcgdG8gSUlPIEFCSSBkZWZpbml0aW9uLCBJSU9fUFJFU1NVUkUgZGF0
YSBvdXRwdXQgdW5pdCBpcw0KPiBraWxvcGFzY2FsOg0KPiBodHRwOi8vbHhyLmZyZWUtZWxlY3Ry
b25zLmNvbS9zb3VyY2UvRG9jdW1lbnRhdGlvbi9BQkkvdGVzdGluZy9zeXNmcy0NCj4gYnVzLWlp
bw0KPiANCj4gVGhpcyBwYXRjaCBmaXggb3V0cHV0IHVuaXQgb2YgSElEIHByZXNzdXJlIHNlbnNv
ciBJSU8gZHJpdmVyIGZyb20NCj4gcGFzY2FsIHRvDQo+IGtpbG9wYXNjYWwgdG8gZm9sbG93IElJ
TyBBQkkgZGVmaW5pdGlvbi4NCj4gDQo+IFNpZ25lZC1vZmYtYnk6IEt3ZWgsIEhvY2sgTGVvbmcg
PGhvY2subGVvbmcua3dlaEBpbnRlbC5jb20+DQpSZXZpZXdlZC1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dFX1NFTlNPUl9QUkVTU1VSRSwgMCwgMTAwLCAwfSwNCj4gKwl7SElEX1VT
QUdFX1NFTlNPUl9QUkVTU1VSRSwgSElEX1VTQUdFX1NFTlNPUl9VTklUU19QQVNDQUwsDQo+IDAs
IDEwMDB9LA0KPiDCoH07DQo+IMKgDQo+IMKgc3RhdGljIGludCBwb3dfMTAodW5zaWduZWQgcG93
ZXIp

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] iio: fix pressure data output unit in hid-sensor-attributes
@ 2016-09-03 16:10     ` Jonathan Cameron
  0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2016-09-03 16:10 UTC (permalink / raw)
  To: Pandruvada, Srinivas, jikos, Kweh, Hock Leong
  Cc: Lay, Kuan Loon, linux-kernel, lars, knaack.h, Ong, Boon Leong,
	linux-iio, pmeerw, Ooi, Joyce, linux-input, Lim, Lee Booi

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)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] iio: fix pressure data output unit in hid-sensor-attributes
@ 2016-09-03 16:10     ` Jonathan Cameron
  0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2016-09-03 16:10 UTC (permalink / raw)
  To: Pandruvada, Srinivas, jikos-DgEjT+Ai2ygdnm+yROfE0A, Kweh, Hock Leong
  Cc: Lay, Kuan Loon, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	lars-Qo5EllUWu/uELgA04lAiVw, knaack.h-Mmb7MZpHnFY, Ong,
	Boon Leong, linux-iio-u79uwXL29TY76Z2rM5mHXA,
	pmeerw-jW+XmwGofnusTnJN9+BGXg, Ooi, Joyce,
	linux-input-u79uwXL29TY76Z2rM5mHXA, Lim, Lee Booi

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-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>>
>> 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-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
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)

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-09-03 16:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-29 10:50 [PATCH] iio: fix pressure data output unit in hid-sensor-attributes Kweh, Hock Leong
2016-08-29 10:50 ` Kweh, Hock Leong
2016-08-30 19:49 ` Pandruvada, Srinivas
2016-08-30 19:49   ` Pandruvada, Srinivas
2016-09-03 16:10   ` Jonathan Cameron
2016-09-03 16:10     ` Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.