From: Jonathan Cameron <jic23@kernel.org>
To: Zhang Lixu <lixu.zhang@intel.com>
Cc: jikos@kernel.org, srinivas.pandruvada@linux.intel.com,
lars@metafoo.de, linux-input@vger.kernel.org,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: hid-sensor-prox: Add support for 16-bit report size
Date: Mon, 17 Mar 2025 12:20:44 +0000 [thread overview]
Message-ID: <20250317122044.22091c4b@jic23-huawei> (raw)
In-Reply-To: <20250317013634.4117399-1-lixu.zhang@intel.com>
On Mon, 17 Mar 2025 09:36:34 +0800
Zhang Lixu <lixu.zhang@intel.com> wrote:
> On Intel platforms, the HID_USAGE_SENSOR_HUMAN_PROXIMITY report size is 16
> bits. This patch adds support for handling 16-bit report sizes for the
> HID_USAGE_SENSOR_HUMAN_PROXIMITY usage in the HID sensor proximity driver.
>
> Previously, the driver only supported 8-bit and 32-bit report sizes. With
> this change, the driver can now correctly process 16-bit proximity data,
> ensuring accurate human presence detection on platforms where this report
> size is used.
>
> Signed-off-by: Zhang Lixu <lixu.zhang@intel.com>
> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Applied. Thanks.
If it is reasonably urgent we could slip this in after rc1 as it smells a bit
fix like. For now I've queued it for next cycle.
Jonathan
> ---
> drivers/iio/light/hid-sensor-prox.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/iio/light/hid-sensor-prox.c b/drivers/iio/light/hid-sensor-prox.c
> index 76b76d12b388..3a7b48803d50 100644
> --- a/drivers/iio/light/hid-sensor-prox.c
> +++ b/drivers/iio/light/hid-sensor-prox.c
> @@ -213,6 +213,9 @@ static int prox_capture_sample(struct hid_sensor_hub_device *hsdev,
> case 1:
> prox_state->human_presence[chan] = *(u8 *)raw_data * multiplier;
> return 0;
> + case 2:
> + prox_state->human_presence[chan] = *(u16 *)raw_data * multiplier;
> + return 0;
> case 4:
> prox_state->human_presence[chan] = *(u32 *)raw_data * multiplier;
> return 0;
>
> base-commit: eea255893718268e1ab852fb52f70c613d109b99
next prev parent reply other threads:[~2025-03-17 12:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-17 1:36 [PATCH] iio: hid-sensor-prox: Add support for 16-bit report size Zhang Lixu
2025-03-17 12:20 ` Jonathan Cameron [this message]
2025-03-18 0:56 ` Zhang, Lixu
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=20250317122044.22091c4b@jic23-huawei \
--to=jic23@kernel.org \
--cc=jikos@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lixu.zhang@intel.com \
--cc=srinivas.pandruvada@linux.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