public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marc Titinger <mtitinger@baylibre.com>
To: Jonathan Cameron <jic23@kernel.org>,
	knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net
Cc: daniel.baluta@intel.com, linux-kernel@vger.kernel.org,
	linux-iio@vger.kernel.org
Subject: Re: [RFC 6/9] iio: ina2xx: add direct IO support for TI INA2xx Power Monitors
Date: Mon, 23 Nov 2015 17:15:10 +0100	[thread overview]
Message-ID: <56533B8E.6050905@baylibre.com> (raw)
In-Reply-To: <5650B42D.6040500@kernel.org>

On 21/11/2015 19:13, Jonathan Cameron wrote:
> On 18/11/15 14:38, Marc Titinger wrote:
>> Basic support or direct IO raw read, with averaging attribute.
>> Values are RAW, INT_PLUS_MICRO (Volt/Ampere/Watt).
>>
>> Output of iio_info:
>>
>>       iio:device0: ina226
>>        4 channels found:
>>          power3:  (input)
>>          1 channel-specific attributes found:
>>                  attr 0: raw value: 1.150000
>>          voltage0:  (input)
>>          1 channel-specific attributes found:
>>                  attr 0: raw value: 0.000003
>>          voltage1:  (input)
>>          1 channel-specific attributes found:
>>                  attr 0: raw value: 4.277500
>>          current2:  (input)
>>          1 channel-specific attributes found:
>>                  attr 0: raw value: 0.268000
>>          4 device-specific attributes found:
>>                  attr 0: sampling_frequency_available value: 61 120 236...
>>                  attr 1: in_averaging_steps value: 4
>>                  attr 2: in_calibscale value: 10000
>>                  attr 3: in_sampling_frequency value: 1506
>>
>> Tested with ina226, on BeagleBoneBlack.
>>
>> Datasheet: http://www.ti.com/lit/gpn/ina226
>>
>> Signed-off-by: Marc Titinger <mtitinger@baylibre.com>
> You have added some new ABI in here, but I'm not seeing any documentation
> for averaging_steps.  Does this map onto the existing oversampling_ratio?
>

I am not sure normal averaging maps well with oversampling. Normal 
averaging will provide one value every N samples (this is what this chip 
does), while oversampling will interpolate N value between sample 'k' 
and 'k-1', and decimate to provide a less-noisy version of sample 'k', 
the resulting sampling frequency is not lower.




  reply	other threads:[~2015-11-23 16:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-18 14:38 [RFC 0/9] spawn hrtimer trigger from client driver upon enabling buffer Marc Titinger
2015-11-18 14:38 ` [RFC 1/9] configfs: Allow dynamic group creation Marc Titinger
2015-11-18 14:38 ` [RFC 2/9] iio: core: Introduce IIO configfs support Marc Titinger
2015-11-18 14:38 ` [RFC 3/9] iio: core: Introduce IIO software triggers Marc Titinger
2015-11-18 14:38 ` [RFC 4/9] iio: trigger: Introduce IIO hrtimer based trigger Marc Titinger
2015-11-18 14:38 ` [RFC 5/9] iio: Documentation: Add IIO configfs documentation Marc Titinger
2015-11-18 15:38   ` Crt Mori
2015-11-18 16:06     ` Marc Titinger
2015-11-18 16:15       ` Daniel Baluta
2015-11-18 17:32         ` Jonathan Cameron
2015-11-18 14:38 ` [RFC 6/9] iio: ina2xx: add direct IO support for TI INA2xx Power Monitors Marc Titinger
2015-11-21 18:13   ` Jonathan Cameron
2015-11-23 16:15     ` Marc Titinger [this message]
2015-11-29 15:17       ` Jonathan Cameron
2015-11-18 14:38 ` [RFC 7/9] iio: ina2xx: add triggered buffer Marc Titinger
2015-11-18 14:38 ` [RFC 8/9] iio: buffer: allow for last-second trigger spawning from device driver Marc Titinger
2015-11-18 18:55   ` Jonathan Cameron
2015-11-19  9:15     ` Marc Titinger
2015-11-21 18:18       ` Jonathan Cameron
2015-11-18 14:38 ` [RFC 9/9] iio: (RFC) illustrate creation/destruction of hrtimer trigger upon buffer enable Marc Titinger

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=56533B8E.6050905@baylibre.com \
    --to=mtitinger@baylibre.com \
    --cc=daniel.baluta@intel.com \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /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