From: Guenter Roeck <linux@roeck-us.net>
To: Jean Delvare <khali@linux-fr.org>
Cc: Anthony Olech <anthony.olech.opensource@diasemi.com>,
lm-sensors@lm-sensors.org, Anton Vorontsov <anton@enomsg.org>,
David Woodhouse <dwmw2@infradead.org>,
linux-kernel@vger.kernel.org,
David Dajun Chen <david.chen@diasemi.com>
Subject: Re: [lm-sensors] [PATCH V1] fix adc to voltage calculation in da9052 power driver
Date: Thu, 19 Dec 2013 10:10:49 -0800 [thread overview]
Message-ID: <20131219181049.GA6854@roeck-us.net> (raw)
In-Reply-To: <20131219155454.40100f4d@endymion.delvare>
On Thu, Dec 19, 2013 at 03:54:54PM +0100, Jean Delvare wrote:
> Hi Anthony,
>
[ ... ]
>
> BTW, you (and we) probably shouldn't waste too much energy on this.
> ADCs are only accurate to some degree anyway. If you take the
> components connected to the input into consideration, the accuracy gets
> even worse. For example, if the input voltage must be scaled down to
> fit in the ADC's range, you need at least one resistor, which in best
> cases will have a 1% accurate value (known as tolerance.) That's ten
> times the LSB of your 10-bit ADC, at which point / 1023 or / 1024
> really makes no practical difference. Sub-percent tolerant resistors are
> expensive and rare in consumer electronics in my experience.
>
True, but on the other side (and after looking into the datasheet)
the driver already calculated the voltage on adc4..6 correctly,
so unless you disagree I would like to apply the hwmon patch to -next
for consistency.
Thanks,
Guenter
next prev parent reply other threads:[~2013-12-19 18:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-18 15:21 [PATCH V1] fix adc to voltage calculation in da9052 power driver Anthony Olech
2013-12-18 15:32 ` [lm-sensors] " Jean Delvare
2013-12-18 15:45 ` Opensource [Anthony Olech]
2013-12-18 17:24 ` Guenter Roeck
2013-12-19 14:13 ` Opensource [Anthony Olech]
2013-12-19 14:54 ` Jean Delvare
2013-12-19 18:10 ` Guenter Roeck [this message]
2013-12-19 18:15 ` Opensource [Anthony Olech]
2013-12-21 17:30 ` Jean Delvare
2013-12-21 17:53 ` Guenter Roeck
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=20131219181049.GA6854@roeck-us.net \
--to=linux@roeck-us.net \
--cc=anthony.olech.opensource@diasemi.com \
--cc=anton@enomsg.org \
--cc=david.chen@diasemi.com \
--cc=dwmw2@infradead.org \
--cc=khali@linux-fr.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lm-sensors@lm-sensors.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