linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Oliver Neukum <oneukum@suse.de>
Cc: Johannes Winkelmann <johannes.winkelmann@gmail.com>,
	linux-kernel@vger.kernel.org, lm-sensors@lm-sensors.org,
	Jean Delvare <khali@linux-fr.org>,
	Johannes Winkelmann <johannes.winkelmann@sensirion.com>
Subject: Re: [RFC][PATCH] hwmon: add support for Sensirion C1 sensor
Date: Sat, 21 Jul 2012 09:43:44 -0700	[thread overview]
Message-ID: <20120721164344.GA13261@roeck-us.net> (raw)
In-Reply-To: <13845450.qTFZGkrci5@linux-lqwf.site>

On Fri, Jul 20, 2012 at 05:14:49PM +0200, Oliver Neukum wrote:
> On Friday 20 July 2012 17:13:51 Johannes Winkelmann wrote:
> > On Fri, Jul 20, 2012 at 4:03 PM, Oliver Neukum <oneukum@suse.de> wrote:
> 
> > > We have dedicated macros for conversion of endianness.
> > 
> > Like this:
> > 		val = swab16p((__le16 *)buf);
> > 		data->temperature = ((21875 * val) >> 13) - 45000;
> > 		val = swab16p((__le16 *)(buf+2));
> > 		data->humidity = ((15000 * val) >> 13) - 10000;
> 
> I was thinking of be16_to_cpu()
> 
be16_to_cpup(), maybe.

Guenter

  parent reply	other threads:[~2012-07-21 16:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-20 12:57 [RFC][PATCH] hwmon: add support for Sensirion C1 sensor Johannes Winkelmann
2012-07-20 14:03 ` Oliver Neukum
2012-07-20 15:13   ` Johannes Winkelmann
2012-07-20 15:14     ` Oliver Neukum
2012-07-20 15:35       ` Johannes Winkelmann
2012-07-21 16:43       ` Guenter Roeck [this message]
2012-07-21 17:01 ` Guenter Roeck
2012-07-26 13:53   ` Johannes Winkelmann
2012-07-26 14:14     ` Guenter Roeck

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=20120721164344.GA13261@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=johannes.winkelmann@gmail.com \
    --cc=johannes.winkelmann@sensirion.com \
    --cc=khali@linux-fr.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lm-sensors@lm-sensors.org \
    --cc=oneukum@suse.de \
    /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;
as well as URLs for NNTP newsgroup(s).