On 13/12/12 08:57, Jonathan Cameron wrote:
On 13/12/12 08:48, Jonathan Cameron wrote:
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 :)
Ah, the lsm333 has magnetometer and accelerometer together. In that
case though they go through the same datapath (fifo etc) I think
so you want a single hybrid device.
To continue the conversation with myself.
I did misread the datasheet. The magnetometer has its' own data rate
and as far as I can see doesn't have a fifo. Hence you will need two
struct iio_dev's to allow for separate triggers etc.
It will be a little fiddly but can certainly be done.
Good luck and feel free to tell your hardware designers that I think
they are nuts and out to just make your life tricky!
That datasheet is a little 'interesting' currently so I may well
be misreading it baddly ;)
--
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