All of lore.kernel.org
 help / color / mirror / Atom feed
From: lars@metafoo.de (Lars-Peter Clausen)
To: linux-arm-kernel@lists.infradead.org
Subject: XADC
Date: Wed, 04 Jun 2014 09:27:05 +0200	[thread overview]
Message-ID: <538ECA49.8030207@metafoo.de> (raw)
In-Reply-To: <alpine.DEB.2.01.1406040843120.32323@pmeerw.net>

On 06/04/2014 08:47 AM, Peter Meerwald wrote:
> Hello,
>
>> I recently found that you developed a driver for XADC and I thought I
>> enable it (see patch below). But it seems something is not working
>> correctly. The values I tested don't seem to be right and also fixed.
>> I.e. they don't change over time or across boards:
>>
>>    # cat in_temp0_scale
>>    123.040771484
>>    # cat in_voltage0_vccint_scale
>>    0.732421875
>>    # cat in_voltage0_vccint_raw
>>    1384
>>    # cat in_voltage1_vccaux_s[ 1203.660637] random: nonblocking pool is initialized
>>    # cat in_voltage1_vccaux_scale
>>    0.732421875
>>    # cat in_voltage3_vccpint_scale
>>    0.732421875
>
> the _scale values are supposed to be constant; their purpose is to scale a
> measurement so that the result is in a given unit
>
> e.g. in_temp0_scale scales in_temp0_raw so that the result
> (in_temp0_raw * in_temp0_scale) in milli Celsius
>
> in_voltage0_vccint_raw * in_voltage0_vccint_scale is supposed to give
> milli Volts
>
> so in_voltage0_vccint_raw should vary accross time / boards (and voltage
> hopefully :), but not the _scales

Yep, as Peter said scale and offset will be constant, raw should change 
though, e.g. both voltage and temperature should a slight jitter if you 
repeatedly read them. If not something is broken. We had the driver in our 
images for Zynq board for a while now and so far it worked fine. I think 
Mrinal and Radhey from Xilinx also tested the driver.

- Lars

  reply	other threads:[~2014-06-04  7:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-04  0:53 XADC Sören Brinkmann
2014-06-04  6:47 ` XADC Peter Meerwald
2014-06-04  7:27   ` Lars-Peter Clausen [this message]
2014-06-04 14:27     ` XADC Sören Brinkmann
2014-06-05  8:26       ` XADC Lars-Peter Clausen
2014-06-05 15:48         ` XADC Sören Brinkmann

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=538ECA49.8030207@metafoo.de \
    --to=lars@metafoo.de \
    --cc=linux-arm-kernel@lists.infradead.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.