Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@cam.ac.uk>
To: michael.hennerich@analog.com
Cc: "linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	"device-drivers-devel@blackfin.uclinux.org"
	<device-drivers-devel@blackfin.uclinux.org>,
	Drivers <Drivers@analog.com>
Subject: Re: [PATCH 2/2] iio: adc: New driver for AD7280A Lithium Ion Battery Monitoring System
Date: Mon, 18 Jul 2011 14:41:54 +0100	[thread overview]
Message-ID: <4E243822.6020204@cam.ac.uk> (raw)
In-Reply-To: <4E2436E0.9060501@analog.com>


>>>>> +
>>>>> +static int ad7280_read_raw(struct iio_dev *dev_info,
>>>>> +                        struct iio_chan_spec const *chan,
>>>>> +                        int *val,
>>>>> +                        int *val2,
>>>>> +                        long m)
>>>>> +{
>>>>> +     struct ad7280_state *st = iio_priv(dev_info);
>>>>> +     unsigned int scale_uv;
>>>>> +     int ret;
>>>>> +
>>>>> +     switch (m) {
>>>>> +     case 0:
>>>>> +             mutex_lock(&dev_info->mlock);
>>>>> +             switch (chan->type) {
>>>>> +             case IIO_IN:
>>>>> +                     ret = ad7280_read_channel(st, chan->address>>   8,
>>>>> +                                               chan->address&   0xFF);
>>>>> +                     break;
>>>>> +             case IIO_IN_DIFF:
>>>>> +                     ret = ad7280_read_all_channels(st, st->scan_cnt, NULL);
>>>> Err... Really need some explanation for what this channel is!
>>> Voltage across all cells.
>> Fair enough. So are the other voltages not differential as well? (across a given
>> cell rather than referred to a base voltage)
>> ...
> Yes technically seen they are all differential.
> 
Any cost in setting them up as such then?

in1-in0
in2-in1 etc
+
inX-in0 for your summed one?


  reply	other threads:[~2011-07-18 13:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-15 12:59 [PATCH 1/2] iio: core: deconstify members of struct iio_chan_spec michael.hennerich
2011-07-15 12:59 ` [PATCH 2/2] iio: adc: New driver for AD7280A Lithium Ion Battery Monitoring System michael.hennerich
2011-07-18 11:43   ` Jonathan Cameron
2011-07-18 12:48     ` Michael Hennerich
2011-07-18 12:56       ` Jonathan Cameron
2011-07-18 13:36         ` Michael Hennerich
2011-07-18 13:41           ` Jonathan Cameron [this message]
2011-07-18 13:47             ` Michael Hennerich
2011-07-18 15:06           ` Michael Hennerich
2011-07-18 15:12             ` Jonathan Cameron
2011-07-15 13:19 ` [PATCH 1/2] iio: core: deconstify members of struct iio_chan_spec Jonathan Cameron
  -- strict thread matches above, loose matches on Subject: below --
2011-07-20 13:03 michael.hennerich
2011-07-20 13:03 ` [PATCH 2/2] iio: adc: New driver for AD7280A Lithium Ion Battery Monitoring System michael.hennerich
2011-07-20 13:03 ` 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=4E243822.6020204@cam.ac.uk \
    --to=jic23@cam.ac.uk \
    --cc=Drivers@analog.com \
    --cc=device-drivers-devel@blackfin.uclinux.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=michael.hennerich@analog.com \
    /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