public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: "Kim, Milo" <Milo.Kim@ti.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
	"jic23@cam.ac.uk" <jic23@cam.ac.uk>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Subject: Re: [PATCH 1/3] iio: add iio_read_channel_offset() consumer api
Date: Thu, 16 Aug 2012 10:19:11 +0200	[thread overview]
Message-ID: <502CACFF.3000105@metafoo.de> (raw)
In-Reply-To: <A874F61F95741C4A9BA573A70FE3998F41EEFD6E@DQHE02.ent.ti.com>

On 08/16/2012 09:39 AM, Kim, Milo wrote:
> This allows the iio consumer to get the offset of the channel.
> The value of offset can be used when calculating the result such
> as 'result = raw * scale + offset'.

result = (raw + offset) * scale

Otherwise it looks good, except for:

> +/**
> + * iio_read_channel_offset() - read offset from a given channel
> + * @channel:		The channel being queried.
> + * @val:		Offset Value read back.
> + *
> + * Note offset can be used in the consumer when calculating the result
> + * such as 'result = raw * scale + offset'.
> + */

The documentation should go in the c file.

> +int iio_read_channel_offset(struct iio_channel *chan, int *val);
>  #endif


  parent reply	other threads:[~2012-08-16  8:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-16  7:39 [PATCH 1/3] iio: add iio_read_channel_offset() consumer api Kim, Milo
2012-08-16  7:42 ` Peter Meerwald
2012-08-16  7:49   ` Kim, Milo
2012-08-16 18:56     ` Jonathan Cameron
2012-08-16  8:19 ` Lars-Peter Clausen [this message]
2012-08-16  8:25   ` Lars-Peter Clausen
2012-08-16  8:32   ` Jonathan Cameron

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=502CACFF.3000105@metafoo.de \
    --to=lars@metafoo.de \
    --cc=Milo.Kim@ti.com \
    --cc=jic23@cam.ac.uk \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.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