linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <michael.hennerich@analog.com>
To: <jic23@kernel.org>
Cc: <linux-iio@vger.kernel.org>,
	<device-drivers-devel@blackfin.uclinux.org>,
	Michael Hennerich <michael.hennerich@analog.com>
Subject: [PATCH 2/3] iio: core: introduce IIO_CHAN_INFO_HARDWAREGAIN
Date: Wed, 9 May 2012 12:36:13 +0200	[thread overview]
Message-ID: <1336559774-21136-2-git-send-email-michael.hennerich@analog.com> (raw)
In-Reply-To: <1336559774-21136-1-git-send-email-michael.hennerich@analog.com>

From: Michael Hennerich <michael.hennerich@analog.com>

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
---
 Documentation/ABI/testing/sysfs-bus-iio |    7 +++++++
 drivers/iio/industrialio-core.c         |    1 +
 include/linux/iio/iio.h                 |    5 +++++
 3 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
index ccd8c84..cfedf63 100644
--- a/Documentation/ABI/testing/sysfs-bus-iio
+++ b/Documentation/ABI/testing/sysfs-bus-iio
@@ -282,6 +282,13 @@ Description:
 		If a discrete set of scale values are available, they
 		are listed in this attribute.
 
+What		/sys/bus/iio/devices/iio:deviceX/out_voltageY_hardwaregain
+KernelVersion:	2.6.35
+Contact:	linux-iio@vger.kernel.org
+Description:
+		Hardware applied gain factor. If shared across all channels,
+		<type>_hardwaregain is used.
+
 What:		/sys/.../in_accel_filter_low_pass_3db_frequency
 What:		/sys/.../in_magn_filter_low_pass_3db_frequency
 What:		/sys/.../in_anglvel_filter_low_pass_3db_frequency
diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
index e799d35..874fb70 100644
--- a/drivers/iio/industrialio-core.c
+++ b/drivers/iio/industrialio-core.c
@@ -91,6 +91,7 @@ static const char * const iio_chan_info_postfix[] = {
 	[IIO_CHAN_INFO_SAMP_FREQ] = "sampling_frequency",
 	[IIO_CHAN_INFO_FREQUENCY] = "frequency",
 	[IIO_CHAN_INFO_PHASE] = "phase",
+	[IIO_CHAN_INFO_HARDWAREGAIN] = "hardwaregain",
 };
 
 const struct iio_chan_spec
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
index 6fdbdb8..897c6b0 100644
--- a/include/linux/iio/iio.h
+++ b/include/linux/iio/iio.h
@@ -34,6 +34,7 @@ enum iio_chan_info_enum {
 	IIO_CHAN_INFO_SAMP_FREQ,
 	IIO_CHAN_INFO_FREQUENCY,
 	IIO_CHAN_INFO_PHASE,
+	IIO_CHAN_INFO_HARDWAREGAIN,
 };
 
 #define IIO_CHAN_INFO_SHARED_BIT(type) BIT(type*2)
@@ -95,6 +96,10 @@ enum iio_chan_info_enum {
 	IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_PHASE)
 #define IIO_CHAN_INFO_PHASE_SHARED_BIT			\
 	IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_PHASE)
+#define IIO_CHAN_INFO_HARDWAREGAIN_SEPARATE_BIT			\
+	IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_HARDWAREGAIN)
+#define IIO_CHAN_INFO_HARDWAREGAIN_SHARED_BIT			\
+	IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_HARDWAREGAIN)
 
 enum iio_endian {
 	IIO_CPU,
-- 
1.7.0.4



  reply	other threads:[~2012-05-09 10:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-09 10:36 [PATCH 1/3] iio: core: introduce dB scle: IIO_VAL_INT_PLUS_MICRO_DB michael.hennerich
2012-05-09 10:36 ` michael.hennerich [this message]
2012-05-10  8:09   ` [PATCH 2/3] iio: core: introduce IIO_CHAN_INFO_HARDWAREGAIN Jonathan Cameron
2012-05-09 10:36 ` [PATCH 3/3] iio: amplifiers: New driver for AD8366 Dual-Digital Variable Gain Amplifier michael.hennerich
2012-05-10  9:08   ` Jonathan Cameron
2012-05-11  7:32     ` Michael Hennerich
2012-05-11  7:36       ` Jonathan Cameron
2012-05-10  8:09 ` [PATCH 1/3] iio: core: introduce dB scle: IIO_VAL_INT_PLUS_MICRO_DB Jonathan Cameron
  -- strict thread matches above, loose matches on Subject: below --
2012-05-11  9:36 michael.hennerich
2012-05-11  9:36 ` [PATCH 2/3] iio: core: introduce IIO_CHAN_INFO_HARDWAREGAIN michael.hennerich

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=1336559774-21136-2-git-send-email-michael.hennerich@analog.com \
    --to=michael.hennerich@analog.com \
    --cc=device-drivers-devel@blackfin.uclinux.org \
    --cc=jic23@kernel.org \
    --cc=linux-iio@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;
as well as URLs for NNTP newsgroup(s).