Re: isl29501 and multiple calibration registers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 25 May 2018 18:01:48 +0200
Mathieu Othacehe <m.othacehe@xxxxxxxxx> 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@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux