Re: question about driver for different sensors in the same ASIC

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

 



On 13/12/12 08:28, Jonathan Cameron wrote:
On 12/12/12 20:23, Lars-Peter Clausen wrote:
On 12/12/2012 08:49 PM, Denis Ciocca wrote:
Usually you'd want to be able to sample both the accelerometer and gyro
sensors
at the same time, so just one driver should be fine.

Or have the gyro and accelerometer sensors completely separated
register
maps
and don't share any functionality?

Some sensors doesn't share any functionality, simply share the same
interface or better the control registers for single sensor are
separated.
I test this with the current driver but the second proble doesn't start!
Only one probe is mandatory?

You can only have one device per I2C address and only one probe call per
device. If you really want to use two separated drivers you could
create a mfd
device and one subdevice for the gyro and accelerometer.

- Lars
Agreed, not much else you can do other than refactor the driver to
handle them as two 'instances' of the iio bits called from a single
probe function with callbacks to make the shared i2c element work
reasonably...  Fiddly, but its got to be that or a fall blown mfd
(not sure if the mfd side of things will bring enough benefits here...)

Just to give us some real basis for this discussion, which part number is it that does this? The only ones I can immediately find (lsm330)
use different i2c addresses for the two parts.

Obviously if we are discussing a part for which docs are not available,
we'll be pestering you for more information as we can't get it from
the datasheet :)
--
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