RE: Advice needed on combination sensor driver implementation

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

 



Hello Jonathan,

Thank you for your suggestion. As per your suggestion I am going to start in a directory called drivers/iio/combinated or combo. If in later stages it is decided to include all the integrated multiple sensors into one folder, this folder could be used.

Thanks & Regards,
Utkarsh Gupta – B45806
Software Apps Engineer
Freescale Semiconductors

-----Original Message-----
From: jic23@xxxxxxxxxxxxxxxxxxxxx [mailto:jic23@xxxxxxxxxxxxxxxxxxxxx] 
Sent: Thursday, April 16, 2015 6:51 AM
To: Gupta Utkarsh-B45806
Cc: linux-iio@xxxxxxxxxxxxxxx; Estevam Fabio-R49496; Jonathan Cameron; Hartmut Knaack; Lars-Peter Clausen; Peter Meerwald
Subject: Re: Advice needed on combination sensor driver implementation

utkarsh.gupta@xxxxxxxxxxxxx writes: 

> Hello,
> 
> I am looking at implementing FXOS8700 driver, which consists of an accelerometer and magnetometer, into the linux kernel 4.0. This device can function independently as accel and magnetometer however it has been recommended to implement it as one driver in order to achieve consistency and synchronized functionality of both modules. 
> 
> Please advice on whether this driver could be implemented as accel_magnetometer combined driver in a separate folder in iio? Or should this be implemented as separate accel and magnetometer modules in their corresponding existing folders in iio?

Hi, Just been reading the datasheet over lunch.  This is a bit more interesting than the usual approach of simply putting two bits of silicon into one package, and the two sensors are tightly coupled. 

As such it's similar to the full IMUs such as the ADIS16400 and similar. 

Anyhow, definitely a unified driver. Location wise, I'm tempted to suggest we rename the IMU directory as 'combined' or something similar and drop all properly integrated multiple sensor devices in there. 

Note that things like the HID sensors have independent sampling rates and timing for the different parts (they really are a bunch of sensors shoved in a box) so there we do the whole separated drivers thing. 


There are certainly a few interesting corners on this chip, such as its event based fifo filling.  We've seen that before in impact sensors, but don't yet have it well supported. 

The fact that the fifo only covers the acceleration channels will make that side of things a little trickier than normal.  We probably want a means to make this apparent to userspace, but you'll have to disable the fifo and read directly if the magnetometer channels are enabled. 

Anyhow, looking forward to seeing the driver! 

Jonathan
>  
> 
> Thanks & Regards,
> Utkarsh Gupta - B45806
> Software Apps Engineer
> Freescale Semiconductors
> 
��.n��������+%������w��{.n�����{��(��)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥





[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