Re: [PATCH v4 0/2] iio: temperature: Add support for NXP P3T175x temperature sensors
From: Guenter Roeck
Date: Wed Oct 08 2025 - 10:11:40 EST
On 10/8/25 03:07, Lakshay Piplani wrote:
This patch adds support for the P3T1750/P3T1755 temperature sensors under the IIO subsystem.
P3T1750/P3T1755 support two operational modes:
1. Comparator Mode
2. Interrupt (Latched) Mode
The HWMON subsystem is more suitable for implementing drivers for comparator mode operations.
Reason:
- Temperature thresholds can be polled and exposed via sysfs.
- Register reads do not clear status, allowing safe alarm state derivation.
- Matches existing drivers under hwmon.
The IIO subsystem is more suitable for implementing drivers for interrupt (latched) mode operations.
Reason:
- Interrupt mode uses edge-triggered ALERT/IBI signal interrupts, which can be pushed to user space using iio_push_event.
- IIO’s event API (IIO_EV_TYPE_THRESH) supports timestamped rising/falling edge events.
- I3C IBI integration maps naturally to IIO’s event push model.
- No persistent alarm bits are available; so polling in HWMON may result in missing events.
This is just wrong. Interrupt support can just as well be implemented
in a hwmon driver.
Guenter