public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] iio: mpl3115: support for events
@ 2025-11-05  9:56 Antoni Pokusinski
  2025-11-05  9:56 ` [PATCH v3 1/3] iio: mpl3115: use get_unaligned_be24 to retrieve pressure data Antoni Pokusinski
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Antoni Pokusinski @ 2025-11-05  9:56 UTC (permalink / raw)
  To: jic23, dlechner, nuno.sa, andy, marcelo.schmitt1
  Cc: linux-iio, linux-kernel, Antoni Pokusinski

Hello,
The mpl3115 device can raise interrupts when a pressure or temperature
threshold is crossed, this patchset adds support for them using IIO's
events interface.

In this v3 I updated pressure data retrieval, so that the measurements
are now stored into u8[3], thanks for the explanation in v2. Some other
small cosmetic changes as well.

Kind regards,
Antoni Pokusinski

---
Changes since v2:
(general)
* added the patch tidying up the pressure data retrieval (u8[3] used)
(patch 2/3 "add threshold support")
* includes: removed unused linux/units.h
* read_thresh: fixed comment formatting
* interrupt_handler: val_press is now u8[3] instead of __be32 

Changes since v1:
(general)
* squashed the cleanup patch
* added the patch with the documentation update
(patch 1/2 "add threshold event support")
* patch description: explained changes in locking
* read_event_config: replaced switch with ifs
* read_event_config: return as early as possible, got rid of int_en_mask
* read/write_thresh: pressure: calculation changes to comply with raw ABI
* interrupt_handler: reordered the INT_SRC_* bits in if condition
* read/write_thresh: used sizeof() and values from limits.h
* write_thresh: replaced `u8 tmp[2]` with `__be16 tmp`
* dropped the space between casting `(u8 *) &tmp`


Antoni Pokusinski (3):
  iio: mpl3115: use get_unaligned_be24 to retrieve pressure data
  iio: mpl3115: add threshold events support
  iio: ABI: document pressure event attributes

 Documentation/ABI/testing/sysfs-bus-iio |   2 +
 drivers/iio/pressure/mpl3115.c          | 225 ++++++++++++++++++++++--
 2 files changed, 214 insertions(+), 13 deletions(-)


base-commit: 1d09cf18cc91d29f650ad9811ed4868d9304d6c7
-- 
2.25.1


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

end of thread, other threads:[~2025-11-11 19:47 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-05  9:56 [PATCH v3 0/3] iio: mpl3115: support for events Antoni Pokusinski
2025-11-05  9:56 ` [PATCH v3 1/3] iio: mpl3115: use get_unaligned_be24 to retrieve pressure data Antoni Pokusinski
2025-11-05 15:20   ` Andy Shevchenko
2025-11-07  1:33   ` Marcelo Schmitt
2025-11-09 16:38     ` Jonathan Cameron
2025-11-10 15:59       ` Antoni Pokusinski
2025-11-11 19:47         ` Jonathan Cameron
2025-11-05  9:56 ` [PATCH v3 2/3] iio: mpl3115: add threshold events support Antoni Pokusinski
2025-11-05 15:25   ` Andy Shevchenko
2025-11-06 20:28     ` Antoni Pokusinski
2025-11-07  1:55   ` Marcelo Schmitt
2025-11-07 22:01     ` Antoni Pokusinski
2025-11-08 19:05       ` Marcelo Schmitt
2025-11-09 16:02         ` Andy Shevchenko
2025-11-05  9:56 ` [PATCH v3 3/3] iio: ABI: document pressure event attributes Antoni Pokusinski
2025-11-07  2:32   ` Marcelo Schmitt
2025-11-07  9:26     ` Antoni Pokusinski
2025-11-09 16:43     ` Jonathan Cameron

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