mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@cam.ac.uk>
To: iio-linux@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, gregkh@suse.de,
	Jonathan Cameron <jic23@cam.ac.uk>
Subject: [PATCH 01/19] staging:iio: Add new in_raw definitions for adc channels.
Date: Mon, 26 Apr 2010 20:31:03 +0100	[thread overview]
Message-ID: <1272310281-7418-2-git-send-email-jic23@cam.ac.uk> (raw)
In-Reply-To: <1272310281-7418-1-git-send-email-jic23@cam.ac.uk>

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
---
 drivers/staging/iio/adc/adc.h |   12 ++++++++++++
 drivers/staging/iio/sysfs.h   |    3 +++
 2 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/iio/adc/adc.h b/drivers/staging/iio/adc/adc.h
index d925b2c..46f0d08 100644
--- a/drivers/staging/iio/adc/adc.h
+++ b/drivers/staging/iio/adc/adc.h
@@ -9,5 +9,17 @@
  *
  */
 
+/* Deprecated */
 #define IIO_DEV_ATTR_ADC(_num, _show, _addr)			\
   IIO_DEVICE_ATTR(adc_##_num, S_IRUGO, _show, NULL, _addr)
+
+#define IIO_DEV_ATTR_IN_RAW(_num, _show, _addr)				\
+	IIO_DEVICE_ATTR(in##_num##_raw, S_IRUGO, _show, NULL, _addr)
+
+#define IIO_DEV_ATTR_IN_DIFF_RAW(_nump, _numn, _show, _addr)		\
+	IIO_DEVICE_ATTR_NAMED(in##_nump##min##_numn##_raw,		\
+			      in##_nump-in##_numn##_raw,		\
+			      S_IRUGO,					\
+			      _show,					\
+			      NULL,					\
+			      _addr)
diff --git a/drivers/staging/iio/sysfs.h b/drivers/staging/iio/sysfs.h
index e501e13..d8fe0e2 100644
--- a/drivers/staging/iio/sysfs.h
+++ b/drivers/staging/iio/sysfs.h
@@ -98,6 +98,9 @@ struct iio_const_attr {
 	struct iio_dev_attr iio_dev_attr_##_name		\
 	= IIO_ATTR(_name, _mode, _show, _store, _addr)
 
+#define IIO_DEVICE_ATTR_NAMED(_vname, _name, _mode, _show, _store, _addr) \
+	struct iio_dev_attr iio_dev_attr_##_vname			\
+	= IIO_ATTR(_name, _mode, _show, _store, _addr)
 
 #define IIO_DEVICE_ATTR_2(_name, _mode, _show, _store, _addr, _val2)	\
 	struct iio_dev_attr iio_dev_attr_##_name			\
-- 
1.6.4.4


  reply	other threads:[~2010-04-26 19:28 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-26 19:31 [PATCH 00/19 V2] staging:iio: ABi changes round 1 Jonathan Cameron
2010-04-26 19:31 ` Jonathan Cameron [this message]
2010-04-26 19:31   ` [PATCH 02/19] staging:iio: Add new attrs for sampling frequency available and temp_raw Jonathan Cameron
2010-04-26 19:31     ` [PATCH 03/19] iio:staging:accelerometers move towards the new abi Jonathan Cameron
2010-04-26 19:31       ` [PATCH 04/19] staging:iio: Support functions for scan mask matching Jonathan Cameron
2010-04-26 19:31         ` [PATCH 05/19] staging: iio: Move from class to bus Jonathan Cameron
2010-04-26 19:31           ` [PATCH 06/19] staging:iio: Move event attributes into the event[n] device in sysfs Jonathan Cameron
2010-04-26 19:31             ` [PATCH 07/19] staging:iio: Clean out unused IIO_SCAN_EL and add IIO_SCAN_NAMED_EL_C Jonathan Cameron
2010-04-26 19:31               ` [PATCH 08/19] staging:iio:max1363 move to new abi Jonathan Cameron
2010-04-26 19:31                 ` [PATCH 09/19] staging:iio: Documentation, update iio_utils.h for the move to a bus Jonathan Cameron
2010-04-26 19:31                   ` [PATCH 10/19] staging:iio: ABI documentation (partial) Jonathan Cameron
2010-04-26 19:31                     ` [PATCH 11/19] staging:iio: Directory name changes to match new ABI Jonathan Cameron
2010-04-26 19:31                       ` [PATCH 12/19] staging:iio:tsl2563: change lux to illuminanc0_input to match new abi Jonathan Cameron
2010-04-26 19:31                         ` [PATCH 13/19] staging:iio: Remove naming via IDR's where no longer necessary under " Jonathan Cameron
2010-04-26 19:31                           ` [PATCH 14/19] staging:iio:max1363 add support for max11606-max11617 Jonathan Cameron
2010-04-26 19:31                             ` [PATCH 15/19] staging:iio:max1363 add support for 8 bit equivalent devices, max1036-9, max11600-5 Jonathan Cameron
2010-04-26 19:31                               ` [PATCH 16/19] Staging: IIO: Fix uses of spinlocks prior to init in ring implementations Jonathan Cameron
2010-04-26 19:31                                 ` [PATCH 17/19] staging:iio:ring_sw: Fix incorrect test on successful read of last value, causes infinite loop Jonathan Cameron
2010-04-26 19:31                                   ` [PATCH 18/19] staging:iio:tsl2563 add a name attribute under the iio Jonathan Cameron
2010-04-26 19:31                                     ` [PATCH 19/19] staging:iio:Documentation: Rewrite example for new abi Jonathan Cameron
2010-04-26 20:10 ` [PATCH 00/19 V2] staging:iio: ABi changes round 1 Jonathan Cameron
2010-04-26 21:30   ` Greg KH

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=1272310281-7418-2-git-send-email-jic23@cam.ac.uk \
    --to=jic23@cam.ac.uk \
    --cc=gregkh@suse.de \
    --cc=iio-linux@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®