devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laxman Dewangan <ldewangan@nvidia.com>
To: robh+dt@kernel.org, jic23@kernel.org, corbet@lwn.net, lars@metafoo.de
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-iio@vger.kernel.org,
	Laxman Dewangan <ldewangan@nvidia.com>
Subject: [PATCH 3/3] iio: adc: ina3221: Add sysfs details for TI INA3221
Date: Wed, 1 Jun 2016 18:04:14 +0530	[thread overview]
Message-ID: <1464784454-7988-3-git-send-email-ldewangan@nvidia.com> (raw)
In-Reply-To: <1464784454-7988-1-git-send-email-ldewangan@nvidia.com>

The INA3221 is a three-channel, high-side current and bus voltage monitor
with an I2C interface from Texas Instruments. The INA3221 monitors both
shunt voltage drops and bus supply voltages in addition to having
programmable conversion times and averaging modes for these signals.
The INA3221 offers both critical and warning alerts to detect multiple
programmable out-of-range conditions for each channel.

The device export the SW interface  with IIO framework. Detail out the
all sysfs exposed by device for reference.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
 Documentation/iio/adc/ina3221.txt | 81 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 81 insertions(+)
 create mode 100644 Documentation/iio/adc/ina3221.txt

diff --git a/Documentation/iio/adc/ina3221.txt b/Documentation/iio/adc/ina3221.txt
new file mode 100644
index 0000000..30cbd6d
--- /dev/null
+++ b/Documentation/iio/adc/ina3221.txt
@@ -0,0 +1,81 @@
+The INA3221 is a three-channel, high-side current and bus voltage monitor
+with an I2C interface from Texas Instruments. The INA3221 monitors both
+shunt voltage drops and bus supply voltages in addition to having
+programmable conversion times and averaging modes for these signals.
+The INA3221 offers both critical and warning alerts to detect multiple
+programmable out-of-range conditions for each channel.
+
+Driver exposes multiple sysfs whose details are as follows:
+
+/sys/bus/iio/devices/iio:device0/operating_mode:
+	Operating mode of device whether it is in oneshot mode or
+	continuous conversion mode.
+	To change mode to continuous mode say:
+		echo "c" > operating_mode
+	 or
+		echo "C" > operating_mode
+
+	To change mode to one shot mode, say
+		echo "o" > operating_mode
+	or
+		echo "O" > operating_mode
+
+/sys/bus/iio/devices/iio:device0/continuous_oversampling_ratio:
+	Oversampling ratio (number of sample used for average) when device
+	is in continuous mode.
+	The possible values for number of average samples are:
+		1, 4, 16, 64, 128, 256, 512, 1024
+
+/sys/bus/iio/devices/iio:device0/continuous_vbus_conv_time:
+	ADC conversion time for voltage bus in continuous mode.
+	This is in microseconds.
+	The possible value for conversion times are:
+		140, 204, 332, 588, 1100, 2116, 4156, 8244
+
+/sys/bus/iio/devices/iio:device0/continuous_vshunt_conv_time:
+	ADC conversion time for shunt voltage in continuous mode.
+	This is in microseconds.
+	The possible value for conversion times are:
+		140, 204, 332, 588, 1100, 2116, 4156, 8244
+
+/sys/bus/iio/devices/iio:device0/oneshot_oversampling_ratio:
+	Oversampling ratio (number of sample used for average) when device
+	is in one-shot mode.
+	The possible values for number of average samples are:
+		1, 4, 16, 64, 128, 256, 512, 1024
+
+/sys/bus/iio/devices/iio:device0/oneshot_vbus_conv_time:
+	ADC conversion time for voltage bus in one-shot mode.
+	This is in microseconds.
+	The possible value for conversion times are:
+		140, 204, 332, 588, 1100, 2116, 4156, 8244
+
+/sys/bus/iio/devices/iio:device0/oneshot_vshunt_conv_time
+	ADC conversion time for shunt voltage in one-shot mode.
+	This is in microseconds.
+	The possible value for conversion times are:
+		140, 204, 332, 588, 1100, 2116, 4156, 8244
+
+/sys/bus/iio/devices/iio:device0/rail_name_<x>
+	The rail name of each channels.
+
+/sys/bus/iio/devices/iio:device0/in_voltage<x>_input:
+	The voltage bus voltage measured by device. This is processed
+	data in microvolts.
+
+/sys/bus/iio/devices/iio:device0/in_current<x>_input:
+	The current flow in the bus in microamps.
+
+/sys/bus/iio/devices/iio:device0/in_power<x>_input:
+	The input power in the bus for each channel in micro-watt.
+
+/sys/bus/iio/devices/iio:device0/in_current<x>_critical_input:
+	The critical current threshold on bus to generate critical
+	alert signal for each channel. This is provide in micro-amps.
+	The value can be override from sysfs for new critical current.
+
+/sys/bus/iio/devices/iio:device0/in_current<x>_warning_input:
+	The warning current threshold on bus to generate warning
+	alert signal for each channel. This is provide in micro-amps.
+	The value can be override from sysfs for new warning threshold.
+
-- 
2.1.4

  parent reply	other threads:[~2016-06-01 12:34 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-01 12:34 [PATCH 1/3] iio: adc: ina3221: Add DT binding details Laxman Dewangan
2016-06-01 12:34 ` [PATCH 2/3] iio: adc: ina3221: Add support for IIO ADC driver for TI INA3221 Laxman Dewangan
2016-06-03 10:06   ` Jonathan Cameron
2016-06-03 10:16     ` Jonathan Cameron
2016-06-03 11:31       ` Laxman Dewangan
     [not found]         ` <57516A74.4060008-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-06-03 12:04           ` Jonathan Cameron
     [not found]             ` <42c00dfb-bb45-405c-a1d2-516ece137826-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-06-03 12:03               ` Laxman Dewangan
     [not found]     ` <44e28639-67b6-7586-5e6d-c0180ccded79-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-06-03 11:26       ` Laxman Dewangan
2016-06-03 12:09         ` Jonathan Cameron
2016-06-03 12:17           ` Laxman Dewangan
2016-06-03 13:29     ` Guenter Roeck
2016-06-03 14:14       ` Laxman Dewangan
2016-06-03 15:17         ` Andrew F. Davis
2016-06-07 22:30           ` Guenter Roeck
2016-06-08 15:04             ` Andrew F. Davis
2016-06-08 15:37               ` Laxman Dewangan
2016-06-01 12:34 ` Laxman Dewangan [this message]
2016-06-03 10:26   ` [PATCH 3/3] iio: adc: ina3221: Add sysfs details " Jonathan Cameron
     [not found] ` <1464784454-7988-1-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-06-03  2:07   ` [PATCH 1/3] iio: adc: ina3221: Add DT binding details Rob Herring
2016-06-03  9:02     ` Laxman Dewangan
2016-06-03 10:19     ` Jonathan Cameron
2016-06-03 11:48       ` Laxman Dewangan
2016-06-03 12:11         ` Jonathan Cameron
2016-06-03 12:21           ` Laxman Dewangan

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=1464784454-7988-3-git-send-email-ldewangan@nvidia.com \
    --to=ldewangan@nvidia.com \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@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).