linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Meerwald <pmeerw@pmeerw.net>
To: linux-iio@vger.kernel.org
Cc: jic23@kernel.org, Peter Meerwald <pmeerw@pmeerw.net>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Subject: [PATCH 2/3] iio:kxcjk-1013: Fix endianness in scan_type
Date: Mon, 14 Jul 2014 22:38:37 +0200	[thread overview]
Message-ID: <1405370318-19699-3-git-send-email-pmeerw@pmeerw.net> (raw)
In-Reply-To: <1405370318-19699-1-git-send-email-pmeerw@pmeerw.net>

driver uses i2c_smbus_read_word_data() to the data in the trigger handler and hence
already does endianness conversion; the I2C chip has data in little endian, but the
value is provides in CPU endianness

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
---
 drivers/iio/accel/kxcjk-1013.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c
index a11588c..ea96170 100644
--- a/drivers/iio/accel/kxcjk-1013.c
+++ b/drivers/iio/accel/kxcjk-1013.c
@@ -466,7 +466,7 @@ static const struct attribute_group kxcjk1013_attrs_group = {
 		.realbits = 12,						\
 		.storagebits = 16,					\
 		.shift = 4,						\
-		.endianness = IIO_LE,					\
+		.endianness = IIO_CPU,					\
 	},								\
 }
 
-- 
1.9.1


  parent reply	other threads:[~2014-07-14 20:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-14 20:38 [PATCH 0/3] iio: accel driver fixes Peter Meerwald
2014-07-14 20:38 ` [PATCH 1/3] iio:kxcjk-1013: Correct error messages Peter Meerwald
2014-07-14 22:58   ` Srinivas Pandruvada
2014-07-20 16:51     ` Jonathan Cameron
2014-09-14 19:54       ` Jonathan Cameron
2014-07-14 20:38 ` Peter Meerwald [this message]
2014-07-15 18:46   ` [PATCH 2/3] iio:kxcjk-1013: Fix endianness in scan_type Srinivas Pandruvada
2014-07-20 16:53     ` Jonathan Cameron
2014-07-14 20:38 ` [PATCH 3/3] iio:bma180: Fix scale factors to report correct acceleration units Peter Meerwald
2014-07-15  6:54   ` Peter Meerwald

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=1405370318-19699-3-git-send-email-pmeerw@pmeerw.net \
    --to=pmeerw@pmeerw.net \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=srinivas.pandruvada@linux.intel.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;
as well as URLs for NNTP newsgroup(s).