From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: Shan Rizvi <shan@rizvi.nu>, Jonathan Cameron <jic23@kernel.org>,
Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <bentiss@kernel.org>
Cc: linux-iio@vger.kernel.org, linux-input@vger.kernel.org
Subject: Re: iio: hid-sensor-trigger: unclamped msleep_interruptible(poll_value * 2) stalls runtime PM for hours on Chicony 04F2:B872 secondary proximity sensor
Date: Tue, 01 Dec 2026 12:08:15 -0800 [thread overview]
Message-ID: <a2d83bbf62345f1b7ff08419962821bd7c84304c.camel@linux.intel.com> (raw)
In-Reply-To: <179615474253.3247684.5807786149742177755@rizvi.nu>
On Tue, 2026-12-01 at 14:52 -0500, Shan Rizvi wrote:
> On Mon, 2026-11-30 at 11:03 -0800, Srinivas Pandruvada wrote:
> > Changed the order, please try.
>
> Works here (HP 8EA2, Chicony 04F2:B872, 7.2.15). First read of
> in_proximity0_raw takes 4.0 s, two concurrent reads 6 ms, a read
> after
> autosuspend 4.0 s. No hung task, no runtime PM underflow.
>
> But I owe you a correction: the order doesn't matter. I ran the
> previous patch and this one back to back with the same debug prints
> and they behave identically. The 9.5 s reads and the 0.5 Hz I
> reported
> last time don't reproduce. The hub started logging "control queue
> full" a few minutes after that run, so I suspect it was misbehaving
> and sysfs was showing the cached value, but I can't prove that now.
> Sorry for the noise.
>
> While checking why the readback never changes, I dumped the feature
> reports through hidraw. The interval isn't really huge. Report 17
> doesn't match its descriptor. From offset 5, where both reports
> declare
> Report Interval and then Minimum Report Interval as 32 bits each:
>
> report 1 (working prox), 128 bytes, as declared:
> 64 00 00 00 64 00 00 00 a0 0f 32 00 c8 00 32 00 ...
>
> report 17 (this sensor), 119 bytes, 121 declared:
> d0 07 64 00 00 00 a0 0f 32 00 19 00 32 00 ...
>
> Report 17 is 2 bytes short, and it only lines up with report 1 if
> Report Interval is 16 bits on the wire: 2000, then Minimum Report
> Interval 100, then 4000 and 50 as in report 1. So the driver reads
> interval | (100 << 16), which is 6553600 ms or more whatever the
> interval is. Writing sampling_frequency changes only the low 16 bits:
>
> 10 Hz -> 64 00 64 00
> 1 Hz -> e8 03 64 00
> 0.5 Hz -> d0 07 64 00
>
> (The 2000 above is left over from my earlier tests. I don't know what
> the firmware starts with.)
>
> So with the patch the SET of 2000 does reach the device, but the
> value
> read back is always above the limit, and this sensor gets the write
> and the 4 s wait on every power on. A descriptor fixup for 04F2:B872
> would be the real fix for this device. I can test one or send one if
> you want.
>
> Tested-by: Shan Rizvi <shan@rizvi.nu>
I will submit v1 only as that order makes more sense. First set the
parameters like report interval and then power on.
Thanks,
Srinivas
>
> Thanks,
> Shan
prev parent reply other threads:[~2026-12-01 20:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-29 2:03 iio: hid-sensor-trigger: unclamped msleep_interruptible(poll_value * 2) stalls runtime PM for hours on Chicony 04F2:B872 secondary proximity sensor Shan Rizvi
2026-11-29 14:37 ` Srinivas Pandruvada
2026-11-29 17:26 ` Shan Rizvi
2026-11-29 17:54 ` Srinivas Pandruvada
2026-11-29 19:18 ` Shan Rizvi
2026-11-30 13:07 ` Srinivas Pandruvada
2026-11-30 17:45 ` Shan Rizvi
2026-11-30 19:03 ` Srinivas Pandruvada
2026-12-01 19:52 ` Shan Rizvi
2026-12-01 20:08 ` Srinivas Pandruvada [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=a2d83bbf62345f1b7ff08419962821bd7c84304c.camel@linux.intel.com \
--to=srinivas.pandruvada@linux.intel.com \
--cc=bentiss@kernel.org \
--cc=jic23@kernel.org \
--cc=jikos@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=shan@rizvi.nu \
/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 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.