From: Luispsc on
Hi, all.

Lately I've been trying to build a linux driver to an accelerometer
chipset, LIS331DL, embedded to a certain motherboard. System's BIOS
has not been updated as to fit current gsensors linux drivers in
(communities releases and so). We are positive that the device
naturally inputs/outputs info through very specific I/O ports, namely
the 0x6C and 0x68 ones. The problem is that I am able to access the
device data through those ports in Windows,but not in Linux. Moreover,
there's no real datasheet to help us through.

Here I have some few questions:

1) Is there, by any sort, a software kit which could possibly help us
into diagnosing the motherboard as to provide more info about the
device (LIS331DL accelerometer chip)?

2) Provided that there's already a windows driver that's fully
functional and easily gets to send/retrieve data to/from the gsensor,
under linux, the management of those same I/O would end into same
results? In short, is there any difference between Linux and Windows I/
O ports access (logical and addressing shifts perhaps)?

Any help would be much appreciated. Thanx in advance.
From: Lusotec on
Luispsc wrote:
> Lately I've been trying to build a linux driver to an accelerometer
> chipset, LIS331DL, embedded to a certain motherboard. System's BIOS
> has not been updated as to fit current gsensors linux drivers in
> (communities releases and so). We are positive that the device
> naturally inputs/outputs info through very specific I/O ports, namely
> the 0x6C and 0x68 ones. The problem is that I am able to access the
> device data through those ports in Windows,but not in Linux. Moreover,
> there's no real datasheet to help us through.

You probably already have the info in the links below but here they are
anyway:
http://www.st.com/stonline/products/families/sensors/motion_sensors/lis331dl.htm
http://www.st.com/stonline/products/literature/ds/13951.pdf

> Here I have some few questions:
>
> 1) Is there, by any sort, a software kit which could possibly help us
> into diagnosing the motherboard as to provide more info about the
> device (LIS331DL accelerometer chip)?

A I2C or SPI reader/analiser may be of some help.

These may be useful:
http://www.lm-sensors.org/
http://www.lm-sensors.org/wiki/I2CTools

> 2) Provided that there's already a windows driver that's fully
> functional and easily gets to send/retrieve data to/from the gsensor,
> under linux, the management of those same I/O would end into same
> results? In short, is there any difference between Linux and Windows I/
> O ports access (logical and addressing shifts perhaps)?

I don't think there is any difference on how Linux and Windows send/receive
data in I2C but I have no development experience in that area.

> Any help would be much appreciated. Thanx in advance.

Regards.

From: Luispsc on
On 4 mar, 13:02, Lusotec <nom...(a)nomail.not> wrote:
> Luispsc wrote:
> > Lately I've been trying to build a linux driver to an accelerometer
> > chipset, LIS331DL, embedded to a certain motherboard. System's BIOS
> > has not been updated as to fit current gsensors linux drivers in
> > (communities releases and so). We are positive that the device
> > naturally inputs/outputs info through very specific I/O ports, namely
> > the 0x6C and 0x68 ones. The problem is that I am able to access the
> > device data through those ports in Windows,but not in Linux. Moreover,
> > there's no real datasheet to help us through.
>
> You probably already have the info in the links below but here they are
> anyway:http://www.st.com/stonline/products/families/sensors/motion_sensors/l...http://www.st.com/stonline/products/literature/ds/13951.pdf
>
> > Here I have some few questions:
>
> > 1) Is there, by any sort, a software kit which could possibly help us
> > into diagnosing the motherboard as to provide more info about the
> > device (LIS331DL accelerometer chip)?
>
> A I2C or SPI reader/analiser may be of some help.
>
> These may be useful:http://www.lm-sensors.org/http://www.lm-sensors.org/wiki/I2CTools
>
> > 2) Provided that there's already a windows driver that's fully
> > functional and easily gets to send/retrieve data to/from thegsensor,
> > under linux, the management of those same I/O would end into same
> > results? In short, is there any difference between Linux and Windows I/
> > O ports access (logical and addressing shifts perhaps)?
>
> I don't think there is any difference on how Linux and Windows send/receive
> data in I2C but I have no development experience in that area.
>
> > Any help would be much appreciated. Thanx in advance.
>
> Regards.

Thank you for your reply.

I managed to successfully get access to the gsensor device. Hope any
other won't face the problems I had to, but just in case, I will now
provide feedback to my own questions:

1) Is there, by any sort, a software kit which could possibly help us
into diagnosing the motherboard as to provide more info about the
device (LIS331DL accelerometer chip)?

Yes. A very good one called ECTOOL. Lookie -> http://www.coreboot.org/Ectool

It probes the EC-RAM memory, which's quite a good start on taking
notice on how the bits are behaving and, later on, making decisions on
that! ;)

2) Provided that there's already a windows driver that's fully
functional and easily gets to send/retrieve data to/from the gsensor,
under linux, the management of those same I/O would end into same
results? In short, is there any difference between Linux and Windows
I/
O ports access (logical and addressing shifts perhaps)?

Yes, same results. No difference. The gsensor got to output the same
values (three-axial coordinates) as in windows. Hurray!