linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: jacopo <jacopo@jmondi.org>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Jacopo Mondi <jacopo+renesas@jmondi.org>,
	geert@linux-m68k.org, wsa+renesas@sang-engineering.com,
	lars@metafoo.de, linux-iio@vger.kernel.org
Subject: Re: [PATCH v3 3/4] iio: adc: Add Maxim max9611 ADC driver
Date: Sun, 26 Mar 2017 12:50:32 +0200	[thread overview]
Message-ID: <20170326105032.GG5981@w540> (raw)
In-Reply-To: <512601ce-ef2d-c249-6e59-0bf489145a64@kernel.org>

Hi Jonathan,

[snip]

On Sun, Mar 26, 2017 at 11:24:54AM +0100, Jonathan Cameron wrote:
> >>>> +static struct iio_chan_spec max9611_channels[] = {
> >>
> >> const
> >>
> >>>> +	{
> >>>> +	  .type			= IIO_TEMP,
> >>>> +	  .info_mask_separate	= BIT(IIO_CHAN_INFO_RAW) |
> >>>> +				  BIT(IIO_CHAN_INFO_SCALE),
> >>>> +	  .address		= MAX9611_CHAN_TEMPERATURE,
> >>>> +	},
> >>>> +	{
> >>>> +	  .type			= IIO_VOLTAGE,
> >>>> +	  .info_mask_separate	= BIT(IIO_CHAN_INFO_RAW)   |
> >>>> +				  BIT(IIO_CHAN_INFO_SCALE) |
> >>>> +				  BIT(IIO_CHAN_INFO_OFFSET),
> >>>> +	  .address		= MAX9611_CHAN_VOLTAGE_INPUT,
> >>>> +	  .indexed		= 1,
> >>>> +	  .channel		= 1,
> >>
> >> why is this indexed?
> >> should be the only raw voltage channel
> >>
> >>
> >>>> +	},
> >>>> +	{
> >>>> +	  .type			= IIO_VOLTAGE,
> >>>> +	  .info_mask_separate	= BIT(IIO_CHAN_INFO_PROCESSED),
> >>>> +	  .address		= MAX9611_CHAN_VOLTAGE_SENSE,
> >>>> +	  .indexed		= 1,
> >>>> +	  .channel		= 0,
> >>> Unusual to have the channels in here other than in channel order...
> >>
> >> why is this indexed?
> >> should be the only processed voltage channel
> >>
> > 
> > Jonathan already replied on this, but I would add that with no
> > indexing this would appear in userspace as:
> > 
> > in_voltage_raw
> > in_voltage_scale
> > in_voltage_offset
> > in_offset_processed
> > 
> > which is confusing at best.
> I hope that last one is in_voltage_processed!

Sure it is, I just confused channel name and mask name when writing it
down here :)


  reply	other threads:[~2017-03-26 10:50 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-24 15:28 [PATCH v3 0/4] iio: adc: Maxim max9611 driver Jacopo Mondi
2017-03-24 15:28 ` [PATCH v3 1/4] Documentation: dt-bindings: iio: Add max9611 ADC Jacopo Mondi
2017-03-25 15:27   ` Jonathan Cameron
2017-03-24 15:28 ` [PATCH v3 2/4] iio: Documentation: Add max9611 sysfs documentation Jacopo Mondi
2017-03-25 16:32   ` Jonathan Cameron
2017-03-26  8:38   ` Geert Uytterhoeven
2017-03-24 15:28 ` [PATCH v3 3/4] iio: adc: Add Maxim max9611 ADC driver Jacopo Mondi
2017-03-25 15:45   ` Jonathan Cameron
2017-03-25 16:13     ` Peter Meerwald-Stadler
2017-03-25 16:34       ` Jonathan Cameron
2017-03-26 10:08       ` jacopo
2017-03-26 10:24         ` Jonathan Cameron
2017-03-26 10:50           ` jacopo [this message]
2017-03-27  8:30       ` jacopo
2017-03-25 17:21     ` jacopo
2017-03-25 17:37       ` Jonathan Cameron
2017-03-26 10:02         ` jacopo
2017-03-26 10:23           ` Jonathan Cameron
2017-03-24 15:28 ` [PATCH v3 4/4] arm64: dts: salvator-x: Add current sense amplifiers Jacopo Mondi
2017-03-26  8:49   ` Geert Uytterhoeven
2017-03-26  9:07 ` [PATCH v3 0/4] iio: adc: Maxim max9611 driver Geert Uytterhoeven
2017-03-26  9:18   ` Jonathan Cameron
2017-03-27  8:53 ` Geert Uytterhoeven

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=20170326105032.GG5981@w540 \
    --to=jacopo@jmondi.org \
    --cc=geert@linux-m68k.org \
    --cc=jacopo+renesas@jmondi.org \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    --cc=wsa+renesas@sang-engineering.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;
as well as URLs for NNTP newsgroup(s).