All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio: hid: hid-sensor-accel-3d: Add second ACC sensor support
@ 2017-03-16 10:20 ` Song Hongyan
  0 siblings, 0 replies; 14+ messages in thread
From: Song Hongyan @ 2017-03-16 10:20 UTC (permalink / raw)
  To: linux-input-u79uwXL29TY76Z2rM5mHXA, linux-iio-u79uwXL29TY76Z2rM5mHXA
  Cc: jikos-DgEjT+Ai2ygdnm+yROfE0A, jic23-DgEjT+Ai2ygdnm+yROfE0A,
	srinivas.pandruvada-ral2JQCrhuEAvxtiuMwx3w, Song Hongyan

As accelerometer sensor becomes more and more popular, there are more
user scenarios have been developed, "Hinge" is a very important usecase
which needs two accelerometer sensors to calculate the included angle
of keyboard and screen.
In this case, two accelerometer sensors will be exposed. Currently,
IIO interface hasn't other way to distinguish two sensors with same
sensor type, except sensor name. So a new sensor name "accel_2nd_3d"
is added for secondary accelerometer sensor.

In HID level, connection type is a good common property to
differentiate two sensors with same sensor type.

Signed-off-by: Song Hongyan <hongyan.song-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/iio/accel/hid-sensor-accel-3d.c            | 35 ++++++++++++++++++++--
 .../iio/common/hid-sensors/hid-sensor-attributes.c |  5 ++++
 include/linux/hid-sensor-hub.h                     |  1 +
 include/linux/hid-sensor-ids.h                     |  1 +
 4 files changed, 40 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/accel/hid-sensor-accel-3d.c b/drivers/iio/accel/hid-sensor-accel-3d.c
index ca5759c..cc4366e 100644
--- a/drivers/iio/accel/hid-sensor-accel-3d.c
+++ b/drivers/iio/accel/hid-sensor-accel-3d.c
@@ -31,6 +31,13 @@
 #include <linux/iio/triggered_buffer.h>
 #include "../common/hid-sensors/hid-sensor-trigger.h"
 
+enum connection_type {
+	CONN_PC_INTEGRATED_SEL,
+	CONN_PC_ATTACHED_SEL,
+	CONN_PC_EXTERNAL_SEL,
+	CONN_TYPE_MAX,
+};
+
 enum accel_3d_channel {
 	CHANNEL_SCAN_INDEX_X,
 	CHANNEL_SCAN_INDEX_Y,
@@ -343,6 +350,19 @@ static int accel_3d_parse_report(struct platform_device *pdev,
 	return ret;
 }
 
+int connection_type_check(struct hid_sensor_common *st, int *conn_tp)
+{
+	int ret;
+
+	ret = sensor_hub_get_feature(st->hsdev, st->conn_type.report_id,
+		st->conn_type.index, sizeof(*conn_tp), conn_tp);
+
+	if (ret < 0 || conn_tp < 0)
+		return -EINVAL;
+
+	return ret;
+}
+
 /* Function to initialize the processing for usage id */
 static int hid_accel_3d_probe(struct platform_device *pdev)
 {
@@ -352,6 +372,7 @@ static int hid_accel_3d_probe(struct platform_device *pdev)
 	struct accel_3d_state *accel_state;
 	const struct iio_chan_spec *channel_spec;
 	int channel_size;
+	s32 conn_type;
 
 	struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data;
 
@@ -367,11 +388,9 @@ static int hid_accel_3d_probe(struct platform_device *pdev)
 	accel_state->common_attributes.pdev = pdev;
 
 	if (hsdev->usage == HID_USAGE_SENSOR_ACCEL_3D) {
-		name = "accel_3d";
 		channel_spec = accel_3d_channels;
 		channel_size = sizeof(accel_3d_channels);
 	} else {
-		name = "gravity";
 		channel_spec = gravity_channels;
 		channel_size = sizeof(gravity_channels);
 	}
@@ -387,6 +406,18 @@ static int hid_accel_3d_probe(struct platform_device *pdev)
 		dev_err(&pdev->dev, "failed to duplicate channels\n");
 		return -ENOMEM;
 	}
+
+	ret = connection_type_check(&accel_state->common_attributes,
+				&conn_type);
+
+	if (hsdev->usage == HID_USAGE_SENSOR_ACCEL_3D) {
+		if (conn_type == CONN_PC_EXTERNAL_SEL)
+			name = "accel_2nd_3d";
+		else
+			name = "accel_3d";
+	} else
+		name = "gravity";
+
 	ret = accel_3d_parse_report(pdev, hsdev,
 				(struct iio_chan_spec *)indio_dev->channels,
 				hsdev->usage, accel_state);
diff --git a/drivers/iio/common/hid-sensors/hid-sensor-attributes.c b/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
index 4f280ae..cc2ce2a 100644
--- a/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
+++ b/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
@@ -400,6 +400,11 @@ int hid_sensor_parse_common_attributes(struct hid_sensor_hub_device *hsdev,
 			 &st->sensitivity);
 
 	sensor_hub_input_get_attribute_info(hsdev,
+					HID_FEATURE_REPORT, usage_id,
+					HID_USAGE_SENSOR_PROP_CONN_TYPE,
+					&st->conn_type);
+
+	sensor_hub_input_get_attribute_info(hsdev,
 					    HID_INPUT_REPORT, usage_id,
 					    HID_USAGE_SENSOR_TIME_TIMESTAMP,
 					    &timestamp);
diff --git a/include/linux/hid-sensor-hub.h b/include/linux/hid-sensor-hub.h
index 7ef111d..08756a9 100644
--- a/include/linux/hid-sensor-hub.h
+++ b/include/linux/hid-sensor-hub.h
@@ -237,6 +237,7 @@ struct hid_sensor_common {
 	struct hid_sensor_hub_attribute_info report_state;
 	struct hid_sensor_hub_attribute_info power_state;
 	struct hid_sensor_hub_attribute_info sensitivity;
+	struct hid_sensor_hub_attribute_info conn_type;
 	struct work_struct work;
 };
 
diff --git a/include/linux/hid-sensor-ids.h b/include/linux/hid-sensor-ids.h
index 719c928..2d349f7 100644
--- a/include/linux/hid-sensor-ids.h
+++ b/include/linux/hid-sensor-ids.h
@@ -135,6 +135,7 @@
 #define HID_USAGE_SENSOR_UNITS_DEGREES_PER_SECOND		0x15
 
 /* Common selectors */
+#define HID_USAGE_SENSOR_PROP_CONN_TYPE				0x200309
 #define HID_USAGE_SENSOR_PROP_REPORT_INTERVAL			0x20030E
 #define HID_USAGE_SENSOR_PROP_SENSITIVITY_ABS			0x20030F
 #define HID_USAGE_SENSOR_PROP_SENSITIVITY_RANGE_PCT		0x200310
-- 
1.9.1

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

* [PATCH] iio: hid: hid-sensor-accel-3d: Add second ACC sensor support
@ 2017-03-16 10:20 ` Song Hongyan
  0 siblings, 0 replies; 14+ messages in thread
From: Song Hongyan @ 2017-03-16 10:20 UTC (permalink / raw)
  To: linux-input, linux-iio; +Cc: jikos, jic23, srinivas.pandruvada, Song Hongyan

As accelerometer sensor becomes more and more popular, there are more
user scenarios have been developed, "Hinge" is a very important usecase
which needs two accelerometer sensors to calculate the included angle
of keyboard and screen.
In this case, two accelerometer sensors will be exposed. Currently,
IIO interface hasn't other way to distinguish two sensors with same
sensor type, except sensor name. So a new sensor name "accel_2nd_3d"
is added for secondary accelerometer sensor.

In HID level, connection type is a good common property to
differentiate two sensors with same sensor type.

Signed-off-by: Song Hongyan <hongyan.song@intel.com>
---
 drivers/iio/accel/hid-sensor-accel-3d.c            | 35 ++++++++++++++++++++--
 .../iio/common/hid-sensors/hid-sensor-attributes.c |  5 ++++
 include/linux/hid-sensor-hub.h                     |  1 +
 include/linux/hid-sensor-ids.h                     |  1 +
 4 files changed, 40 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/accel/hid-sensor-accel-3d.c b/drivers/iio/accel/hid-sensor-accel-3d.c
index ca5759c..cc4366e 100644
--- a/drivers/iio/accel/hid-sensor-accel-3d.c
+++ b/drivers/iio/accel/hid-sensor-accel-3d.c
@@ -31,6 +31,13 @@
 #include <linux/iio/triggered_buffer.h>
 #include "../common/hid-sensors/hid-sensor-trigger.h"
 
+enum connection_type {
+	CONN_PC_INTEGRATED_SEL,
+	CONN_PC_ATTACHED_SEL,
+	CONN_PC_EXTERNAL_SEL,
+	CONN_TYPE_MAX,
+};
+
 enum accel_3d_channel {
 	CHANNEL_SCAN_INDEX_X,
 	CHANNEL_SCAN_INDEX_Y,
@@ -343,6 +350,19 @@ static int accel_3d_parse_report(struct platform_device *pdev,
 	return ret;
 }
 
+int connection_type_check(struct hid_sensor_common *st, int *conn_tp)
+{
+	int ret;
+
+	ret = sensor_hub_get_feature(st->hsdev, st->conn_type.report_id,
+		st->conn_type.index, sizeof(*conn_tp), conn_tp);
+
+	if (ret < 0 || conn_tp < 0)
+		return -EINVAL;
+
+	return ret;
+}
+
 /* Function to initialize the processing for usage id */
 static int hid_accel_3d_probe(struct platform_device *pdev)
 {
@@ -352,6 +372,7 @@ static int hid_accel_3d_probe(struct platform_device *pdev)
 	struct accel_3d_state *accel_state;
 	const struct iio_chan_spec *channel_spec;
 	int channel_size;
+	s32 conn_type;
 
 	struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data;
 
@@ -367,11 +388,9 @@ static int hid_accel_3d_probe(struct platform_device *pdev)
 	accel_state->common_attributes.pdev = pdev;
 
 	if (hsdev->usage == HID_USAGE_SENSOR_ACCEL_3D) {
-		name = "accel_3d";
 		channel_spec = accel_3d_channels;
 		channel_size = sizeof(accel_3d_channels);
 	} else {
-		name = "gravity";
 		channel_spec = gravity_channels;
 		channel_size = sizeof(gravity_channels);
 	}
@@ -387,6 +406,18 @@ static int hid_accel_3d_probe(struct platform_device *pdev)
 		dev_err(&pdev->dev, "failed to duplicate channels\n");
 		return -ENOMEM;
 	}
+
+	ret = connection_type_check(&accel_state->common_attributes,
+				&conn_type);
+
+	if (hsdev->usage == HID_USAGE_SENSOR_ACCEL_3D) {
+		if (conn_type == CONN_PC_EXTERNAL_SEL)
+			name = "accel_2nd_3d";
+		else
+			name = "accel_3d";
+	} else
+		name = "gravity";
+
 	ret = accel_3d_parse_report(pdev, hsdev,
 				(struct iio_chan_spec *)indio_dev->channels,
 				hsdev->usage, accel_state);
diff --git a/drivers/iio/common/hid-sensors/hid-sensor-attributes.c b/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
index 4f280ae..cc2ce2a 100644
--- a/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
+++ b/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
@@ -400,6 +400,11 @@ int hid_sensor_parse_common_attributes(struct hid_sensor_hub_device *hsdev,
 			 &st->sensitivity);
 
 	sensor_hub_input_get_attribute_info(hsdev,
+					HID_FEATURE_REPORT, usage_id,
+					HID_USAGE_SENSOR_PROP_CONN_TYPE,
+					&st->conn_type);
+
+	sensor_hub_input_get_attribute_info(hsdev,
 					    HID_INPUT_REPORT, usage_id,
 					    HID_USAGE_SENSOR_TIME_TIMESTAMP,
 					    &timestamp);
diff --git a/include/linux/hid-sensor-hub.h b/include/linux/hid-sensor-hub.h
index 7ef111d..08756a9 100644
--- a/include/linux/hid-sensor-hub.h
+++ b/include/linux/hid-sensor-hub.h
@@ -237,6 +237,7 @@ struct hid_sensor_common {
 	struct hid_sensor_hub_attribute_info report_state;
 	struct hid_sensor_hub_attribute_info power_state;
 	struct hid_sensor_hub_attribute_info sensitivity;
+	struct hid_sensor_hub_attribute_info conn_type;
 	struct work_struct work;
 };
 
diff --git a/include/linux/hid-sensor-ids.h b/include/linux/hid-sensor-ids.h
index 719c928..2d349f7 100644
--- a/include/linux/hid-sensor-ids.h
+++ b/include/linux/hid-sensor-ids.h
@@ -135,6 +135,7 @@
 #define HID_USAGE_SENSOR_UNITS_DEGREES_PER_SECOND		0x15
 
 /* Common selectors */
+#define HID_USAGE_SENSOR_PROP_CONN_TYPE				0x200309
 #define HID_USAGE_SENSOR_PROP_REPORT_INTERVAL			0x20030E
 #define HID_USAGE_SENSOR_PROP_SENSITIVITY_ABS			0x20030F
 #define HID_USAGE_SENSOR_PROP_SENSITIVITY_RANGE_PCT		0x200310
-- 
1.9.1


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

* Re: [PATCH] iio: hid: hid-sensor-accel-3d: Add second ACC sensor support
  2017-03-16 10:20 ` Song Hongyan
  (?)
@ 2017-03-16 12:01 ` Bastien Nocera
       [not found]   ` <1489665702.18490.12.camel-0MeiytkfxGOsTnJN9+BGXg@public.gmane.org>
  -1 siblings, 1 reply; 14+ messages in thread
From: Bastien Nocera @ 2017-03-16 12:01 UTC (permalink / raw)
  To: Song Hongyan, linux-input, linux-iio; +Cc: jikos, jic23, srinivas.pandruvada

On Thu, 2017-03-16 at 18:20 +0800, Song Hongyan wrote:
> As accelerometer sensor becomes more and more popular, there are more
> user scenarios have been developed, "Hinge" is a very important
> usecase
> which needs two accelerometer sensors to calculate the included angle
> of keyboard and screen.
> In this case, two accelerometer sensors will be exposed. Currently,
> IIO interface hasn't other way to distinguish two sensors with same
> sensor type, except sensor name. So a new sensor name "accel_2nd_3d"
> is added for secondary accelerometer sensor.
> 
> In HID level, connection type is a good common property to
> differentiate two sensors with same sensor type.

I've been told in the past not to rely on device names in iio-sensor-
proxy, and this would go against this advice.

As you have a "type" to export, why not export that instead?

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

* RE: [PATCH] iio: hid: hid-sensor-accel-3d: Add second ACC sensor support
  2017-03-16 12:01 ` Bastien Nocera
@ 2017-03-17  1:21       ` Song, Hongyan
  0 siblings, 0 replies; 14+ messages in thread
From: Song, Hongyan @ 2017-03-17  1:21 UTC (permalink / raw)
  To: Bastien Nocera, linux-input-u79uwXL29TY76Z2rM5mHXA,
	linux-iio-u79uwXL29TY76Z2rM5mHXA
  Cc: jikos-DgEjT+Ai2ygdnm+yROfE0A, jic23-DgEjT+Ai2ygdnm+yROfE0A,
	Pandruvada, Srinivas

Hi,
	Thanks for your comments. But I am not sure what your "type" mean.
If you mean "sensor type", I expose it as second ACC, the sensor type is the same with the exist ACC,
It cannot be used as a distinction.
If you mean the "connection type" I used in the patch, "connection type" is only defined in HID driver,
It is not a common property in IIO. So not good to expose it out.


BR
Song Hongyan  

-----Original Message-----
From: Bastien Nocera [mailto:hadess@hadess.net] 
Sent: Thursday, March 16, 2017 8:02 PM
To: Song, Hongyan <hongyan.song@intel.com>; linux-input@vger.kernel.org; linux-iio@vger.kernel.org
Cc: jikos@kernel.org; jic23@kernel.org; Pandruvada, Srinivas <srinivas.pandruvada@intel.com>
Subject: Re: [PATCH] iio: hid: hid-sensor-accel-3d: Add second ACC sensor support

On Thu, 2017-03-16 at 18:20 +0800, Song Hongyan wrote:
> As accelerometer sensor becomes more and more popular, there are more 
> user scenarios have been developed, "Hinge" is a very important 
> usecase which needs two accelerometer sensors to calculate the 
> included angle of keyboard and screen.
> In this case, two accelerometer sensors will be exposed. Currently, 
> IIO interface hasn't other way to distinguish two sensors with same 
> sensor type, except sensor name. So a new sensor name "accel_2nd_3d"
> is added for secondary accelerometer sensor.
> 
> In HID level, connection type is a good common property to 
> differentiate two sensors with same sensor type.

I've been told in the past not to rely on device names in iio-sensor- proxy, and this would go against this advice.

As you have a "type" to export, why not export that instead?

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

* RE: [PATCH] iio: hid: hid-sensor-accel-3d: Add second ACC sensor support
@ 2017-03-17  1:21       ` Song, Hongyan
  0 siblings, 0 replies; 14+ messages in thread
From: Song, Hongyan @ 2017-03-17  1:21 UTC (permalink / raw)
  To: Bastien Nocera, linux-input, linux-iio; +Cc: jikos, jic23, Pandruvada, Srinivas

SGksDQoJVGhhbmtzIGZvciB5b3VyIGNvbW1lbnRzLiBCdXQgSSBhbSBub3Qgc3VyZSB3aGF0IHlv
dXIgInR5cGUiIG1lYW4uDQpJZiB5b3UgbWVhbiAic2Vuc29yIHR5cGUiLCBJIGV4cG9zZSBpdCBh
cyBzZWNvbmQgQUNDLCB0aGUgc2Vuc29yIHR5cGUgaXMgdGhlIHNhbWUgd2l0aCB0aGUgZXhpc3Qg
QUNDLA0KSXQgY2Fubm90IGJlIHVzZWQgYXMgYSBkaXN0aW5jdGlvbi4NCklmIHlvdSBtZWFuIHRo
ZSAiY29ubmVjdGlvbiB0eXBlIiBJIHVzZWQgaW4gdGhlIHBhdGNoLCAiY29ubmVjdGlvbiB0eXBl
IiBpcyBvbmx5IGRlZmluZWQgaW4gSElEIGRyaXZlciwNCkl0IGlzIG5vdCBhIGNvbW1vbiBwcm9w
ZXJ0eSBpbiBJSU8uIFNvIG5vdCBnb29kIHRvIGV4cG9zZSBpdCBvdXQuDQoNCg0KQlINClNvbmcg
SG9uZ3lhbiAgDQoNCi0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQpGcm9tOiBCYXN0aWVuIE5v
Y2VyYSBbbWFpbHRvOmhhZGVzc0BoYWRlc3MubmV0XSANClN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zb3IgdHlwZSwgZXhjZXB0IHNlbnNvciBuYW1lLiBTbyBhIG5ldyBzZW5zb3Ig
bmFtZSAiYWNjZWxfMm5kXzNkIg0KPiBpcyBhZGRlZCBmb3Igc2Vjb25kYXJ5IGFjY2VsZXJvbWV0
ZXIgc2Vuc29yLg0KPiANCj4gSW4gSElEIGxldmVsLCBjb25uZWN0aW9uIHR5cGUgaXMgYSBnb29k
IGNvbW1vbiBwcm9wZXJ0eSB0byANCj4gZGlmZmVyZW50aWF0ZSB0d28gc2Vuc29ycyB3aXRoIHNh
bWUgc2Vuc29yIHR5cGUuDQoNCkkndmUgYmVlbiB0b2xkIGluIHRoZSBwYXN0IG5vdCB0byByZWx5
IG9uIGRldmljZSBuYW1lcyBpbiBpaW8tc2Vuc29yLSBwcm94eSwgYW5kIHRoaXMgd291bGQgZ28g
YWdhaW5zdCB0aGlzIGFkdmljZS4NCg0KQXMgeW91IGhhdmUgYSAidHlwZSIgdG8gZXhwb3J0LCB3
aHkgbm90IGV4cG9ydCB0aGF0IGluc3RlYWQ/DQo=

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

* Re: [PATCH] iio: hid: hid-sensor-accel-3d: Add second ACC sensor support
  2017-03-16 10:20 ` Song Hongyan
@ 2017-03-17  2:13     ` Pandruvada, Srinivas
  -1 siblings, 0 replies; 14+ messages in thread
From: Pandruvada, Srinivas @ 2017-03-17  2:13 UTC (permalink / raw)
  To: linux-input-u79uwXL29TY76Z2rM5mHXA, Song, Hongyan,
	linux-iio-u79uwXL29TY76Z2rM5mHXA
  Cc: jikos-DgEjT+Ai2ygdnm+yROfE0A, jic23-DgEjT+Ai2ygdnm+yROfE0A

On Thu, 2017-03-16 at 18:20 +0800, Song Hongyan wrote:
> As accelerometer sensor becomes more and more popular, there are more
> user scenarios have been developed, "Hinge" is a very important
> usecase
> which needs two accelerometer sensors to calculate the included angle
> of keyboard and screen.
> In this case, two accelerometer sensors will be exposed. Currently,
> IIO interface hasn't other way to distinguish two sensors with same
> sensor type, except sensor name. So a new sensor name "accel_2nd_3d"
> is added for secondary accelerometer sensor.

This type of interface will not satisfy all cases. We have some hubs
with  many accelerometers attached. Same case is also true even for
discrete sensors. So there should be some framework way to expose
location of sensors.

ACPI has special method called _PLD (Physical Device Location), which
can  be used to specify location of any device. So we need to be able
to export such information to user space. We can add for each sensor
the location information.

I can propose some ABI for exporting location information.

Thought?

Thanks,
Srinivas


> 
> In HID level, connection type is a good common property to
> differentiate two sensors with same sensor type.
> 
> Signed-off-by: Song Hongyan <hongyan.song@intel.com>
> ---
>  drivers/iio/accel/hid-sensor-accel-3d.c            | 35
> ++++++++++++++++++++--
>  .../iio/common/hid-sensors/hid-sensor-attributes.c |  5 ++++
>  include/linux/hid-sensor-hub.h                     |  1 +
>  include/linux/hid-sensor-ids.h                     |  1 +
>  4 files changed, 40 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/accel/hid-sensor-accel-3d.c
> b/drivers/iio/accel/hid-sensor-accel-3d.c
> index ca5759c..cc4366e 100644
> --- a/drivers/iio/accel/hid-sensor-accel-3d.c
> +++ b/drivers/iio/accel/hid-sensor-accel-3d.c
> @@ -31,6 +31,13 @@
>  #include <linux/iio/triggered_buffer.h>
>  #include "../common/hid-sensors/hid-sensor-trigger.h"
>  
> +enum connection_type {
> +	CONN_PC_INTEGRATED_SEL,
> +	CONN_PC_ATTACHED_SEL,
> +	CONN_PC_EXTERNAL_SEL,
> +	CONN_TYPE_MAX,
> +};
> +
>  enum accel_3d_channel {
>  	CHANNEL_SCAN_INDEX_X,
>  	CHANNEL_SCAN_INDEX_Y,
> @@ -343,6 +350,19 @@ static int accel_3d_parse_report(struct
> platform_device *pdev,
>  	return ret;
>  }
>  
> +int connection_type_check(struct hid_sensor_common *st, int
> *conn_tp)
> +{
> +	int ret;
> +
> +	ret = sensor_hub_get_feature(st->hsdev, st-
> >conn_type.report_id,
> +		st->conn_type.index, sizeof(*conn_tp), conn_tp);
> +
> +	if (ret < 0 || conn_tp < 0)
> +		return -EINVAL;
> +
> +	return ret;
> +}
> +
>  /* Function to initialize the processing for usage id */
>  static int hid_accel_3d_probe(struct platform_device *pdev)
>  {
> @@ -352,6 +372,7 @@ static int hid_accel_3d_probe(struct
> platform_device *pdev)
>  	struct accel_3d_state *accel_state;
>  	const struct iio_chan_spec *channel_spec;
>  	int channel_size;
> +	s32 conn_type;
>  
>  	struct hid_sensor_hub_device *hsdev = pdev-
> >dev.platform_data;
>  
> @@ -367,11 +388,9 @@ static int hid_accel_3d_probe(struct
> platform_device *pdev)
>  	accel_state->common_attributes.pdev = pdev;
>  
>  	if (hsdev->usage == HID_USAGE_SENSOR_ACCEL_3D) {
> -		name = "accel_3d";
>  		channel_spec = accel_3d_channels;
>  		channel_size = sizeof(accel_3d_channels);
>  	} else {
> -		name = "gravity";
>  		channel_spec = gravity_channels;
>  		channel_size = sizeof(gravity_channels);
>  	}
> @@ -387,6 +406,18 @@ static int hid_accel_3d_probe(struct
> platform_device *pdev)
>  		dev_err(&pdev->dev, "failed to duplicate
> channels\n");
>  		return -ENOMEM;
>  	}
> +
> +	ret = connection_type_check(&accel_state->common_attributes,
> +				&conn_type);
> +
> +	if (hsdev->usage == HID_USAGE_SENSOR_ACCEL_3D) {
> +		if (conn_type == CONN_PC_EXTERNAL_SEL)
> +			name = "accel_2nd_3d";
> +		else
> +			name = "accel_3d";
> +	} else
> +		name = "gravity";
> +
>  	ret = accel_3d_parse_report(pdev, hsdev,
>  				(struct iio_chan_spec *)indio_dev-
> >channels,
>  				hsdev->usage, accel_state);
> diff --git a/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
> b/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
> index 4f280ae..cc2ce2a 100644
> --- a/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
> +++ b/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
> @@ -400,6 +400,11 @@ int hid_sensor_parse_common_attributes(struct
> hid_sensor_hub_device *hsdev,
>  			 &st->sensitivity);
>  
>  	sensor_hub_input_get_attribute_info(hsdev,
> +					HID_FEATURE_REPORT,
> usage_id,
> +					HID_USAGE_SENSOR_PROP_CONN_T
> YPE,
> +					&st->conn_type);
> +
> +	sensor_hub_input_get_attribute_info(hsdev,
>  					    HID_INPUT_REPORT,
> usage_id,
>  					    HID_USAGE_SENSOR_TIME_TI
> MESTAMP,
>  					    &timestamp);
> diff --git a/include/linux/hid-sensor-hub.h b/include/linux/hid-
> sensor-hub.h
> index 7ef111d..08756a9 100644
> --- a/include/linux/hid-sensor-hub.h
> +++ b/include/linux/hid-sensor-hub.h
> @@ -237,6 +237,7 @@ struct hid_sensor_common {
>  	struct hid_sensor_hub_attribute_info report_state;
>  	struct hid_sensor_hub_attribute_info power_state;
>  	struct hid_sensor_hub_attribute_info sensitivity;
> +	struct hid_sensor_hub_attribute_info conn_type;
>  	struct work_struct work;
>  };
>  
> diff --git a/include/linux/hid-sensor-ids.h b/include/linux/hid-
> sensor-ids.h
> index 719c928..2d349f7 100644
> --- a/include/linux/hid-sensor-ids.h
> +++ b/include/linux/hid-sensor-ids.h
> @@ -135,6 +135,7 @@
>  #define HID_USAGE_SENSOR_UNITS_DEGREES_PER_SECOND		0x1
> 5
>  
>  /* Common selectors */
> +#define HID_USAGE_SENSOR_PROP_CONN_TYPE				
> 0x200309
>  #define HID_USAGE_SENSOR_PROP_REPORT_INTERVAL			
> 0x20030E
>  #define HID_USAGE_SENSOR_PROP_SENSITIVITY_ABS			
> 0x20030F
>  #define HID_USAGE_SENSOR_PROP_SENSITIVITY_RANGE_PCT		0
> x200310

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

* Re: [PATCH] iio: hid: hid-sensor-accel-3d: Add second ACC sensor support
@ 2017-03-17  2:13     ` Pandruvada, Srinivas
  0 siblings, 0 replies; 14+ messages in thread
From: Pandruvada, Srinivas @ 2017-03-17  2:13 UTC (permalink / raw)
  To: linux-input, Song, Hongyan, linux-iio; +Cc: jikos, jic23

T24gVGh1LCAyMDE3LTAzLTE2IGF0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YXR0cmlidXRlX2luZm8gc2Vuc2l0aXZpdHk7DQo+
ICsJc3RydWN0IGhpZF9zZW5zb3JfaHViX2F0dHJpYnV0ZV9pbmZvIGNvbm5fdHlwZTsNCj4gwqAJ
c3RydWN0IHdvcmtfc3RydWN0IHdvcms7DQo+IMKgfTsNCj4gwqANCj4gZGlmZiAtLWdpdCBhL2lu
Y2x1ZGUvbGludXgvaGlkLXNlbnNvci1pZHMuaCBiL2luY2x1ZGUvbGludXgvaGlkLQ0KPiBzZW5z
b3ItaWRzLmgNCj4gaW5kZXggNzE5YzkyOC4uMmQzNDlmNyAxMDA2NDQNCj4gLS0tIGEvaW5jbHVk
ZS9saW51eC9oaWQtc2Vuc29yLWlkcy5oDQo+ICsrKyBiL2luY2x1ZGUvbGludXgvaGlkLXNlbnNv
ci1pZHMuaA0KPiBAQCAtMTM1LDYgKzEzNSw3IEBADQo+IMKgI2RlZmluZSBISURfVVNBR0VfU0VO
U09SX1VOSVRTX0RFR1JFRVNfUEVSX1NFQ09ORAkJMHgxDQo+IDUNCj4gwqANCj4gwqAvKiBDb21t
b24gc2VsZWN0b3JzICovDQo+ICsjZGVmaW5lIEhJRF9VU0FHRV9TRU5TT1JfUFJPUF9DT05OX1RZ
UEUJCQkJDQo+IDB4MjAwMzA5DQo+IMKgI2RlZmluZSBISURfVVNBR0VfU0VOU09SX1BST1BfUkVQ
T1JUX0lOVEVSVkFMCQkJDQo+IDB4MjAwMzBFDQo+IMKgI2RlZmluZSBISURfVVNBR0VfU0VOU09S
X1BST1BfU0VOU0lUSVZJVFlfQUJTCQkJDQo+IDB4MjAwMzBGDQo+IMKgI2RlZmluZSBISURfVVNB
R0VfU0VOU09SX1BST1BfU0VOU0lUSVZJVFlfUkFOR0VfUENUCQkwDQo+IHgyMDAzMTA=

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

* Re: [PATCH] iio: hid: hid-sensor-accel-3d: Add second ACC sensor support
  2017-03-17  1:21       ` Song, Hongyan
  (?)
@ 2017-03-17 13:14       ` Bastien Nocera
  -1 siblings, 0 replies; 14+ messages in thread
From: Bastien Nocera @ 2017-03-17 13:14 UTC (permalink / raw)
  To: Song, Hongyan, linux-input, linux-iio; +Cc: jikos, jic23, Pandruvada, Srinivas

On Fri, 2017-03-17 at 01:21 +0000, Song, Hongyan wrote:
> Hi,
> 	Thanks for your comments. But I am not sure what your "type"
> mean.

I mean the connector type, which you use to differentiate the 2
accelerometers. You should export this data instead of changing the
name of the sensor.

> If you mean "sensor type", I expose it as second ACC, the sensor type
> is the same with the exist ACC,
> It cannot be used as a distinction.
> If you mean the "connection type" I used in the patch, "connection
> type" is only defined in HID driver,
> It is not a common property in IIO. So not good to expose it out.
> 
> 
> BR
> Song Hongyan  
> 
> -----Original Message-----
> From: Bastien Nocera [mailto:hadess@hadess.net] 
> Sent: Thursday, March 16, 2017 8:02 PM
> To: Song, Hongyan <hongyan.song@intel.com>; linux-input@vger.kernel.o
> rg; linux-iio@vger.kernel.org
> Cc: jikos@kernel.org; jic23@kernel.org; Pandruvada, Srinivas <sriniva
> s.pandruvada@intel.com>
> Subject: Re: [PATCH] iio: hid: hid-sensor-accel-3d: Add second ACC
> sensor support
> 
> On Thu, 2017-03-16 at 18:20 +0800, Song Hongyan wrote:
> > As accelerometer sensor becomes more and more popular, there are
> > more 
> > user scenarios have been developed, "Hinge" is a very important 
> > usecase which needs two accelerometer sensors to calculate the 
> > included angle of keyboard and screen.
> > In this case, two accelerometer sensors will be exposed.
> > Currently, 
> > IIO interface hasn't other way to distinguish two sensors with
> > same 
> > sensor type, except sensor name. So a new sensor name
> > "accel_2nd_3d"
> > is added for secondary accelerometer sensor.
> > 
> > In HID level, connection type is a good common property to 
> > differentiate two sensors with same sensor type.
> 
> I've been told in the past not to rely on device names in iio-sensor-
> proxy, and this would go against this advice.
> 
> As you have a "type" to export, why not export that instead?
> NrybXǧv^)޺{.n+{zn)w*\x1fjg\x1eݢj/zޖ2ޙ&)ߡa\x7f\x1eGh\x0fj:+vw٥

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

* Re: [PATCH] iio: hid: hid-sensor-accel-3d: Add second ACC sensor support
  2017-03-17  2:13     ` Pandruvada, Srinivas
  (?)
@ 2017-03-17 13:16     ` Bastien Nocera
       [not found]       ` <1489756594.18490.22.camel-0MeiytkfxGOsTnJN9+BGXg@public.gmane.org>
  2017-03-17 16:22         ` Pandruvada, Srinivas
  -1 siblings, 2 replies; 14+ messages in thread
From: Bastien Nocera @ 2017-03-17 13:16 UTC (permalink / raw)
  To: Pandruvada, Srinivas, linux-input, Song, Hongyan, linux-iio; +Cc: jikos, jic23

On Fri, 2017-03-17 at 02:13 +0000, Pandruvada, Srinivas wrote:
> On Thu, 2017-03-16 at 18:20 +0800, Song Hongyan wrote:
> > As accelerometer sensor becomes more and more popular, there are
> > more
> > user scenarios have been developed, "Hinge" is a very important
> > usecase
> > which needs two accelerometer sensors to calculate the included
> > angle
> > of keyboard and screen.
> > In this case, two accelerometer sensors will be exposed. Currently,
> > IIO interface hasn't other way to distinguish two sensors with same
> > sensor type, except sensor name. So a new sensor name
> > "accel_2nd_3d"
> > is added for secondary accelerometer sensor.
> 
> This type of interface will not satisfy all cases. We have some hubs
> with  many accelerometers attached. Same case is also true even for
> discrete sensors. So there should be some framework way to expose
> location of sensors.

So you're nacking as well?

> ACPI has special method called _PLD (Physical Device Location), which
> can  be used to specify location of any device. So we need to be able
> to export such information to user space. We can add for each sensor
> the location information.
> 
> I can propose some ABI for exporting location information.

There were patches floating around to do this, but they were never
finished:
http://www.spinics.net/lists/linux-acpi/msg51540.html

Cheers

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

* Re: [PATCH] iio: hid: hid-sensor-accel-3d: Add second ACC sensor support
  2017-03-17 13:16     ` Bastien Nocera
@ 2017-03-17 13:31           ` Jonathan Cameron
  2017-03-17 16:22         ` Pandruvada, Srinivas
  1 sibling, 0 replies; 14+ messages in thread
From: Jonathan Cameron @ 2017-03-17 13:31 UTC (permalink / raw)
  To: Bastien Nocera, Pandruvada, Srinivas,
	linux-input-u79uwXL29TY76Z2rM5mHXA, Song, Hongyan,
	linux-iio-u79uwXL29TY76Z2rM5mHXA
  Cc: jikos-DgEjT+Ai2ygdnm+yROfE0A, jic23-DgEjT+Ai2ygdnm+yROfE0A



On 17 March 2017 13:16:34 GMT+00:00, Bastien Nocera <hadess-0MeiytkfxGOsTnJN9+BGXg@public.gmane.org> wrote:
>On Fri, 2017-03-17 at 02:13 +0000, Pandruvada, Srinivas wrote:
>> On Thu, 2017-03-16 at 18:20 +0800, Song Hongyan wrote:
>> > As accelerometer sensor becomes more and more popular, there are
>> > more
>> > user scenarios have been developed, "Hinge" is a very important
>> > usecase
>> > which needs two accelerometer sensors to calculate the included
>> > angle
>> > of keyboard and screen.
>> > In this case, two accelerometer sensors will be exposed. Currently,
>> > IIO interface hasn't other way to distinguish two sensors with same
>> > sensor type, except sensor name. So a new sensor name
>> > "accel_2nd_3d"
>> > is added for secondary accelerometer sensor.
>> 
>> This type of interface will not satisfy all cases. We have some hubs
>> with  many accelerometers attached. Same case is also true even for
>> discrete sensors. So there should be some framework way to expose
>> location of sensors.
>
>So you're nacking as well?
>
>> ACPI has special method called _PLD (Physical Device Location), which
>> can  be used to specify location of any device. So we need to be able
>> to export such information to user space. We can add for each sensor
>> the location information.
>> 
>> I can propose some ABI for exporting location information.
>
>There were patches floating around to do this, but they were never
>finished:
>http://www.spinics.net/lists/linux-acpi/msg51540.html

We have the location element as defined for the cross_ec sensors.  Taking that general would be fine with me.

 Current options are base and lid, but can be extended to include more.

J
>
>Cheers
>--
>To unsubscribe from this list: send the line "unsubscribe linux-iio" in
>the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

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

* Re: [PATCH] iio: hid: hid-sensor-accel-3d: Add second ACC sensor support
@ 2017-03-17 13:31           ` Jonathan Cameron
  0 siblings, 0 replies; 14+ messages in thread
From: Jonathan Cameron @ 2017-03-17 13:31 UTC (permalink / raw)
  To: Bastien Nocera, Pandruvada, Srinivas, linux-input, Song, Hongyan,
	linux-iio
  Cc: jikos, jic23



On 17 March 2017 13:16:34 GMT+00:00, Bastien Nocera <hadess@hadess.net> wrote:
>On Fri, 2017-03-17 at 02:13 +0000, Pandruvada, Srinivas wrote:
>> On Thu, 2017-03-16 at 18:20 +0800, Song Hongyan wrote:
>> > As accelerometer sensor becomes more and more popular, there are
>> > more
>> > user scenarios have been developed, "Hinge" is a very important
>> > usecase
>> > which needs two accelerometer sensors to calculate the included
>> > angle
>> > of keyboard and screen.
>> > In this case, two accelerometer sensors will be exposed. Currently,
>> > IIO interface hasn't other way to distinguish two sensors with same
>> > sensor type, except sensor name. So a new sensor name
>> > "accel_2nd_3d"
>> > is added for secondary accelerometer sensor.
>> 
>> This type of interface will not satisfy all cases. We have some hubs
>> with  many accelerometers attached. Same case is also true even for
>> discrete sensors. So there should be some framework way to expose
>> location of sensors.
>
>So you're nacking as well?
>
>> ACPI has special method called _PLD (Physical Device Location), which
>> can  be used to specify location of any device. So we need to be able
>> to export such information to user space. We can add for each sensor
>> the location information.
>> 
>> I can propose some ABI for exporting location information.
>
>There were patches floating around to do this, but they were never
>finished:
>http://www.spinics.net/lists/linux-acpi/msg51540.html

We have the location element as defined for the cross_ec sensors.  Taking that general would be fine with me.

 Current options are base and lid, but can be extended to include more.

J
>
>Cheers
>--
>To unsubscribe from this list: send the line "unsubscribe linux-iio" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

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

* Re: [PATCH] iio: hid: hid-sensor-accel-3d: Add second ACC sensor support
  2017-03-17 13:16     ` Bastien Nocera
@ 2017-03-17 16:22         ` Pandruvada, Srinivas
  2017-03-17 16:22         ` Pandruvada, Srinivas
  1 sibling, 0 replies; 14+ messages in thread
From: Pandruvada, Srinivas @ 2017-03-17 16:22 UTC (permalink / raw)
  To: linux-input, Song, Hongyan, linux-iio, hadess; +Cc: jikos, jic23

On Fri, 2017-03-17 at 14:16 +0100, Bastien Nocera wrote:
> On Fri, 2017-03-17 at 02:13 +0000, Pandruvada, Srinivas wrote:
> > 
> > On Thu, 2017-03-16 at 18:20 +0800, Song Hongyan wrote:
> > > 
> > > As accelerometer sensor becomes more and more popular, there are
> > > more
> > > user scenarios have been developed, "Hinge" is a very important
> > > usecase
> > > which needs two accelerometer sensors to calculate the included
> > > angle
> > > of keyboard and screen.
> > > In this case, two accelerometer sensors will be exposed.
> > > Currently,
> > > IIO interface hasn't other way to distinguish two sensors with
> > > same
> > > sensor type, except sensor name. So a new sensor name
> > > "accel_2nd_3d"
> > > is added for secondary accelerometer sensor.
> > 
> > This type of interface will not satisfy all cases. We have some
> > hubs
> > with  many accelerometers attached. Same case is also true even for
> > discrete sensors. So there should be some framework way to expose
> > location of sensors.
> 
> So you're nacking as well?
Yes.

> 
> > 
> > ACPI has special method called _PLD (Physical Device Location),
> > which
> > can  be used to specify location of any device. So we need to be
> > able
> > to export such information to user space. We can add for each
> > sensor
> > the location information.
> > 
> > I can propose some ABI for exporting location information.
> 
> There were patches floating around to do this, but they were never
> finished:
> http://www.spinics.net/lists/linux-acpi/msg51540.html
We need to add some of those element related to sensors to IIO ABI.
I will propose an ABI as Jonathan suggested.

Thanks,
Srinivas

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

* Re: [PATCH] iio: hid: hid-sensor-accel-3d: Add second ACC sensor support
@ 2017-03-17 16:22         ` Pandruvada, Srinivas
  0 siblings, 0 replies; 14+ messages in thread
From: Pandruvada, Srinivas @ 2017-03-17 16:22 UTC (permalink / raw)
  To: linux-input, Song, Hongyan, linux-iio, hadess; +Cc: jikos, jic23

T24gRnJpLCAyMDE3LTAzLTE3IGF0IDE0OjE2ICswMTAwLCBCYXN0aWVuIE5vY2V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ZCBzb21l
IG9mIHRob3NlIGVsZW1lbnQgcmVsYXRlZCB0byBzZW5zb3JzIHRvIElJTyBBQkkuDQpJIHdpbGwg
cHJvcG9zZSBhbiBBQkkgYXMgSm9uYXRoYW4gc3VnZ2VzdGVkLg0KDQpUaGFua3MsDQpTcmluaXZh
cw0K

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

* Re: [PATCH] iio: hid: hid-sensor-accel-3d: Add second ACC sensor support
  2017-03-17 16:22         ` Pandruvada, Srinivas
  (?)
@ 2017-03-18  0:24         ` Milton Mobley
  -1 siblings, 0 replies; 14+ messages in thread
From: Milton Mobley @ 2017-03-18  0:24 UTC (permalink / raw)
  To: Pandruvada, Srinivas
  Cc: linux-input, Song, Hongyan, linux-iio, hadess, jikos, jic23

[-- Attachment #1: Type: text/plain, Size: 3898 bytes --]

Your device naming convention should be:

1) consistent with usual linux kernel practice
2) compatible with acpi-based systems (x86 and arm64)
3) compatible with device tree based systems (all others, I believe).

Here is some info from my dell 2-in-1 touch laptop:

Device(u'/sys/devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-1/i2c-
DELL0742:00/0018:06CB:7E92.0009/input/input13')

According to the description in acpi programming reference, this suggests
acpi loaded the pci bus enumerator, which found the i2c-designware
host controllers, called the i2c_designwarer driver's probe function, which
did not scan the bus for slaves. But someone else has, possibly a driver
in the input system, and created the /sys node.

As you can see, '/', ':', '-' and '.' are being used as separators.

My hardware info says the laptop has two designware i2c host controllers,
thus the 'i2c-1' above refers to one of these.
I don't know what the following stuff is, but the '.0009' is probably an
i2c slave device specific value.

So you could, for example use 'accel_3d.1', etc for your naming. Where you
would create it is an open question.

Finally, I see some general problems in creating a system to monitor many
sensors:

Common sensors  don't have usb interfaces, so you couldn't use usb or hid
interface to control them.

These sensors do have either i2c or spi or both interfaces. Some have uart
interfaces

Sensors with i2c interfaces may have either one or two slave addresses. If
two, the address is selected by an input pin.
There is probably no name register you could program or use to distinguish
two devices on the same bus.
You would have to store the slave address somewhere, perhaps in a struct
with a name like 'chip_info'.

Of course in a device tree based system, you could just declare the slaves
as resources, and specify their slave addresses.

spi has the problem that 'in band' slave addressing is not supported, i.e.
there is no slave address in the data messages,
so you have to use extra gpio pins to select multiple devices.

On Fri, Mar 17, 2017 at 9:22 AM, Pandruvada, Srinivas <
srinivas.pandruvada@intel.com> wrote:

> On Fri, 2017-03-17 at 14:16 +0100, Bastien Nocera wrote:
> > On Fri, 2017-03-17 at 02:13 +0000, Pandruvada, Srinivas wrote:
> > >
> > > On Thu, 2017-03-16 at 18:20 +0800, Song Hongyan wrote:
> > > >
> > > > As accelerometer sensor becomes more and more popular, there are
> > > > more
> > > > user scenarios have been developed, "Hinge" is a very important
> > > > usecase
> > > > which needs two accelerometer sensors to calculate the included
> > > > angle
> > > > of keyboard and screen.
> > > > In this case, two accelerometer sensors will be exposed.
> > > > Currently,
> > > > IIO interface hasn't other way to distinguish two sensors with
> > > > same
> > > > sensor type, except sensor name. So a new sensor name
> > > > "accel_2nd_3d"
> > > > is added for secondary accelerometer sensor.
> > >
> > > This type of interface will not satisfy all cases. We have some
> > > hubs
> > > with  many accelerometers attached. Same case is also true even for
> > > discrete sensors. So there should be some framework way to expose
> > > location of sensors.
> >
> > So you're nacking as well?
> Yes.
>
> >
> > >
> > > ACPI has special method called _PLD (Physical Device Location),
> > > which
> > > can  be used to specify location of any device. So we need to be
> > > able
> > > to export such information to user space. We can add for each
> > > sensor
> > > the location information.
> > >
> > > I can propose some ABI for exporting location information.
> >
> > There were patches floating around to do this, but they were never
> > finished:
> > http://www.spinics.net/lists/linux-acpi/msg51540.html
> We need to add some of those element related to sensors to IIO ABI.
> I will propose an ABI as Jonathan suggested.
>
> Thanks,
> Srinivas
>

[-- Attachment #2: Type: text/html, Size: 5304 bytes --]

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

end of thread, other threads:[~2017-03-18  0:24 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-16 10:20 [PATCH] iio: hid: hid-sensor-accel-3d: Add second ACC sensor support Song Hongyan
2017-03-16 10:20 ` Song Hongyan
2017-03-16 12:01 ` Bastien Nocera
     [not found]   ` <1489665702.18490.12.camel-0MeiytkfxGOsTnJN9+BGXg@public.gmane.org>
2017-03-17  1:21     ` Song, Hongyan
2017-03-17  1:21       ` Song, Hongyan
2017-03-17 13:14       ` Bastien Nocera
     [not found] ` <1489659652-35608-1-git-send-email-hongyan.song-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-03-17  2:13   ` Pandruvada, Srinivas
2017-03-17  2:13     ` Pandruvada, Srinivas
2017-03-17 13:16     ` Bastien Nocera
     [not found]       ` <1489756594.18490.22.camel-0MeiytkfxGOsTnJN9+BGXg@public.gmane.org>
2017-03-17 13:31         ` Jonathan Cameron
2017-03-17 13:31           ` Jonathan Cameron
2017-03-17 16:22       ` Pandruvada, Srinivas
2017-03-17 16:22         ` Pandruvada, Srinivas
2017-03-18  0:24         ` Milton Mobley

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.