From: Guenter Roeck <linux@roeck-us.net>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH v2] hwmon: ntc: use iio_read_channel_processed if possible
Date: Fri, 29 May 2015 23:36:09 +0000 [thread overview]
Message-ID: <5568F7E9.1090705@roeck-us.net> (raw)
In-Reply-To: <1432821471-17373-1-git-send-email-chris.lesiak@licor.com>
On 05/29/2015 04:12 PM, Chris Lesiak wrote:
> On 05/29/2015 05:47 PM, Guenter Roeck wrote:
>> On 05/28/2015 06:57 AM, Chris Lesiak wrote:
>>> The function ntc_adc_iio_read (now ntc_adc_iio_read_raw) assumes
>>> both a 12 bit ADC and that pullup_uv is the same as the ADC reference
>>> voltage. If either assumption is false, then the result is incorrect.
>>>
>>> For iio channels supporting either IIO_CHAN_INFO_PROCESSED or
>>> IIO_CHAN_INFO_SCALE, the new ntc_adc_iio_read will be used. It gets
>>> microvolts directly with a call to iio_read_channel_processed.
>>>
>>> Signed-off-by: Chris Lesiak <chris.lesiak@licor.com>
>>
>> Looks ok to me. Applied to -next.
>>
>> Thanks,
>> Guenter
>>
>
> Guenter,
>
> I am sorry to say that I must ask you to please revert that patch.
>
> I had a mistaken belief that iio_read_channel_processed returned microvolts directly. But the standard voltage unit for the iio subsystem is in fact millivolts, just as in the hwmon subsystem. I was confused by a broken iio adc driver that in fact did scale results to microvolts. The combination resulted in tests that pased when they shouldn't have.
>
> Early next week I hope to submit a new patch that uses iio_read_channel_raw and converts the result to microvolts with iio_convert_raw_to_processed. That allows an additional scale actor of 1000.
>
> Thank you for your time and patience reviewing these patches.
>
No problem. I had not pushed the patch yet, so no harm done.
Guenter
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
prev parent reply other threads:[~2015-05-29 23:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-28 13:57 [lm-sensors] [PATCH v2] hwmon: ntc: use iio_read_channel_processed if possible Chris Lesiak
2015-05-29 22:47 ` Guenter Roeck
2015-05-29 23:12 ` Chris Lesiak
2015-05-29 23:36 ` Guenter Roeck [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=5568F7E9.1090705@roeck-us.net \
--to=linux@roeck-us.net \
--cc=lm-sensors@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.