Linux IIO development
 help / color / mirror / Atom feed
* [PATCH 0/2] IIO version of INA2xx (followup of related RFC)
@ 2015-11-25 11:28 Marc Titinger
  2015-11-25 11:28 ` [PATCH 1/2] iio: ina2xx: add support for TI INA2xx Power Monitors Marc Titinger
  2015-11-25 11:28 ` [PATCH 2/2] iio: ina2xx: provide a sysfs parameter to allow async readout of the ADCs Marc Titinger
  0 siblings, 2 replies; 10+ messages in thread
From: Marc Titinger @ 2015-11-25 11:28 UTC (permalink / raw)
  To: jic23, knaack.h, lars, pmeerw, linux, jdelvare
  Cc: linux-iio, linux-kernel, lm-sensors, Marc Titinger

following RFC started in https://lkml.org/lkml/2015/11/10/370
and feed back from https://lkml.org/lkml/2015/11/18/395

 * squash to a single patch that provides DIRECT and SOFTWARE buffer mode.

 * implement INFO_INT_TIME abi for each adc in order to better match how
   the chip works.  This also allows to compute the actual sample freq
   for INFO_SAMP_FREQ, that results from both the averaging ratio and the
   possible integration times.

 * Add an INT_TIME setting for each voltage ADC (default values are compa
   -tible for previous implementations).

 * provide the averaging feature of the chip using the OVERSAMPLING_RATIO
   abi.

 * by default, only issue a new sample value in the buffer when the
   Conversion Ready Flag indicates that a new value is available. The
   capture thread polls slightly faster than the chip-internal sampling
   clock to prevent re-read or skipping of samples.

 * Since this check for CVRF has its cost (i2c xfer), allow for a relaxed
   mode for when re-read or skipping or one sample is not big deal, but
   a faster sampling rate is wanted.

 * remove the calibration INFO, since the driver sets a hardcoded value
   for 'Current_LSB', only RShunt is available as a parameter. No use to
   expose the register to the user.

Why two drivers (hwmon and IIO) for this device ?
------------------------------------------------

 * Hwmon and IIO do not address exactly the same use-cases, while this chip
   can (and is) being used either as a power monitoring feature of a host
   device or as sensor to measure power properties of a target DUT.

 * In the second use-case (probing a DUT) we wish to plot measurements
   over time, display transients, peak values, compute derived metrics
   (like energy). A buffer streaming scheme and remote capabilities
   with libiio seems beneficial.


Marc Titinger (1):
  iio: ina2xx: add support for TI INA2xx Power Monitors
  iio: ina2xx: provide a sysfs parameter to allow async readout of the
    ADCs

 drivers/iio/adc/Kconfig      |  10 +
 drivers/iio/adc/Makefile     |   1 +
 drivers/iio/adc/ina2xx-iio.c | 720 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 731 insertions(+)
 create mode 100644 drivers/iio/adc/ina2xx-iio.c

-- 
1.9.1


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

end of thread, other threads:[~2015-12-01 15:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-25 11:28 [PATCH 0/2] IIO version of INA2xx (followup of related RFC) Marc Titinger
2015-11-25 11:28 ` [PATCH 1/2] iio: ina2xx: add support for TI INA2xx Power Monitors Marc Titinger
2015-11-25 12:20   ` Peter Meerwald-Stadler
2015-11-26  9:00     ` Marc Titinger
2015-11-29 16:31   ` Jonathan Cameron
2015-11-29 17:38     ` Guenter Roeck
2015-12-01 10:01       ` Marc Titinger
2015-12-01 15:02         ` Guenter Roeck
2015-11-25 11:28 ` [PATCH 2/2] iio: ina2xx: provide a sysfs parameter to allow async readout of the ADCs Marc Titinger
2015-11-29 16:33   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox