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:25:24 +0200 [thread overview]
Message-ID: <502CAE74.7060808@metafoo.de> (raw)
In-Reply-To: <502CACFF.3000105@metafoo.de>
On 08/16/2012 10:19 AM, Lars-Peter Clausen wrote:
> 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.
Just saw that for the other functions in consumer.h it is in the header as
well, so ignore that comment above.
>
>> +int iio_read_channel_offset(struct iio_channel *chan, int *val);
>> #endif
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-08-16 8:25 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
2012-08-16 8:25 ` Lars-Peter Clausen [this message]
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=502CAE74.7060808@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