From: Armin Wolf <W_Armin@gmx.de>
To: Daniel Matyas <daniel.matyas23@gmail.com>, linux-iio@vger.kernel.org
Cc: linux-i2c@vger.kernel.org, linux-hwmon@vger.kernel.org
Subject: Re: Creating a driver for MAX31827 temperature switch
Date: Mon, 3 Apr 2023 01:42:43 +0200 [thread overview]
Message-ID: <71d56511-c7ef-e109-406d-6dff83ed382e@gmx.de> (raw)
In-Reply-To: <ZCn0KeOQFJclqiAK@daniel-Precision-5530>
Am 02.04.23 um 23:31 schrieb Daniel Matyas:
> Dear Kernel community,
>
> I am developing an IIO driver for a temperature switch, which communicates through I2C at Analog Devices Inc.
>
> When implementing the event handling for the comparator mode of the device, I faced a problem: I don't know how to differentiate the underTemp event from the overTemp event. To understand better, I suggest you check out the device's data sheet for Address map (page 12), Configuration Register Definition (page 13) and OT/UT Status Bits and ALARM Pin Behavior (page 15) - https://www.analog.com/media/en/technical-documentation/data-sheets/MAX31827-MAX31829.pdf
>
> I had the idea to make 2 channels with the exact same attributes, but with different indexes, so that I can store the overTemp related events on channel 0 and underTemp related events on channel 1. Even so, I don't really feel like this is the right solution. Can anyone give me some advice on this?
>
> Also, I was suggested that I convert my driver from IIO to HWMON. Do you think that this is needed?
>
> Yours faithfully,
> Daniel Matyas
Hi,
regarding the question whether the driver should be a hwmon driver: i depends on the usage of the temperature sensor.
If its a low sample rate temperature sensor used to mainly monitor the temperature of the computer system itself, then
the driver should be a hwmon driver. The datasheet suggests that the sensor device is intended for monitoring computer systems,
so a hwmon driver would make sense (see https://www.kernel.org/doc/html/latest/driver-api/iio/intro.html).
Armin Wolf
next prev parent reply other threads:[~2023-04-02 23:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-02 21:31 Creating a driver for MAX31827 temperature switch Daniel Matyas
2023-04-02 23:42 ` Armin Wolf [this message]
2023-04-03 0:53 ` Guenter Roeck
2023-04-03 18:42 ` 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=71d56511-c7ef-e109-406d-6dff83ed382e@gmx.de \
--to=w_armin@gmx.de \
--cc=daniel.matyas23@gmail.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
/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