From: Jonathan Cameron <jic23@kernel.org>
To: Song Hongyan <hongyan.song@intel.com>,
linux-input@vger.kernel.org, linux-iio@vger.kernel.org
Cc: jikos@kernel.org, srinivas.pandruvada@intel.com
Subject: Re: [PATCH] hid: hid-sensor-prox: Add more data field for hysteresis parsing
Date: Sun, 19 Feb 2017 11:50:21 +0000 [thread overview]
Message-ID: <a27a7238-c825-b2d9-733e-0c7a7919a3d6@kernel.org> (raw)
In-Reply-To: <1486979692-44878-1-git-send-email-hongyan.song@intel.com>
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;
> }
>
>
next prev parent reply other threads:[~2017-02-19 11:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-13 9:54 [PATCH] hid: hid-sensor-prox: Add more data field for hysteresis parsing Song Hongyan
2017-02-19 11:50 ` Jonathan Cameron [this message]
2017-02-21 10:30 ` Pandruvada, Srinivas
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=a27a7238-c825-b2d9-733e-0c7a7919a3d6@kernel.org \
--to=jic23@kernel.org \
--cc=hongyan.song@intel.com \
--cc=jikos@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--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).