[PATCH v3 0/4] io: accel: mma8452: Allow open drain interrupt pin configuration

From: Esben Haabendal

Date: Wed Aug 05 2026 - 03:36:08 EST


Extend the mma8452 driver with support for configuration of the
interrupt line in open-drain mode, which is needed for hardware designs
where the interrupt line is shared with other chips.

Adding drive-open-drain property to mma8452 device-tree node for such
designs to enable switching pin configuration to open-drain mode.

Signed-off-by: Esben Haabendal <esben@xxxxxxxxxx>
---
Changes in v3:
- Reordered patches, swapping #2 and #3.
- Always add IRQF_SHARED flag.
- New patch to change it so IQRF_TRIGGER_LOW flag is only added when no
trigger type is set by firmware.
- Link to v2: https://patch.msgid.link/20260715-mma8452-open-drain-v2-0-95be9f5f4795@xxxxxxxxxx

Changes in v2:
- Commit message of patch 2 updated.
- Operator precedence bug fixed in flags argument to
request_threaded_irq().
- Always check return value of mma8452_set_interrupt_pin_mode(), and just
check for non-zero value.
- Added new patch with optimization of struct mma8452_data ordering.
- Link to v1: https://patch.msgid.link/20260715-mma8452-open-drain-v1-0-b1dd2a440c60@xxxxxxxxxx

To: Jonathan Cameron <jic23@xxxxxxxxxx>
To: Lars-Peter Clausen <lars@xxxxxxxxxx>
To: Rob Herring <robh@xxxxxxxxxx>
To: Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>
To: Conor Dooley <conor+dt@xxxxxxxxxx>
To: Martin Kepplinger <martink@xxxxxxxxx>
To: Sean Nyekjaer <sean@xxxxxxxxxx>
To: David Lechner <dlechner@xxxxxxxxxxxx>
To: Nuno Sá <nuno.sa@xxxxxxxxxx>
To: Andy Shevchenko <andy@xxxxxxxxxx>
To: Martin Kepplinger <martin.kepplinger@xxxxxxxxxxxxxxxxxxxxx>
Cc: linux-iio@xxxxxxxxxxxxxxx
Cc: devicetree@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx

---
Esben Haabendal (4):
dt-bindings: iio: accel: mma8452: Add drive-open-drain
iio: accel: mma8452: Optimize struct mm8452_data member orders
iio: accel: mma8452: Only apply trigger type when not set by firmware
iio: accel: mma8452: Allow open drain interrupt pin configuration

.../devicetree/bindings/iio/accel/fsl,mma8452.yaml | 6 +++
drivers/iio/accel/mma8452.c | 44 +++++++++++++++++++---
2 files changed, 45 insertions(+), 5 deletions(-)
---
base-commit: 075b74841bd0065a3bda3440873c747938e69b68
change-id: 20250401-mma8452-open-drain-81577c41375c

Best regards,
--
Esben Haabendal <esben@xxxxxxxxxx>