All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dimitri Fedrau <dima.fedrau@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Javier Carrasco <javier.carrasco.cruz@gmail.com>,
	Li peiyu <579lpy@gmail.com>, Lars-Peter Clausen <lars@metafoo.de>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] iio: humidity: hdc3020: add threshold events support
Date: Mon, 12 Feb 2024 16:20:01 +0100	[thread overview]
Message-ID: <20240212152001.GA75720@debian> (raw)
In-Reply-To: <20240210161117.1bb3dd7f@jic23-huawei>

Am Sat, Feb 10, 2024 at 04:11:17PM +0000 schrieb Jonathan Cameron:
 
> > > > > [...]
> > > > #define HDC3020_S_T_RH_THRESH_LOW       0x6100
> > > > #define HDC3020_S_T_RH_THRESH_LOW_CLR   0x610B
> > > > #define HDC3020_S_T_RH_THRESH_HIGH_CLR  0x6116
> > > > #define HDC3020_S_T_RH_THRESH_HIGH      0x611D
> > > > 
> > > > #define HDC3020_R_T_RH_THRESH_LOW       0x6102
> > > > #define HDC3020_R_T_RH_THRESH_LOW_CLR   0x6109
> > > > #define HDC3020_R_T_RH_THRESH_HIGH_CLR  0x6114
> > > > #define HDC3020_R_T_RH_THRESH_HIGH      0x611F
> > > > 
> > > > I don't know if it's a good idea, as we would need to make sure it is
> > > > big endian in the buffer. Probably with a function that handles this.  
> > > I think this is the best plan with a
> > > put_unaligned_be16() to deal with the endianness.
> > > The compiler should be able to optimize that heavily.
> > >  
> > I think that would require some refactoring. I would add patches that
> > are fixing this. Have there been reasons for using the pairs ? I'm just
> > curious.
> 
> Not that I can think of. Maybe how they are represented on the
> dataheet?  Often people just copy that stuff without thinking
> about it (I know I've been guilty of this ;)
> 
Ok, just wanted to make sure I didn't miss anything. Yes, probably the
command table drives one into that direction.

Dimitri

      reply	other threads:[~2024-02-12 15:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-04 10:37 [PATCH v2] iio: humidity: hdc3020: add threshold events support Dimitri Fedrau
2024-02-04 11:26 ` Javier Carrasco
2024-02-04 12:38   ` Dimitri Fedrau
2024-02-04 14:43 ` Jonathan Cameron
2024-02-05  7:04   ` Dimitri Fedrau
2024-02-05  9:33     ` Jonathan Cameron
2024-02-05  9:53       ` Dimitri Fedrau
2024-02-10 16:11         ` Jonathan Cameron
2024-02-12 15:20           ` 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=20240212152001.GA75720@debian \
    --to=dima.fedrau@gmail.com \
    --cc=579lpy@gmail.com \
    --cc=Jonathan.Cameron@huawei.com \
    --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.