[Gta04-owner] Goldelico Replicant 4.2 Update (suspend + accel)

Lukas Maerdian luk at slyon.de
Sun May 25 19:21:56 CEST 2014


Hi Alexandre,

2014-05-25 19:06 GMT+02:00 Alexandre Roumiantsev <ran at mail.wplus.net>:
>> > Follow Lukas and Nicolaus idea I get subj with LIS302 accel working. At
>> > least same as Lukas announcement:
>> >
>> >> * Sensors: basic support for acceleration sensor (other sensors might
>> >>   crash if used)
>> >>   --> Good test cases are the "Free Fall" game and "Sensor Readout" app,
>> >>       as found in F-Droid.
>> >
>> > I can see acceleroment info with  "Sensor Readout" and play at "Free
>> > Fall" game.
>> > Find in attachment the patch.
>> >
>> > Alexandre.
>>
>> Hi Alexandre!
>>
>> Thanks a lot for your patches. Your LIS302 kernel patch is now part of
>> the "production-3.12.7" kernel and the "3.12-replicant4" kernel at
>> git.goldelico.com.
>>
>> Today I've also used you libsensors patch, to enable LIS302 userspace
>> support in the Goldelico Replicant. I've modified it a litte: Instead of
>> checking for both accels in bma180.c I've added a new file "lis302.c",
>> so both sensors could coexist (some boards are deployed with both sensors).
>>
>> It would be nice if you could test this setup (and potentially send
>> patches to fix something), as neither of my GTA04 boards has a LIS302
>> installed, so I cannot test. Also you might try to figure out correct
>> calibration values for the lis302 and add them to gta04_sensors.c and
>> convert the sensors values to the right range in lis302.c.
>>
>> Regards,
>>   Lukas
>
> Sorry for delay. I have prepare build with you changes, but have not enough time to analyze
> result. So only some info for now:
> 1) Sensor is working. I can play Free Fall. I can see accel info with  "Sensor Readout", but
>  with next problem:

Good!

> 2) I see both BMA180 and LIS302 ( in this sequence ) in "Sensor Readout" and can see ( looks same )
> accel info for both.

That's expected. Right now we just present all sensors, regardless if
they are installed or not, i.e. also the TEPT4400 ambient light sensor
is shown, which is only installed in Letux 3704 devices. Sensor
Readout/libsensors always accesses the first registered accel if accel
data is needed, which leads to BMA180 button presenting the LIS302
data in your case.

> 3) I do not understand you patch:
>
>> -       # Sensors
>> +       # Sensors #TODO: beware of unstable path names, lis302 or bma180 might not be installed on all devices, which leads to different names
>>         chmod 666 /sys/class/input/input1/poll #bma150
>> +       chmod 666 /sys/class/input/input5/poll #lis302
>> +       write /sys/class/input/input5/poll 0 #disable lis302 as it disturbs the bma180

This patch is relevant only for devices which have bma180 and lis302
(I found out that I actually have such a configuration). If both
accels had a sampling rate >0 the bma180 data was very distorted, so I
disabled lis302 (but only if both are installed), if only one of them
is available the input nodes will be different, and thus the lis302
will not be disabled => it's working for you (lis302 only) and for
bma180 only devices.

Regards,
  Lukas


More information about the Gta04-owner mailing list