From: Dimitri Fedrau <dima.fedrau@gmail.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: 579lpy@gmail.com, javier.carrasco.cruz@gmail.com,
jic23@kernel.org, lars@metafoo.de, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: humidity: hdc3020: add threshold events support
Date: Sat, 3 Feb 2024 15:47:45 +0100 [thread overview]
Message-ID: <20240203144745.GB3727@debian> (raw)
In-Reply-To: <236dc9db-8525-413e-a77b-54df198c86f5@wanadoo.fr>
Am Sat, Feb 03, 2024 at 10:58:24AM +0100 schrieb Christophe JAILLET:
> Le 03/02/2024 à 10:05, Dimitri Fedrau a écrit :
>[...]
> > diff --git a/drivers/iio/humidity/hdc3020.c b/drivers/iio/humidity/hdc3020.c
> > index ed70415512f6..1cdff7af4ca8 100644
> > --- a/drivers/iio/humidity/hdc3020.c
> > +++ b/drivers/iio/humidity/hdc3020.c
> > @@ -16,16 +16,27 @@
> > #include <linux/init.h>
> > #include <linux/module.h>
> > #include <linux/mutex.h>
> > +#include <linux/interrupt.h>
>
> Nit: alphabetical order could be kept
>
Will fix it.
> > #include <asm/unaligned.h>
> > #include <linux/iio/iio.h>
> > +#include <linux/iio/events.h>
>
> Nit: same
>
> ...
>
Will fix it.
> > +static const u8 HDC3020_R_T_RH_THRESH_LOW[2] = { 0xE1, 0x02 };
> > +static const u8 HDC3020_R_R_RH_THRESH_LOW_CLR[2] = { 0xE1, 0x09 };
>
> I don't know what the R and T are for, but shoukld this be
> HDC3020_R_T_RH_THRESH_LOW_CLR to match other adjacent line?
>
You are right, should match the others. Will fix it.
> > +static const u8 HDC3020_R_T_RH_THRESH_HIGH_CLR[2] = { 0xE1, 0x14 };
> > +static const u8 HDC3020_R_T_RH_THRESH_HIGH[2] = { 0xE1, 0x1F };
>
> ...
>
>[...]
> Maybe something like:
> #define MIN_TEMP -45 (or -40)
> #define MAX_TEMP 120
> in order to avoid hard coded constant?
>
Will add the constants, thanks.
>[...]
Best regards,
Dimitri
prev parent reply other threads:[~2024-02-03 14:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-03 9:05 [PATCH] iio: humidity: hdc3020: add threshold events support Dimitri Fedrau
2024-02-03 9:30 ` Javier Carrasco
2024-02-03 14:42 ` Dimitri Fedrau
2024-02-03 15:53 ` Javier Carrasco
2024-02-03 16:08 ` Dimitri Fedrau
2024-02-03 9:58 ` Christophe JAILLET
2024-02-03 10:06 ` Javier Carrasco
2024-02-03 14:54 ` Dimitri Fedrau
2024-02-03 14:47 ` Dimitri Fedrau [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=20240203144745.GB3727@debian \
--to=dima.fedrau@gmail.com \
--cc=579lpy@gmail.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=javier.carrasco.cruz@gmail.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.