linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@jic23.retrosnub.co.uk>
To: Mathieu Othacehe <m.othacehe@gmail.com>
Cc: linux-iio@vger.kernel.org
Subject: Re: isl29501 and multiple calibration registers
Date: Sun, 27 May 2018 09:59:07 +0100	[thread overview]
Message-ID: <20180527095907.5aa173b0@archlinux> (raw)
In-Reply-To: <87a7snd8r7.fsf@gmail.com>

On Fri, 25 May 2018 18:01:48 +0200
Mathieu Othacehe <m.othacehe@gmail.com> wrote:

> Hello,
> 
> I'm currently working on a driver for the ISL29501 Time of Flight
> sensor[1] that I hope to publish soon. This sensor has many calibration
> and corrections registers (crosstalk_i, crosstalk_q, crosstalk_gain,
> phase_temp_correction ...).
> 
> I would like to make all those registers accessible from userspace but
> iio_chan_info_enum has no matching elements for most of those registers
> which are very specific to this sensor.
> 
> Any idea how could I proceed to make those registers accessible?

First game is to try and match up with existing ABI defined for similar
parts.  If that fails, it's worth thinking about whether any of them are
likely to apply to a reasonably large number of parts in the near future.
There are always chip specific values though so somethings just need
a custom interface.   The key thing to remember is that they will effectively
not exist for generic userspace code.

Anyhow, you can either implement them as sysfs attributes, or take the
preferred route of iio_chan_spec_ext_info as that allows in kernel users
to access them rather than just userspace.

The challenge is really to work out how to fit these device specific
variables into the overall 'framework' of the ABI that is already defined.
The first step is often ABI definition document for
Documentation/ABI/testing/sysfs-bus-iio-isl29501 as it can be easier
to talk about an ABI doc than work it out from the code.

Thanks,

Jonathan
> 
> Thanks in advance,
> 
> Mathieu
> 
> [1]: https://www.intersil.com/content/dam/intersil/documents/isl2/isl29501.pdf
> --
> 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


  reply	other threads:[~2018-05-27  8:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-25 16:01 isl29501 and multiple calibration registers Mathieu Othacehe
2018-05-27  8:59 ` Jonathan Cameron [this message]
2018-05-28 15:38   ` Mathieu Othacehe
2018-06-03 14:38     ` Jonathan Cameron
2018-06-05 10:18       ` Mathieu Othacehe
2018-06-10 13:29         ` Jonathan Cameron
2018-06-11 14:57           ` Mathieu Othacehe
2018-06-15 12:34             ` Mathieu Othacehe
2018-06-16 17:46               ` Mostly question of whether we should support floating point values from hardware (was Re: isl29501 and multiple calibration registers) Jonathan Cameron
2018-06-27 13:43                 ` Mathieu Othacehe
2018-06-30 17:55                   ` Jonathan Cameron
2018-06-16 17:13             ` isl29501 and multiple calibration registers Jonathan Cameron
2018-06-19 10:24               ` Mathieu Othacehe

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=20180527095907.5aa173b0@archlinux \
    --to=jic23@jic23.retrosnub.co.uk \
    --cc=linux-iio@vger.kernel.org \
    --cc=m.othacehe@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).