From: Jonathan Cameron <jic23@kernel.org>
To: "Zhang, Lixu" <lixu.zhang@intel.com>
Cc: "Jiri Kosina" <jikos@kernel.org>,
"Srinivas Pandruvada" <srinivas.pandruvada@linux.intel.com>,
"Benjamin Tissoires" <bentiss@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] iio: hid-sensor-rotation: Fix stale or zero output when reading raw values
Date: Sun, 14 Jun 2026 17:50:26 +0100 [thread overview]
Message-ID: <20260614175026.449f6f59@jic23-huawei> (raw)
In-Reply-To: <SJ0PR11MB5613EE4659912C262E950C9D93182@SJ0PR11MB5613.namprd11.prod.outlook.com>
On Fri, 12 Jun 2026 05:33:32 +0000
"Zhang, Lixu" <lixu.zhang@intel.com> wrote:
> >-----Original Message-----
> >From: Jonathan Cameron <jic23@kernel.org>
> >Sent: Friday, June 12, 2026 12:35 AM
> >To: Zhang, Lixu <lixu.zhang@intel.com>
> >Cc: Jiri Kosina <jikos@kernel.org>; Srinivas Pandruvada
> ><srinivas.pandruvada@linux.intel.com>; Benjamin Tissoires
> ><bentiss@kernel.org>; David Lechner <dlechner@baylibre.com>; Nuno Sá
> ><nuno.sa@analog.com>; Andy Shevchenko <andy@kernel.org>; linux-
> >input@vger.kernel.org; linux-iio@vger.kernel.org; linux-kernel@vger.kernel.org
> >Subject: Re: [PATCH 2/2] iio: hid-sensor-rotation: Fix stale or zero output when
> >reading raw values
> >
> >On Wed, 10 Jun 2026 16:29:10 +0800
> >Zhang Lixu <lixu.zhang@intel.com> wrote:
> >
> >> When reading the raw quaternion attribute (in_rot_quaternion_raw), the
> >> driver currently returns either all zeros (if the sensor was never
> >> enabled) or stale data (if the sensor was previously enabled) because
> >> it reads from the internal buffer without explicitly requesting a new
> >> sample from the sensor.
> >>
> >> To fix this, power up the sensor, call
> >> sensor_hub_input_attr_read_values()
> >> to issue a synchronous GET_REPORT and receive the full quaternion data
> >> directly into a local buffer, then decode the four components.
> >>
> >> Signed-off-by: Zhang Lixu <lixu.zhang@intel.com>
> >Hi Zhang,
> >
> >Given this is clearly a fix, can you reply to this thread with an appropriate Fixes
> >tag. Otherwise looks fine to me.
>
> Sure, here is the Fixes tag:
>
> Fixes: fc18dddc0625 ("iio: hid-sensors: Added device rotation support")
>
> >
> >Given timing and I guess that this bug is fairly old, this will probably only go
> >upstream after rc1.
>
> That's perfectly fine. Thanks for the review!
Applied to the fixes-togreg branch of iio.git.
Note I'll be rebasing that on rc1 before sending out a pull request.
Thanks,
Jonathan
>
> Best regards,
> Lixu
>
> >
> >Thanks,
> >
> >Jonathan
> >
>
prev parent reply other threads:[~2026-06-14 16:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-10 8:29 [PATCH 0/2] HID: iio: Fix stale or zero quaternion reads with multi-byte read helper Zhang Lixu
2026-06-10 8:29 ` [PATCH 1/2] HID: sensor-hub: Add sensor_hub_input_attr_read_values() for multi-byte reads Zhang Lixu
2026-06-10 8:38 ` sashiko-bot
2026-06-10 10:52 ` Andy Shevchenko
2026-06-10 16:41 ` Jiri Kosina
2026-06-11 16:36 ` Jonathan Cameron
2026-06-10 8:29 ` [PATCH 2/2] iio: hid-sensor-rotation: Fix stale or zero output when reading raw values Zhang Lixu
2026-06-10 8:40 ` sashiko-bot
2026-06-10 10:53 ` Andy Shevchenko
2026-06-11 16:34 ` Jonathan Cameron
2026-06-12 5:33 ` Zhang, Lixu
2026-06-14 16:50 ` Jonathan Cameron [this message]
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=20260614175026.449f6f59@jic23-huawei \
--to=jic23@kernel.org \
--cc=andy@kernel.org \
--cc=bentiss@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jikos@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lixu.zhang@intel.com \
--cc=nuno.sa@analog.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