linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] iio: core: add _bias channel information
@ 2011-09-15 15:04 michael.hennerich
  2011-09-15 15:04 ` [PATCH 2/2] iio: adc: Replace, rewrite ad7745 from scratch michael.hennerich
  2011-09-15 15:31 ` [PATCH 1/2] iio: core: add _bias channel information Jonathan Cameron
  0 siblings, 2 replies; 7+ messages in thread
From: michael.hennerich @ 2011-09-15 15:04 UTC (permalink / raw)
  To: jic23; +Cc: linux-iio, device-drivers-devel, drivers, Michael Hennerich

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


Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
---
 drivers/staging/iio/Documentation/sysfs-bus-iio |   16 ++++++++++++++++
 drivers/staging/iio/iio.h                       |    2 ++
 drivers/staging/iio/industrialio-core.c         |    1 +
 3 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/iio/Documentation/sysfs-bus-iio b/drivers/staging/iio/Documentation/sysfs-bus-iio
index 1d52c96..12e70be 100644
--- a/drivers/staging/iio/Documentation/sysfs-bus-iio
+++ b/drivers/staging/iio/Documentation/sysfs-bus-iio
@@ -201,6 +201,22 @@ Description:
 		for variation between different instances of the part, typically
 		adjusted by using some hardware supported calibration procedure.
 
+What:		/sys/bus/iio/devices/iio:deviceX/in_capacitanceY_bias
+KernelVersion:	3.1.0
+Contact:	linux-iio@vger.kernel.org
+Description:
+		If known for a device, offset/bias to be added to <type>[Y]_raw
+		post to scaling by <type>[Y]_scale in order to obtain value in
+		the <type> units as specified in <type>[y]_raw documentation.
+		Not present if the bias/offset is always 0 or unknown.
+		If Y is not present, then the bias/offset applies to all in
+		channels of <type>. May be writable if a variable offset bias
+		can be applied on the device. Note that this is different to
+		calibbias which is for devices (or drivers) that apply offsets
+		to compensate for variation between different instances of the
+		part, typically adjusted by using some hardware supported
+		calibration procedure.
+
 What:		/sys/bus/iio/devices/iio:deviceX/in_voltageY_scale
 What:		/sys/bus/iio/devices/iio:deviceX/in_voltageY_supply_scale
 What:		/sys/bus/iio/devices/iio:deviceX/in_voltage_scale
diff --git a/drivers/staging/iio/iio.h b/drivers/staging/iio/iio.h
index 8ef04f8..06527ba 100644
--- a/drivers/staging/iio/iio.h
+++ b/drivers/staging/iio/iio.h
@@ -83,6 +83,8 @@ enum iio_chan_info_enum {
 	IIO_CHAN_INFO_QUADRATURE_CORRECTION_RAW_SEPARATE,
 	IIO_CHAN_INFO_AVERAGE_RAW_SHARED,
 	IIO_CHAN_INFO_AVERAGE_RAW_SEPARATE,
+	IIO_CHAN_INFO_BIAS_SHARED,
+	IIO_CHAN_INFO_BIAS_SEPARATE,
 };
 
 enum iio_endian {
diff --git a/drivers/staging/iio/industrialio-core.c b/drivers/staging/iio/industrialio-core.c
index fd4aada..5e9a65d 100644
--- a/drivers/staging/iio/industrialio-core.c
+++ b/drivers/staging/iio/industrialio-core.c
@@ -86,6 +86,7 @@ static const char * const iio_chan_info_postfix[] = {
 	[IIO_CHAN_INFO_QUADRATURE_CORRECTION_RAW_SHARED/2]
 	= "quadrature_correction_raw",
 	[IIO_CHAN_INFO_AVERAGE_RAW_SHARED/2] = "mean_raw",
+	[IIO_CHAN_INFO_BIAS_SHARED/2] = "bias",
 };
 
 /**
-- 
1.7.0.4

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

end of thread, other threads:[~2011-09-16 10:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-15 15:04 [PATCH 1/2] iio: core: add _bias channel information michael.hennerich
2011-09-15 15:04 ` [PATCH 2/2] iio: adc: Replace, rewrite ad7745 from scratch michael.hennerich
2011-09-15 16:01   ` Jonathan Cameron
2011-09-16 10:57     ` Michael Hennerich
2011-09-15 15:31 ` [PATCH 1/2] iio: core: add _bias channel information Jonathan Cameron
2011-09-15 15:33   ` Hennerich, Michael
2011-09-15 16:04     ` 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).