[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <96f5443f-5b40-4d05-b350-78d55a1d841d@roeck-us.net>
Date: Wed, 8 Oct 2025 07:10:34 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Lakshay Piplani <lakshay.piplani@....com>, linux-kernel@...r.kernel.org,
linux-iio@...r.kernel.org, jic23@...nel.org, dlechner@...libre.com,
nuno.sa@...log.com, andy@...nel.org, marcelo.schmitt1@...il.com,
gregkh@...uxfoundation.org, viro@...iv.linux.org.uk, peterz@...radead.org,
jstephan@...libre.com, robh@...nel.org, krzk+dt@...nel.org,
conor+dt@...nel.org, devicetree@...r.kernel.org
Cc: jdelvare@...e.com, vikash.bansal@....com, priyanka.jain@....com,
shashank.rebbapragada@....com
Subject: Re: [PATCH v4 0/2] iio: temperature: Add support for NXP P3T175x
temperature sensors
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
Powered by blists - more mailing lists