The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 0/4] iio: proximity: aw96103: fix diff sign, missing config, async config lifetime and event values
@ 2026-11-26  5:30 Arnav Kapoor
  2026-11-26  5:30 ` [PATCH 1/4] iio: proximity: aw96103: report negative proximity diff values Arnav Kapoor
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Arnav Kapoor @ 2026-11-26  5:30 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: David Lechner, Nuno Sá, Andy Shevchenko, Andy Shevchenko,
	Wang Shuaijie, linux-iio, linux-kernel, Arnav Kapoor

Four fixes for the AW96103/AW96105 capacitive proximity driver.

1: the DIFF registers are signed S21.10 (as documented in Awinic's
   aw_sar driver), but are divided as u32, so negative diffs read back
   as about 4 million.
2: without aw96103_0.bin the driver never loads its built-in defaults,
   so the scan and the interrupts are never enabled.
3: nothing waits for the request_firmware_nowait() callback, which
   uses the devm-allocated driver data; a probe failure after the
   request (e.g. no interrupt) or an early unbind frees it first.
4: out-of-range debounce and hysteresis values are masked into their
   2-bit fields instead of being rejected.

Patch 3 makes unbind wait for the callback, which can take as long as
the firmware loader's fallback timeout if a user-mode helper fallback
is configured.

Applies to both fixes-togreg and testing.
Compile-tested only (W=1 for every patch, checkpatch --strict clean); I
don't have AW96103 hardware.

Arnav Kapoor (4):
  iio: proximity: aw96103: report negative proximity diff values
  iio: proximity: aw96103: use the default configuration without
    firmware
  iio: proximity: aw96103: wait for the configuration load before
    freeing
  iio: proximity: aw96103: reject out-of-range debounce and hysteresis
    values

 drivers/iio/proximity/aw96103.c | 41 +++++++++++++++++++++++++++------
 1 file changed, 34 insertions(+), 7 deletions(-)


base-commit: 793d80b04b6c4f7f896c273567f94eccd0fac54d
-- 
2.53.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-11-26 14:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-26  5:30 [PATCH 0/4] iio: proximity: aw96103: fix diff sign, missing config, async config lifetime and event values Arnav Kapoor
2026-11-26  5:30 ` [PATCH 1/4] iio: proximity: aw96103: report negative proximity diff values Arnav Kapoor
2026-11-26 14:29   ` Andy Shevchenko
2026-11-26  5:30 ` [PATCH 2/4] iio: proximity: aw96103: use the default configuration without firmware Arnav Kapoor
2026-11-26  5:30 ` [PATCH 3/4] iio: proximity: aw96103: wait for the configuration load before freeing Arnav Kapoor
2026-11-26  5:30 ` [PATCH 4/4] iio: proximity: aw96103: reject out-of-range debounce and hysteresis values Arnav Kapoor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox