From: Lakshay Piplani <lakshay.piplani@nxp.com>
To: linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org,
jic23@kernel.org, dlechner@baylibre.com, nuno.sa@analog.com,
andy@kernel.org, marcelo.schmitt1@gmail.com,
gregkh@linuxfoundation.org, viro@zeniv.linux.org.uk,
peterz@infradead.org, jstephan@baylibre.com, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org,
devicetree@vger.kernel.org
Cc: jdelvare@suse.com, linux@roeck-us.net, vikash.bansal@nxp.com,
priyanka.jain@nxp.com, shashank.rebbapragada@nxp.com,
Lakshay Piplani <lakshay.piplani@nxp.com>
Subject: [PATCH v4 0/2] iio: temperature: Add support for NXP P3T175x temperature sensors
Date: Wed, 8 Oct 2025 15:37:11 +0530 [thread overview]
Message-ID: <20251008100713.1198461-1-lakshay.piplani@nxp.com> (raw)
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 patch adds interrupt mode support under IIO while leaving comparator mode support in hwmon untouched.
The split reflects the sensor’s dual behavior and aligns with subsystem semantics.
Changes since v3:
- Added cover letter for the first time.
- Updated commit message to clarify P3T1750 vs P3T1755 difference.
- Minor cleanups and style fixes.
Thanks for your time and review.
-------------------------------------------------
Lakshay Piplani (2):
dt-bindings: iio: temperature: Add NXP P3T175x support
iio: temperature: Add driver for NXP P3T175x temperature sensor
.../bindings/iio/temperature/nxp,p3t1755.yaml | 62 +++
drivers/iio/temperature/Kconfig | 2 +
drivers/iio/temperature/p3t/Kconfig | 28 ++
drivers/iio/temperature/p3t/Makefile | 5 +
drivers/iio/temperature/p3t/p3t1755.h | 45 +++
drivers/iio/temperature/p3t/p3t1755_core.c | 363 ++++++++++++++++++
drivers/iio/temperature/p3t/p3t1755_i2c.c | 67 ++++
drivers/iio/temperature/p3t/p3t1755_i3c.c | 108 ++++++
8 files changed, 680 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/temperature/nxp,p3t1755.yaml
create mode 100644 drivers/iio/temperature/p3t/Kconfig
create mode 100644 drivers/iio/temperature/p3t/Makefile
create mode 100644 drivers/iio/temperature/p3t/p3t1755.h
create mode 100644 drivers/iio/temperature/p3t/p3t1755_core.c
create mode 100644 drivers/iio/temperature/p3t/p3t1755_i2c.c
create mode 100644 drivers/iio/temperature/p3t/p3t1755_i3c.c
--
2.25.1
next reply other threads:[~2025-10-08 10:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-08 10:07 Lakshay Piplani [this message]
2025-10-08 10:07 ` [PATCH v4 1/2] dt-bindings: iio: temperature: Add NXP P3T175x support Lakshay Piplani
2025-10-08 21:01 ` Conor Dooley
2025-10-12 17:10 ` Jonathan Cameron
2025-10-08 10:07 ` [PATCH v4 2/2] iio: temperature: Add driver for NXP P3T175x temperature sensor Lakshay Piplani
2025-10-08 14:10 ` [PATCH v4 0/2] iio: temperature: Add support for NXP P3T175x temperature sensors Guenter Roeck
2025-10-09 5:56 ` [EXT] " Lakshay Piplani
2025-10-09 22:37 ` Guenter Roeck
2025-10-12 17:15 ` Jonathan Cameron
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=20251008100713.1198461-1-lakshay.piplani@nxp.com \
--to=lakshay.piplani@nxp.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=gregkh@linuxfoundation.org \
--cc=jdelvare@suse.com \
--cc=jic23@kernel.org \
--cc=jstephan@baylibre.com \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=marcelo.schmitt1@gmail.com \
--cc=nuno.sa@analog.com \
--cc=peterz@infradead.org \
--cc=priyanka.jain@nxp.com \
--cc=robh@kernel.org \
--cc=shashank.rebbapragada@nxp.com \
--cc=vikash.bansal@nxp.com \
--cc=viro@zeniv.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox