linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] iio: add IIO_ST macros specifying endianness, IIO_ST_CPU and IIO_ST_BE
@ 2012-09-30 10:05 Peter Meerwald
  2012-09-30 10:05 ` [PATCH 2/3] iio staging: make use of IIO_ST macro where easily possible Peter Meerwald
  2012-09-30 10:05 ` [PATCH 3/3] staging iio: consistent commas in adis16400 channel spec Peter Meerwald
  0 siblings, 2 replies; 6+ messages in thread
From: Peter Meerwald @ 2012-09-30 10:05 UTC (permalink / raw)
  To: linux-iio; +Cc: Peter Meerwald

add IIO_ST_BE (for big endian); we can make use of in a subsequent
patch (max1363 driver and ad_sigma_delta.h)

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
---
 include/linux/iio/iio.h |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
index c0ae76a..a5b6a03 100644
--- a/include/linux/iio/iio.h
+++ b/include/linux/iio/iio.h
@@ -278,8 +278,14 @@ static inline bool iio_channel_has_info(const struct iio_chan_spec *chan,
 	return chan->info_mask & IIO_CHAN_INFO_BITS(type);
 }
 
-#define IIO_ST(si, rb, sb, sh)						\
-	{ .sign = si, .realbits = rb, .storagebits = sb, .shift = sh }
+#define IIO_ST_CPU(si, rb, sb, sh)					\
+	{ .sign = si, .realbits = rb, .storagebits = sb, .shift = sh,	\
+	  .endianness = IIO_CPU }
+#define IIO_ST_BE(si, rb, sb, sh)					\
+	{ .sign = si, .realbits = rb, .storagebits = sb, .shift = sh,	\
+	  .endianness = IIO_BE }
+
+#define IIO_ST(si, rb, sb, sh) IIO_ST_CPU(si, rb, sb, sh)
 
 #define IIO_CHAN_SOFT_TIMESTAMP(_si)					\
 	{ .type = IIO_TIMESTAMP, .channel = -1,				\
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-10-13 20:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-30 10:05 [PATCH 1/3] iio: add IIO_ST macros specifying endianness, IIO_ST_CPU and IIO_ST_BE Peter Meerwald
2012-09-30 10:05 ` [PATCH 2/3] iio staging: make use of IIO_ST macro where easily possible Peter Meerwald
2012-09-30 10:35   ` Jonathan Cameron
2012-09-30 11:16     ` Peter Meerwald
2012-09-30 10:05 ` [PATCH 3/3] staging iio: consistent commas in adis16400 channel spec Peter Meerwald
2012-10-13 20:27   ` Jonathan Cameron

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).