From: Jacopo Mondi <jacopo@jmondi.org>
To: Matt Ranostay <matt.ranostay@konsulko.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
"open list:IIO SUBSYSTEM AND DRIVERS" <linux-iio@vger.kernel.org>
Subject: Re: [PATCH 0/2] iio: chemical: Add Senseair Sunrise CO2 sensor
Date: Wed, 18 Aug 2021 10:03:13 +0200 [thread overview]
Message-ID: <20210818080313.dtxz6obtjslhsutm@uno.localdomain> (raw)
In-Reply-To: <CAJCx=gnx=U6grCBarPOuc=v201v+Hyp8oiaYdVH-=-2JdNEQ1A@mail.gmail.com>
Hi Matt,
On Tue, Aug 17, 2021 at 10:01:40AM -0700, Matt Ranostay wrote:
> On Tue, Aug 17, 2021 at 8:49 AM Jacopo Mondi <jacopo@jmondi.org> wrote:
> >
> > Hello,
> > this is a small driver for the Senseair Sunrise 006-0-0007 CO2
> > sensor.
> >
> > The driver supports continuous reads of temperature and CO2 concentration
> > through two dedicated IIO channels.
> >
> > While the driver is rather simple I'm not sure calibration is handled in
> > the correct way. In this version, at probe time, a check on the general
> > error register is made to verify if a calibration cycle is required.
> > The calibration takes a time in the order of a few seconds, and currently
> > can only happen at probe time.
> >
> > Is there a mechanism available in the IIO framework to expose a trigger to have
> > userspace decide when the calibration has to happen ? In my understanding IIO
> > triggers are meant to trigger read events, using them for calibration purpose
> > seems not the right thing to do, or am I mistaken ?
>
> For sure you shouldn't use the trigger framework for that.
>
> You should use an attribute group, e.g.
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/iio/proximity/as3935.c?h=v5.14-rc6#n168
Thanks for the pointer! I'll consider that for v2!
>
> - Matt
>
> >
> > Thanks
> > j
> >
> > Jacopo Mondi (2):
> > dt-bindings: iio: chemical: Document senseair,sunrise CO2 sensor
> > iio: chemical: Add Senseair Sunrise 006-0-007 driver
> >
> > .../iio/chemical/senseair,sunrise.yaml | 51 +++
> > .../devicetree/bindings/vendor-prefixes.yaml | 2 +
> > MAINTAINERS | 6 +
> > drivers/iio/chemical/Kconfig | 10 +
> > drivers/iio/chemical/Makefile | 1 +
> > drivers/iio/chemical/sunrise.c | 310 ++++++++++++++++++
> > 6 files changed, 380 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/iio/chemical/senseair,sunrise.yaml
> > create mode 100644 drivers/iio/chemical/sunrise.c
> >
> > --
> > 2.32.0
> >
prev parent reply other threads:[~2021-08-18 8:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-17 15:49 [PATCH 0/2] iio: chemical: Add Senseair Sunrise CO2 sensor Jacopo Mondi
2021-08-17 15:49 ` [PATCH 1/2] dt-bindings: iio: chemical: Document senseair,sunrise " Jacopo Mondi
2021-08-17 16:50 ` Andy Shevchenko
2021-08-18 7:29 ` Jacopo Mondi
2021-08-18 16:47 ` Rob Herring
2021-08-18 16:49 ` Rob Herring
2021-08-17 15:49 ` [PATCH 2/2] iio: chemical: Add Senseair Sunrise 006-0-007 driver Jacopo Mondi
2021-08-17 16:58 ` Andy Shevchenko
2021-08-18 8:02 ` Jacopo Mondi
2021-08-18 9:29 ` Andy Shevchenko
2021-08-29 16:05 ` Jonathan Cameron
2021-08-17 17:01 ` [PATCH 0/2] iio: chemical: Add Senseair Sunrise CO2 sensor Matt Ranostay
2021-08-18 8:03 ` Jacopo Mondi [this message]
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=20210818080313.dtxz6obtjslhsutm@uno.localdomain \
--to=jacopo@jmondi.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=matt.ranostay@konsulko.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