* [PATCH] hid: hid-sensor-prox: Add more data field for hysteresis parsing
@ 2017-02-13 9:54 ` Song Hongyan
0 siblings, 0 replies; 6+ messages in thread
From: Song Hongyan @ 2017-02-13 9:54 UTC (permalink / raw)
To: linux-input-u79uwXL29TY76Z2rM5mHXA, linux-iio-u79uwXL29TY76Z2rM5mHXA
Cc: jikos-DgEjT+Ai2ygdnm+yROfE0A, jic23-DgEjT+Ai2ygdnm+yROfE0A,
srinivas.pandruvada-ral2JQCrhuEAvxtiuMwx3w, Song Hongyan
Add HID_USAGE_SENSOR_HUMAN_PRESENCE support for Human Presence sensitivity
parsing, in case some implementation uses it as sensitivity modifier.
Signed-off-by: Song Hongyan <hongyan.song-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
drivers/iio/light/hid-sensor-prox.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/iio/light/hid-sensor-prox.c b/drivers/iio/light/hid-sensor-prox.c
index 45ca056..73fced8 100644
--- a/drivers/iio/light/hid-sensor-prox.c
+++ b/drivers/iio/light/hid-sensor-prox.c
@@ -240,6 +240,13 @@ static int prox_parse_report(struct platform_device *pdev,
st->common_attributes.sensitivity.index,
st->common_attributes.sensitivity.report_id);
}
+ if (st->common_attributes.sensitivity.index < 0)
+ sensor_hub_input_get_attribute_info(hsdev,
+ HID_FEATURE_REPORT, usage_id,
+ HID_USAGE_SENSOR_DATA_MOD_CHANGE_SENSITIVITY_ABS |
+ HID_USAGE_SENSOR_HUMAN_PRESENCE,
+ &st->common_attributes.sensitivity);
+
return ret;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] hid: hid-sensor-prox: Add more data field for hysteresis parsing
@ 2017-02-13 9:54 ` Song Hongyan
0 siblings, 0 replies; 6+ messages in thread
From: Song Hongyan @ 2017-02-13 9:54 UTC (permalink / raw)
To: linux-input, linux-iio; +Cc: jikos, jic23, srinivas.pandruvada, Song Hongyan
Add HID_USAGE_SENSOR_HUMAN_PRESENCE support for Human Presence sensitivity
parsing, in case some implementation uses it as sensitivity modifier.
Signed-off-by: Song Hongyan <hongyan.song@intel.com>
---
drivers/iio/light/hid-sensor-prox.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/iio/light/hid-sensor-prox.c b/drivers/iio/light/hid-sensor-prox.c
index 45ca056..73fced8 100644
--- a/drivers/iio/light/hid-sensor-prox.c
+++ b/drivers/iio/light/hid-sensor-prox.c
@@ -240,6 +240,13 @@ static int prox_parse_report(struct platform_device *pdev,
st->common_attributes.sensitivity.index,
st->common_attributes.sensitivity.report_id);
}
+ if (st->common_attributes.sensitivity.index < 0)
+ sensor_hub_input_get_attribute_info(hsdev,
+ HID_FEATURE_REPORT, usage_id,
+ HID_USAGE_SENSOR_DATA_MOD_CHANGE_SENSITIVITY_ABS |
+ HID_USAGE_SENSOR_HUMAN_PRESENCE,
+ &st->common_attributes.sensitivity);
+
return ret;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] hid: hid-sensor-prox: Add more data field for hysteresis parsing
2017-02-13 9:54 ` Song Hongyan
@ 2017-02-19 11:50 ` Jonathan Cameron
-1 siblings, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2017-02-19 11:50 UTC (permalink / raw)
To: Song Hongyan, linux-input-u79uwXL29TY76Z2rM5mHXA,
linux-iio-u79uwXL29TY76Z2rM5mHXA
Cc: jikos-DgEjT+Ai2ygdnm+yROfE0A, srinivas.pandruvada-ral2JQCrhuEAvxtiuMwx3w
On 13/02/17 09:54, Song Hongyan wrote:
> Add HID_USAGE_SENSOR_HUMAN_PRESENCE support for Human Presence sensitivity
> parsing, in case some implementation uses it as sensitivity modifier.
>
> Signed-off-by: Song Hongyan <hongyan.song-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Do we want to perhaps indicate to userspace in some way that this is what is being
reported? (not that I have any idea how a proximity sensor could potentially tell
a human from a passing cat for example ;)
Otherwise, I'm fine with this but would like an Ack from Srinivas.
> ---
> drivers/iio/light/hid-sensor-prox.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/iio/light/hid-sensor-prox.c b/drivers/iio/light/hid-sensor-prox.c
> index 45ca056..73fced8 100644
> --- a/drivers/iio/light/hid-sensor-prox.c
> +++ b/drivers/iio/light/hid-sensor-prox.c
> @@ -240,6 +240,13 @@ static int prox_parse_report(struct platform_device *pdev,
> st->common_attributes.sensitivity.index,
> st->common_attributes.sensitivity.report_id);
> }
> + if (st->common_attributes.sensitivity.index < 0)
> + sensor_hub_input_get_attribute_info(hsdev,
> + HID_FEATURE_REPORT, usage_id,
> + HID_USAGE_SENSOR_DATA_MOD_CHANGE_SENSITIVITY_ABS |
> + HID_USAGE_SENSOR_HUMAN_PRESENCE,
> + &st->common_attributes.sensitivity);
> +
> return ret;
> }
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] hid: hid-sensor-prox: Add more data field for hysteresis parsing
@ 2017-02-19 11:50 ` Jonathan Cameron
0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2017-02-19 11:50 UTC (permalink / raw)
To: Song Hongyan, linux-input, linux-iio; +Cc: jikos, srinivas.pandruvada
On 13/02/17 09:54, Song Hongyan wrote:
> Add HID_USAGE_SENSOR_HUMAN_PRESENCE support for Human Presence sensitivity
> parsing, in case some implementation uses it as sensitivity modifier.
>
> Signed-off-by: Song Hongyan <hongyan.song@intel.com>
Do we want to perhaps indicate to userspace in some way that this is what is being
reported? (not that I have any idea how a proximity sensor could potentially tell
a human from a passing cat for example ;)
Otherwise, I'm fine with this but would like an Ack from Srinivas.
> ---
> drivers/iio/light/hid-sensor-prox.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/iio/light/hid-sensor-prox.c b/drivers/iio/light/hid-sensor-prox.c
> index 45ca056..73fced8 100644
> --- a/drivers/iio/light/hid-sensor-prox.c
> +++ b/drivers/iio/light/hid-sensor-prox.c
> @@ -240,6 +240,13 @@ static int prox_parse_report(struct platform_device *pdev,
> st->common_attributes.sensitivity.index,
> st->common_attributes.sensitivity.report_id);
> }
> + if (st->common_attributes.sensitivity.index < 0)
> + sensor_hub_input_get_attribute_info(hsdev,
> + HID_FEATURE_REPORT, usage_id,
> + HID_USAGE_SENSOR_DATA_MOD_CHANGE_SENSITIVITY_ABS |
> + HID_USAGE_SENSOR_HUMAN_PRESENCE,
> + &st->common_attributes.sensitivity);
> +
> return ret;
> }
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] hid: hid-sensor-prox: Add more data field for hysteresis parsing
2017-02-19 11:50 ` Jonathan Cameron
@ 2017-02-21 10:30 ` Pandruvada, Srinivas
-1 siblings, 0 replies; 6+ messages in thread
From: Pandruvada, Srinivas @ 2017-02-21 10:30 UTC (permalink / raw)
To: linux-input, Song, Hongyan, linux-iio, jic23; +Cc: jikos
On Sun, 2017-02-19 at 11:50 +0000, Jonathan Cameron wrote:
> On 13/02/17 09:54, Song Hongyan wrote:
> > Add HID_USAGE_SENSOR_HUMAN_PRESENCE support for Human Presence
> > sensitivity
> > parsing, in case some implementation uses it as sensitivity
> > modifier.
> >
> > Signed-off-by: Song Hongyan <hongyan.song@intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
>
> Do we want to perhaps indicate to userspace in some way that this is
> what is being
> reported? (not that I have any idea how a proximity sensor could
> potentially tell
> a human from a passing cat for example ;)
>
> Otherwise, I'm fine with this but would like an Ack from Srinivas.
> > ---
> > drivers/iio/light/hid-sensor-prox.c | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/drivers/iio/light/hid-sensor-prox.c
> > b/drivers/iio/light/hid-sensor-prox.c
> > index 45ca056..73fced8 100644
> > --- a/drivers/iio/light/hid-sensor-prox.c
> > +++ b/drivers/iio/light/hid-sensor-prox.c
> > @@ -240,6 +240,13 @@ static int prox_parse_report(struct
> > platform_device *pdev,
> > st->common_attributes.sensitivity.index,
> > st-
> > >common_attributes.sensitivity.report_id);
> > }
> > + if (st->common_attributes.sensitivity.index < 0)
> > + sensor_hub_input_get_attribute_info(hsdev,
> > + HID_FEATURE_REPORT, usage_id,
> > + HID_USAGE_SENSOR_DATA_MOD_CHANGE_SENSITIVI
> > TY_ABS |
> > + HID_USAGE_SENSOR_HUMAN_PRESENCE,
> > + &st->common_attributes.sensitivity);
> > +
> > return ret;
> > }
> >
> >
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] hid: hid-sensor-prox: Add more data field for hysteresis parsing
@ 2017-02-21 10:30 ` Pandruvada, Srinivas
0 siblings, 0 replies; 6+ messages in thread
From: Pandruvada, Srinivas @ 2017-02-21 10:30 UTC (permalink / raw)
To: linux-input, Song, Hongyan, linux-iio, jic23; +Cc: jikos
T24gU3VuLCAyMDE3LTAyLTE5IGF0IDExOjUwICswMDAwLCBKb25hdGhhbiBDYW1lcm9uIHdyb3Rl
Og0KPiBPbiAxMy8wMi8xNyAwOTo1NCwgU29uZyBIb25neWFuIHdyb3RlOg0KPiA+IEFkZCBISURf
VVNBR0VfU0VOU09SX0hVTUFOX1BSRVNFTkNFIHN1cHBvcnQgZm9yIEh1bWFuIFByZXNlbmNlDQo+
ID4gc2Vuc2l0aXZpdHkNCj4gPiBwYXJzaW5nLCBpbiBjYXNlIHNvbWUgaW1wbGVtZW50YXRpb24g
dXNlcyBpdCBhcyBzZW5zaXRpdml0eQ0KPiA+IG1vZGlmaWVyLg0KPiA+IA0KPiA+IFNpZ25lZC1v
ZmYtYnk6IFNvbmcgSG9uZ3lhbiA8aG9uZ3lhbi5zb25nQGludGVsLmNvbT4NCkFja2VkLWJ5OiBT
cmluaXZhcyBQYW5kcnV2YWRhIDxzcmluaXZhcy5wYW5kcnV2YWRhQGxpbnV4LmludGVsLmNvbT4N
Cg0KPiANCj4gRG8gd2Ugd2FudCB0byBwZXJoYXBzIGluZGljYXRlIHRvIHVzZXJzcGFjZSBpbiBz
b21lIHdheSB0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TsNCj4gPiDCoAl9DQo+ID4g
KwlpZiAoc3QtPmNvbW1vbl9hdHRyaWJ1dGVzLnNlbnNpdGl2aXR5LmluZGV4IDwgMCkNCj4gPiAr
CQlzZW5zb3JfaHViX2lucHV0X2dldF9hdHRyaWJ1dGVfaW5mbyhoc2RldiwNCj4gPiArCQkJSElE
X0ZFQVRVUkVfUkVQT1JULCB1c2FnZV9pZCwNCj4gPiArCQkJSElEX1VTQUdFX1NFTlNPUl9EQVRB
X01PRF9DSEFOR0VfU0VOU0lUSVZJDQo+ID4gVFlfQUJTIHwNCj4gPiArCQkJSElEX1VTQUdFX1NF
TlNPUl9IVU1BTl9QUkVTRU5DRSwNCj4gPiArCQkJJnN0LT5jb21tb25fYXR0cmlidXRlcy5zZW5z
aXRpdml0eSk7DQo+ID4gKw0KPiA+IMKgCXJldHVybiByZXQ7DQo+ID4gwqB9DQo+ID4gwqANCj4g
PiANCj4gDQo+IA==
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-02-21 10:30 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-13 9:54 [PATCH] hid: hid-sensor-prox: Add more data field for hysteresis parsing Song Hongyan
2017-02-13 9:54 ` Song Hongyan
[not found] ` <1486979692-44878-1-git-send-email-hongyan.song-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-02-19 11:50 ` Jonathan Cameron
2017-02-19 11:50 ` Jonathan Cameron
2017-02-21 10:30 ` Pandruvada, Srinivas
2017-02-21 10:30 ` Pandruvada, Srinivas
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.