mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jaakko Koivisto <jmatko@utu.fi>
To: Jonathan Cameron <jic23@kernel.org>, Jaakko Koivisto <jmatko@utu.fi>
Cc: "Andreas Klinger" <ak@it-klinger.de>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 5/5] iio: chemical: sgp40: Implement turn_heater_off-command
Date: Mon, 16 Nov 2026 11:23:46 +0200	[thread overview]
Message-ID: <DMWIYCXE9DLV.3T2MJYLQRGIQN@utu.fi> (raw)
In-Reply-To: <20261108010518.5d9c0016@jic23-hlaptop>

On Sun Nov 8, 2026 at 3:05 AM EET, Jonathan Cameron wrote:
> On Mon, 2 Nov 2026 11:56:02 +0200
> Jaakko Koivisto <jmatko@utu.fi> wrote:
>
>> Add functionality for turning the SGP40 sensor heating element
>> on or off manually. After turning the heater off, the sensor enters
>> idle mode. Track the state of the heater in the driver, as the device
>> does not expose current heater state via any register.
>> 
>> Turning the heater off saves approx. 2.5 mA compared to regular
>> operation. The heating element is automatically turned back on
>> when measurement is performed.
> Hi Jaakko,
>
> Add something here on how long it takes to power up.  It
> isn't obvious so far that this should be just done via runtime
> pm and autosuspend.
>
> Normally the argument to have a manual turn off is that time
> is huge. Otherwise, why not runtime pm?
>

I'm currently unsure which would be the better way, runtime pm or
manual. There is another source in addition to the datasheet which says
that turning the sensor on 170 ms before measurement is acceptable
(https://github.com/Sensirion/gas-index-algorithm, Algorithm usage with
SGP40 in low power mode).
The datasheet values 60 seconds and 60 minutes warrant manual control,
but 170 ms would be workable with automatic pm.

From chemistry perspective the datasheet values refer to power-on from
completely cold sensor, lot's of adsorped water and need to heat for a
long time to reach steady state, while the 170 ms case is for periodic
measurement and the sensor does not have enough time to cool down and
adsorp more water between the measurements.

I'm gravitating towards manual control, since that does not alter current
behaviour, the proper heating times are based on how the sensor is used,
and the sensor power consumption is quite small so it's not horrible
having it on all the time.

>
> thanks,
>
> Jonathan



  reply	other threads:[~2026-11-16  9:24 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-02  9:12 [PATCH v2 0/5] iio: chemical: sgp40: add funtions for serial number readback, self-test, and heater control Jaakko Koivisto
2026-11-02  9:12 ` [PATCH v2 1/5] iio: chemical: sgp40: Do not convert I2C errors to EIO Jaakko Koivisto
2026-11-02  9:54   ` Joshua Crofts
2026-11-02  9:12 ` [PATCH v2 2/5] iio: chemical: sgp40: Replace manual locking with guard() Jaakko Koivisto
2026-11-02 10:10   ` Joshua Crofts
2026-11-16  8:49     ` Jaakko Koivisto
2026-11-16  9:07       ` Andy Shevchenko
2026-11-03 10:01   ` Andy Shevchenko
2026-11-02  9:12 ` [PATCH v2 3/5] iio: chemical: sgp40: Implement get_serial_number-command Jaakko Koivisto
2026-11-02 10:20   ` Joshua Crofts
2026-11-16  8:39     ` Jaakko Koivisto
2026-11-02  9:12 ` [PATCH v2 4/5] iio: chemical: sgp40: Implement execute_self_test-command Jaakko Koivisto
2026-11-02 10:21   ` Joshua Crofts
2026-11-08  1:02   ` Jonathan Cameron
2026-11-02  9:56 ` [PATCH v2 5/5] iio: chemical: sgp40: Implement turn_heater_off-command Jaakko Koivisto
2026-11-02 10:24   ` Joshua Crofts
2026-11-08  1:05   ` Jonathan Cameron
2026-11-16  9:23     ` Jaakko Koivisto [this message]
2026-11-02  9:15 Jaakko Koivisto

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=DMWIYCXE9DLV.3T2MJYLQRGIQN@utu.fi \
    --to=jmatko@utu.fi \
    --cc=ak@it-klinger.de \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    /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

all inboxes | Powered by JetHome®