Current-Users archive

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

Re: Driver for the ST LIS302DL MEMS motion sensor



                        Hello again,

On 14/03/2013 22:41, Pierre Pronchery wrote:
> 
> On 13/03/2013 23:55, Constantine A. Murenin wrote:
>> On 13 March 2013 15:22, Pierre Pronchery <khorben%defora.org@localhost> 
>> wrote:
>>>
>>> I am writing a driver for the ST LIS302DL MEMS motion sensor. This
>>> component can be found on the I2C bus in the Nokia N900 smartphone
>>> hardware, which is where it currently expects to attach:
>>> # Accelerometer
>>> lis302dl0       at iic2 addr 0x1d
>>
>> One of these motion sensors was also popular on some HP laptops, and,
>> IIRC, it can also attach through ACPI.
> 
> Good to know, I just figured that I have an HP laptop somewhere that is
> said to have an ST LIS3LV02DL chip. I should then be able to test it there.

Well, there is already a driver implementing it in NetBSD, which just
isn't enabled by default. It is called hpacel(4).

I am not sure what to do next; should I move parts of hpacel(4) to
sys/dev/ic/hpacel.c, make sure it still works on ACPI, and then write
the i2c glue? Or am I better off working on my own driver separately?

Comparing the two datasheets, there are a few differences between the
two devices (the one in the HP has 12-bits precision instead of 8 for
axis values for instance). I am renaming my driver anyway, it is now
called "memsis".

Thanks for the heads up,
-- 
khorben



Home | Main Index | Thread Index | Old Index