All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@cam.ac.uk>
To: "linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Subject: RFC How to handle device with different _scale values depending on how you access them.
Date: Sat, 09 Apr 2011 19:23:28 +0100	[thread overview]
Message-ID: <4DA0A420.8060302@cam.ac.uk> (raw)

Dear All,

I'm messing with my favourite 'special' device, the sca3000.

It has a hardware ring buffer and direct read abilities.

Direct reads of current value are 13bit signed, the buffer
is either 11 bit or 8 bit.

So ultimately the scale on the buffer can change which is
nasty enough, however direct reads are 13bits whatever
the buffer is set to.

Hence we need to export two scale's at a time.

Would anyone mind if I add the option to have both

/device0/accel_scale (applies to _raw files in the same dir).
and
/device0/device0:buffer0/accel_scale (or maybe put it
in the 'scan_elements' directory?

This means we will have to define a precedence for these
attributes when reading from buffers which isn't nice, but
such is life...

Jonathan

             reply	other threads:[~2011-04-09 18:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-09 18:23 Jonathan Cameron [this message]
2011-04-11 14:55 ` RFC How to handle device with different _scale values depending on how you access them Hennerich, Michael

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=4DA0A420.8060302@cam.ac.uk \
    --to=jic23@cam.ac.uk \
    --cc=linux-iio@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.