From: Jonathan Cameron <jic23@jic23.retrosnub.co.uk>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: "Kim, Milo" <Milo.Kim@ti.com>,
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 09:32:49 +0100 [thread overview]
Message-ID: <502CB031.3040808@jic23.retrosnub.co.uk> (raw)
In-Reply-To: <502CACFF.3000105@metafoo.de>
On 16/08/12 09:19, 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.
I've often wondered about this myself. Looking quickly about it does
appear that it is more popular to do it in c file... Guess I've been wrong
for quite some time. For now it's probably better to keep this docs
in the header and do the move all in one go given all the other docs
are here in this header.
I can see the arguments either way, but have not as yet seen anyone
stamp their foot on what is the 'one true way'.
>
>> +int iio_read_channel_offset(struct iio_channel *chan, int *val);
>> #endif
prev parent reply other threads:[~2012-08-16 9:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-16 7:39 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
2012-08-16 8:32 ` Jonathan Cameron [this message]
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=502CB031.3040808@jic23.retrosnub.co.uk \
--to=jic23@jic23.retrosnub.co.uk \
--cc=Milo.Kim@ti.com \
--cc=jic23@cam.ac.uk \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--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
all inboxes | Powered by JetHome®