lkml.org 
[lkml]   [2012]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] iio: add iio_read_channel_offset() consumer api
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



\
 
 \ /
  Last update: 2012-08-16 11:22    [W:0.126 / U:0.628 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site