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

Dr. H. Nikolaus Schaller hns at goldelico.com
Tue Apr 8 19:13:13 CEST 2014


Hi,
iif I remember correctly there are only one or two GTA04A3 boards where the LIS302
was installed. So a driver was never developed for it and all others have a BMA180.

Am 08.04.2014 um 18:49 schrieb Alexandre Roumiantsev:

> Hello
> 
> Spend some time to install LIS302, but have not get any success.
> Please, can somebody help 
> 1) to find which sensor exist at the device?

try i2cdetect -y -r 2

the LIS302 responds on 0x1c or 0x1d
the BMA180 responds on 0x41

i2cdetect will report a UU if a driver has been registered for that address.

Alternatively you can go into the U-Boot console and run the

systest

command. It will print all the I2C devices it finds.


> 2) if it is LIS302, which setting in gta04_defconfig have to be fired?

The LIS302 in the GTA04A3 design is exactly an LIS302DL(TR). Please note that there are different LIS302 chips...

This driver appears to be the right one (at least it mentions the LIS302DL):

	http://lxr.free-electrons.com/source/drivers/misc/lis3lv02d/lis3lv02d.h?v=3.8

So I think you need:

CONFIG_SENSORS_LIS3LV02D=y
CONFIG_SENSORS_LIS3_I2C=y

That essentially confirms what Lukas has written (see below).

In addition, you will have to add an entry to the board file to provide the correct platform data.

	http://lxr.free-electrons.com/source/include/linux/lis3lv02d.h?v=3.8

BR,
Nikolaus

> 
> Thank in advice, Alexandre.
> 
>> Try to configure a LIS302 driver into your kernel.
>> E.g. that
>> one: http://lxr.free-electrons.com/source/drivers/misc/lis3lv02d/
>> (CONFIG_SENSORS_LIS3_I2C)
>> 
>> Then check again in /sys/class/input/*/name for a lis3lv02d or
>> similar. Set the correct permissions (via init.gta04.rc) for
>> /dev/input/event* - corresponding to the input device where you found
>> the correct name. Afterwards you have to update the libsensors (in
>> devices/goldelico/gta04/libsensors/bma180.c) to check also for the
>> name you found in /sys/class/input/*/name instead of just for
>> "bma150".
>> 
>> The rest of the HAL _should_ be pretty similar, as the LIS302 as well
>> as the BMA180 both provide ABS_X/Y/Z data. But my devices don't have a
>> LIS302, so I can't check. But please feel free to ask if you need
>> further help!
>> 
>> BR,
>>  Lukas
>> 
>> 2014-04-07 14:09 GMT+02:00 Alexandre Roumiantsev <ran at mail.wplus.net>:
>>> Hello, Lukas
>>> 
>>> I am sure in same kernal defconfig. But you really right - my device
>>> is A3 model and I am looking now info about LIS302. Do have any?
>>> 
>>> Best regards, Alexandre.
>>> 
>>> 
>>> 
>>> 2014-04-07 14:46 GMT+04:00, Lukas Maerdian <lukas at goldelico.com>:
>>>> 2014-04-06 6:42 GMT+02:00 Alexandre Roumiantsev
>> <ran at mail.wplus.net>:
>>>>> Hello
>>>>> 
>>>>>> Also make sure, that /sys/class/input/input1/name is "bma150".
>>>>>> Otherwise you need to set the correct permissions on another
>>>>>> node.
>>>>> 
>>>>> I have look at /sys/class/input/input1/name and find that it is
>>>>> twl4030_pwrbutton
>>>>> At my device I have next list of /sys/class/input/input?:
>>>>> 
>>>>> /sys/class/input/input0
>>>>> tsc2007
>>>>> /sys/class/input/input1
>>>>> twl4030_pwrbutton
>>>>> /sys/class/input/input2
>>>>> twl4030:vibrator
>>>>> /sys/class/input/input3
>>>>> gta04 Headset Jack
>>>>> /sys/class/input/input4
>>>>> Phone button
>>>>> /sys/class/input/input5
>>>>> 3G Wakeup
>>>> 
>>>> Hi Alexandre,
>>>> 
>>>> it looks like your BMA180 is not properly configured. Do you have
>> the
>>>> kernel driver loaded or compiled in? Are you using the same
>> defconfig
>>>> as in the 3.12-replicant4 branch? Are you using a GTA04A4 - I think
>> as
>>>> of this revision all devices should have the BMA180, some A3 models
>>>> were also deployed with a LIS302.
>>>> 
>>>> BR,
>>>>  Lukas
>>>> 
> _______________________________________________
> Gta04-owner mailing list
> Gta04-owner at goldelico.com
> http://lists.goldelico.com/mailman/listinfo/gta04-owner



More information about the Gta04-owner mailing list