Monday, May 31, 2010

LG GW620 proximity sensor

Today I'm gonna write about the android based LG GW620 and its proximity sensor and how to enable it with a aosp cupcake build.
The proprietary LG firmware uses a modified framework, which in turn calls a custom function in libhardware_legacy.so to enable the proximity sensor.

The App "Sensor Dump" shows the sensor as GP2AP002, but no values are shown.

The driver for this device is defined in LG's kernel source in drivers/input/misc/prox_sharp.c.

To enable this sensor, just do a
echo 1 > /sys/devices/platform/i2c-gpio.6/i2c-adapter/i2c-6/6-0044/enable
(for example in an init script)

Now "Sensor Dump" finally shows us some values!

I suppose LG's firmware deactivates the proximity sensor when the phone is sleeping, but I have not looked into this and how this could be archieved with cupcake aosp.

4 comments:

  1. Wow, you are making some great progress.
    Would you mind uploading your images? I would love to try them out.

    ReplyDelete
  2. There is not much point in trying my images (yet). They are just cupcake images with less functionality than the official ones. I have problems with GPS, for example.
    But I will keep you update on my progess and I will definitly release images when the bring something 'cool' :-)

    ReplyDelete
  3. have you already tried playing with the 1.6 source? You seem to be the most skilled dev in those who are trying to upgrade the Eve, I'm expecting much from you :)

    ReplyDelete
  4. The proximity sensor is not working when the phone goes to sleep state.On debugging it was found that AKM sensor is being suspended.Can we avoid the dependency of proximity sensor on AKm sensor??

    ReplyDelete